Home
last modified time | relevance | path

Searched refs:centroid (Results 1 – 25 of 38) sorted by relevance

12

/petsc/src/dm/impls/plex/tests/output/
H A Dex36_0.out1 rank 0 c 0 centroid 0.0625,0.5,0.5 vol 0.125
2 rank 0 c 1 centroid 0.1875,0.5,0.5 vol 0.125
3 rank 0 c 2 centroid 0.3125,0.5,0.5 vol 0.125
4 rank 0 c 3 centroid 0.4375,0.5,0.5 vol 0.125
5 rank 1 c 0 centroid 0.4375,0.5,0.5 vol 0.125
6 rank 1 c 1 centroid 0.5625,0.5,0.5 vol 0.125
7 rank 1 c 2 centroid 0.6875,0.5,0.5 vol 0.125
8 rank 1 c 3 centroid 0.3125,0.5,0.5 vol 0.125
9 rank 1 c 4 centroid 0.8125,0.5,0.5 vol 0.125
10 rank 2 c 0 centroid 0.8125,0.5,0.5 vol 0.125
[all …]
/petsc/src/dm/impls/plex/tests/
H A Dex16.c40 PetscReal centroid[3]; in CreateHalfDomainLabel() local
51 PetscCall(DMPlexComputeCellGeometryFVM(dm, c, NULL, centroid, NULL)); in CreateHalfDomainLabel()
52 if (height > 0.0 && PetscAbsReal(centroid[1] - height) > PETSC_SMALL) continue; in CreateHalfDomainLabel()
54 if (centroid[0] < 0.5) PetscCall(DMLabelSetValue(*label, c, 1)); in CreateHalfDomainLabel()
56 if (centroid[0] > 0.5) PetscCall(DMLabelSetValue(*label, c, 1)); in CreateHalfDomainLabel()
66 PetscReal centroid[3]; in CreateLineLabel() local
75 PetscCall(DMPlexComputeCellGeometryFVM(dm, f, NULL, centroid, NULL)); in CreateLineLabel()
76 if (PetscAbsReal(centroid[0] - x) < PETSC_SMALL) PetscCall(DMLabelSetValue(*label, f, 1)); in CreateLineLabel()
H A Dex8.c18 PetscReal *centroid, *normal, *vol; /* FVM data */ member
57 PetscCall(PetscMalloc1(numCells * dim, &options->centroid)); in ProcessOptions()
77 …tionsRealArray("-centroid", "Input centroid for each cell", "ex8.c", options->centroid, &n, &flg)); in ProcessOptions()
80 PetscCall(PetscFree(options->centroid)); in ProcessOptions()
81 options->centroid = NULL; in ProcessOptions()
178 PetscReal centroid[3], normal[3], vol; in CheckFVMGeometry() local
182 …PetscCall(DMPlexComputeCellGeometryFVM(dm, cell, volEx ? &vol : NULL, centroidEx ? centroid : NULL… in CheckFVMGeometry()
185centroid[d], centroidEx[d]) < tol, PETSC_COMM_SELF, PETSC_ERR_PLIB, "Cell %" PetscInt_FMT ", Inval… in CheckFVMGeometry()
638 PetscReal *centroid = PetscSafePointerPlusOffset(user.centroid, c * dim); in main() local
642 …PetscCall(CheckCell(user.dm, c + cStart, PETSC_FALSE, v0, J, invJ, detJ, centroid, normal, vol, NU… in main()
[all …]
H A Dex36.c78 …d %g,%g,%g vol %g\n", rank, c, (double)geom->centroid[0], (double)geom->centroid[1], (double)geom-… in dm_view_geometry()
H A Dex17.c58 PetscReal centroid[3]; in TestCentroidLocation() local
61 PetscCall(DMPlexComputeCellGeometryFVM(dm, c, NULL, centroid, NULL)); in TestCentroidLocation()
62 for (d = 0; d < cdim; ++d) a[off + d] = centroid[d]; in TestCentroidLocation()
H A Dex60.c72 PetscReal centroid[3], volume, x; in main() local
74 PetscCall(DMPlexComputeCellGeometryFVM(dm, c, &volume, centroid, NULL)); in main()
75 x = centroid[0]; in main()
/petsc/src/ts/tutorials/
H A Dex52.c83 PetscReal cellvol, centroid[3], normal[3]; in FormInitialSolution() local
93 PetscCall(DMPlexComputeCellGeometryFVM(da, cell, &cellvol, centroid, normal)); in FormInitialSolution()
94 if (centroid[0] > 0.9 && centroid[0] < 0.95) { in FormInitialSolution()
95 if (centroid[1] > 0.9 && centroid[1] < 0.95) u[cell] = 2.0; in FormInitialSolution()
204 centroid_y[0] = fgA->centroid[1]; in FormFunction()
207 centroid_y[1] = fgA->centroid[1]; in FormFunction()
210 centroid_x[0] = fgA->centroid[0]; in FormFunction()
213 centroid_x[1] = fgA->centroid[0]; in FormFunction()
H A Dex11.c816 …(vertex[0] - cg->centroid[0]) * (fgA->centroid[1] - cg->centroid[1]) - (vertex[1] - cg->centroid[1… in CreateMassMatrix()
817 …(vertex[0] - cg->centroid[0]) * (fgB->centroid[1] - cg->centroid[1]) - (vertex[1] - cg->centroid[1… in CreateMassMatrix()
1003 PetscCall((*flink->func)(mod, time, cg->centroid, cx, ftmp, flink->ctx)); in MonitorVTK()
/petsc/include/
H A Dpetscfvtypes.h41 PetscReal centroid[3]; /* Location of centroid (quadrature point) */ member
59 PetscReal centroid[3]; member
/petsc/src/dm/impls/plex/tutorials/
H A Dex10.c31 PetscReal centroid[3], volume, x, y; in CreateDomainLabel() local
33 PetscCall(DMPlexComputeCellGeometryFVM(dm, c, &volume, centroid, NULL)); in CreateDomainLabel()
34 x = centroid[0]; in CreateDomainLabel()
35 y = centroid[1]; in CreateDomainLabel()
111 PetscReal volume, centroid[3]; in AdaptMesh() local
114 PetscCall(DMPlexComputeCellGeometryFVM(dmCur, c, &volume, centroid, NULL)); in AdaptMesh()
H A Dex18.c11 PetscReal vol, centroid[3], normal[3]; in surfArea() local
31 PetscCall(DMPlexComputeCellGeometryFVM(dm, ii, &vol, centroid, normal)); in surfArea()
42 PetscCall(DMPlexComputeCellGeometryFVM(dm, ii, &vol, centroid, normal)); in surfArea()
51 PetscCall(DMPlexComputeCellGeometryFVM(dm, ii, &vol, centroid, normal)); in surfArea()
H A Dex3f90.F9020 PetscReal, target, dimension(dim) :: centroid
43 pcentroid => centroid
H A Dex19.c15 PetscReal vol, centroid[3], normal[3]; in surfArea() local
34 PetscCall(DMPlexComputeCellGeometryFVM(dm, ii, &vol, centroid, normal)); in surfArea()
45 PetscCall(DMPlexComputeCellGeometryFVM(dm, ii, &vol, centroid, normal)); in surfArea()
54 PetscCall(DMPlexComputeCellGeometryFVM(dm, ii, &vol, centroid, normal)); in surfArea()
/petsc/src/dm/impls/plex/tutorials/output/
H A Dex3f90_0.out11 cell: 0 volume: 0.5000 centroid: -0.2500 0.5000 0.5000
12 cell: 1 volume: 0.5000 centroid: 0.2500 0.5000 0.5000
/petsc/src/dm/impls/plex/generators/tetgen/
H A Dtetgenerate.cxx257 PetscReal centroid[3] = {0., 0., 0.}; in DMPlexGenerate_Tetgen() local
271 for (d = 0; d < dim; ++d) centroid[d] += coords[s * dim + d]; in DMPlexGenerate_Tetgen()
273 } else PetscCall(DMPlexComputeCellGeometryFVM(*dm, c, nullptr, centroid, nullptr)); in DMPlexGenerate_Tetgen()
276 if (EGlite_inTopology(bodies[b], centroid) == EGADS_SUCCESS) break; in DMPlexGenerate_Tetgen()
278 if (EG_inTopology(bodies[b], centroid) == EGADS_SUCCESS) break; in DMPlexGenerate_Tetgen()
536 PetscReal centroid[3] = {0., 0., 0.}; in DMPlexRefine_Tetgen() local
550 for (d = 0; d < dim; ++d) centroid[d] += coords[s * dim + d]; in DMPlexRefine_Tetgen()
552 } else PetscCall(DMPlexComputeCellGeometryFVM(*dmRefined, c, nullptr, centroid, nullptr)); in DMPlexRefine_Tetgen()
555 if (EGlite_inTopology(bodies[b], centroid) == EGADS_SUCCESS) break; in DMPlexRefine_Tetgen()
557 if (EG_inTopology(bodies[b], centroid) == EGADS_SUCCESS) break; in DMPlexRefine_Tetgen()
/petsc/src/dm/impls/plex/generators/ctetgen/
H A Dctetgenerate.c232 PetscReal centroid[3] = {0., 0., 0.}; in DMPlexGenerate_CTetgen() local
246 for (d = 0; d < dim; ++d) centroid[d] += coords[s * dim + d]; in DMPlexGenerate_CTetgen()
248 } else PetscCall(DMPlexComputeCellGeometryFVM(*dm, c, NULL, centroid, NULL)); in DMPlexGenerate_CTetgen()
250 if (EG_inTopology(bodies[b], centroid) == EGADS_SUCCESS) break; in DMPlexGenerate_CTetgen()
507 PetscReal centroid[3] = {0., 0., 0.}; in DMPlexRefine_CTetgen() local
521 for (d = 0; d < dim; ++d) centroid[d] += coords[s * dim + d]; in DMPlexRefine_CTetgen()
523 } else PetscCall(DMPlexComputeCellGeometryFVM(*dmRefined, c, NULL, centroid, NULL)); in DMPlexRefine_CTetgen()
525 if (EG_inTopology(bodies[b], centroid) == EGADS_SUCCESS) break; in DMPlexRefine_CTetgen()
/petsc/src/dm/impls/plex/
H A Dplexgeometry.c2642 …_Internal(DM dm, PetscInt dim, PetscInt cell, PetscReal *vol, PetscReal centroid[], PetscReal norm… in DMPlexComputeGeometryFVM_0D_Internal() argument
2655 if (centroid) { in DMPlexComputeGeometryFVM_0D_Internal()
2658 for (d = 0; d < dof; d++) centroid[d] = PetscRealPart(coords[off + d]); in DMPlexComputeGeometryFVM_0D_Internal()
2687 …_Internal(DM dm, PetscInt dim, PetscInt cell, PetscReal *vol, PetscReal centroid[], PetscReal norm… in DMPlexComputeGeometryFVM_1D_Internal() argument
2698 if (centroid) { in DMPlexComputeGeometryFVM_1D_Internal()
2699 for (d = 0; d < cdim; ++d) centroid[d] = 0.5 * PetscRealPart(coords[d] + coords[cdim + d]); in DMPlexComputeGeometryFVM_1D_Internal()
2730 …_Internal(DM dm, PetscInt dim, PetscInt cell, PetscReal *vol, PetscReal centroid[], PetscReal norm… in DMPlexComputeGeometryFVM_2D_Internal() argument
2785 if (centroid) in DMPlexComputeGeometryFVM_2D_Internal()
2786 for (d = 0; d < cdim; ++d) centroid[d] = c[d]; in DMPlexComputeGeometryFVM_2D_Internal()
2795 …_Internal(DM dm, PetscInt dim, PetscInt cell, PetscReal *vol, PetscReal centroid[], PetscReal norm… in DMPlexComputeGeometryFVM_3D_Internal() argument
[all …]
H A Dplexadapt.c227 PetscReal vol, centroid[3]; in DMPlexRefine_Internal() local
229 PetscCall(DMPlexComputeCellGeometryFVM(dm, c, &vol, centroid, NULL)); in DMPlexRefine_Internal()
230 PetscCall((*refinementFunc)(centroid, &maxVolumes[c - cStart])); in DMPlexRefine_Internal()
H A Dplexfvm.c42 DMPlex_WaxpyD_Internal(dim, -1, cg->centroid, ncg->centroid, v); in DMPlexApplyLimiter_Internal()
/petsc/src/snes/tutorials/
H A Dex23.c70 PetscReal centroid[3]; in DivideDomain() local
72 PetscCall(DMPlexComputeCellGeometryFVM(dm, c, NULL, centroid, NULL)); in DivideDomain()
73 if (centroid[1] > midy) PetscCall(DMLabelSetValue(top, c, 1)); in DivideDomain()
/petsc/src/ts/tests/
H A Dex27.c67 PetscReal *centroid, *coords, *velocity, *xi0, *v0, *J, *invJ, detJ, *vals; in SetInitialCoordinates() local
86 PetscCall(PetscMalloc5(dim, &centroid, dim, &xi0, dim, &v0, dim * dim, &J, dim * dim, &invJ)); in SetInitialCoordinates()
93 PetscCall(DMPlexComputeCellGeometryFVM(dm, c, NULL, centroid, NULL)); in SetInitialCoordinates()
94 for (d = 0; d < dim; ++d) coords[c * dim + d] = centroid[d]; in SetInitialCoordinates()
127 PetscCall(PetscFree5(centroid, xi0, v0, J, invJ)); in SetInitialCoordinates()
H A Dex28.c64 PetscReal *centroid, *coords, *xi0, *v0, *J, *invJ, detJ, *vals; in SetInitialCoordinates() local
80 PetscCall(PetscMalloc5(dim, &centroid, dim, &xi0, dim, &v0, dim * dim, &J, dim * dim, &invJ)); in SetInitialCoordinates()
86 PetscCall(DMPlexComputeCellGeometryFVM(dm, c, NULL, centroid, NULL)); in SetInitialCoordinates()
88 coords[c * dim + d] = centroid[d]; in SetInitialCoordinates()
114 PetscCall(PetscFree5(centroid, xi0, v0, J, invJ)); in SetInitialCoordinates()
/petsc/src/dm/impls/swarm/tests/
H A Dex2.c178 PetscReal *centroid, *coords, *xi0, *v0, *J, *invJ, detJ; in CreateParticles() local
216 PetscCall(PetscMalloc5(dim, &centroid, dim, &xi0, dim, &v0, dim * dim, &J, dim * dim, &invJ)); in CreateParticles()
219 PetscCall(DMPlexComputeCellGeometryFVM(dm, c, NULL, centroid, NULL)); in CreateParticles()
221 for (d = 0; d < dim; ++d) coords[c * dim + d] = centroid[d]; in CreateParticles()
241 PetscCall(PetscFree5(centroid, xi0, v0, J, invJ)); in CreateParticles()
/petsc/src/dm/dt/fv/interface/
H A Dfv.c1925 …(*riemann)(dim, pdim, fgeom[f].centroid, fgeom[f].normal, &uL[f * Nc], &uR[f * Nc], numConstants, … in PetscFVIntegrateRHSFunction_Upwind()
2129 du = cg1->centroid[0] + 3*cg1->centroid[1] - (cg->centroid[0] + 3*cg->centroid[1]);
2207 …(*riemann)(dim, pdim, fgeom[f].centroid, fgeom[f].normal, &uL[f * Nc], &uR[f * Nc], numConstants, … in PetscFVIntegrateRHSFunction_LeastSquares()
/petsc/src/dm/impls/swarm/
H A Dswarm.c2213 PetscReal *centroid, *coords, *xi0, *v0, *J, *invJ, detJ; in DMSwarmSetPointCoordinatesRandom() local
2231 PetscCall(PetscMalloc5(dim, &centroid, dim, &xi0, dim, &v0, dim * dim, &J, dim * dim, &invJ)); in DMSwarmSetPointCoordinatesRandom()
2236 PetscCall(DMPlexComputeCellGeometryFVM(cdm, c, NULL, centroid, NULL)); in DMSwarmSetPointCoordinatesRandom()
2237 for (d = 0; d < dim; ++d) coords[c * dim + d] = centroid[d]; in DMSwarmSetPointCoordinatesRandom()
2255 PetscCall(PetscFree5(centroid, xi0, v0, J, invJ)); in DMSwarmSetPointCoordinatesRandom()

12