Lines Matching refs:pcoords
76 static PetscErrorCode CreatePoints_Centroid(DM dm, PetscInt *Np, PetscReal **pcoords, PetscBool *po… in CreatePoints_Centroid() argument
89 PetscCall(PetscCalloc1(*Np * spaceDim, pcoords)); in CreatePoints_Centroid()
97 …for (d = 0; d < spaceDim; ++d) (*pcoords)[p * spaceDim + d] += PetscRealPart(coords[n * spaceDim +… in CreatePoints_Centroid()
101 … PetscCall(PetscSynchronizedPrintf(PETSC_COMM_WORLD, "%g", (double)(*pcoords)[p * spaceDim + d])); in CreatePoints_Centroid()
112 static PetscErrorCode CreatePoints_Grid(DM dm, PetscInt *Np, PetscReal **pcoords, PetscBool *points… in CreatePoints_Grid() argument
138 PetscCall(PetscCalloc1(*Np * spaceDim, pcoords)); in CreatePoints_Grid()
146 for (d = 0; d < spaceDim; ++d) (*pcoords)[n * spaceDim + d] = ind[d] * h[d]; in CreatePoints_Grid()
149 … PetscCall(PetscSynchronizedPrintf(PETSC_COMM_WORLD, "%g", (double)(*pcoords)[n * spaceDim + d])); in CreatePoints_Grid()
164 static PetscErrorCode CreatePoints_GridReplicated(DM dm, PetscInt *Np, PetscReal **pcoords, PetscBo… in CreatePoints_GridReplicated() argument
180 PetscCall(PetscCalloc1(*Np * spaceDim, pcoords)); in CreatePoints_GridReplicated()
188 for (d = 0; d < spaceDim; ++d) (*pcoords)[n * spaceDim + d] = ind[d] * h[d]; in CreatePoints_GridReplicated()
191 … PetscCall(PetscSynchronizedPrintf(PETSC_COMM_WORLD, "%g", (double)(*pcoords)[n * spaceDim + d])); in CreatePoints_GridReplicated()
205 static PetscErrorCode CreatePoints(DM dm, PetscInt *Np, PetscReal **pcoords, PetscBool *pointsAllPr… in CreatePoints() argument
211 PetscCall(CreatePoints_Centroid(dm, Np, pcoords, pointsAllProcs, ctx)); in CreatePoints()
214 PetscCall(CreatePoints_Grid(dm, Np, pcoords, pointsAllProcs, ctx)); in CreatePoints()
217 PetscCall(CreatePoints_GridReplicated(dm, Np, pcoords, pointsAllProcs, ctx)); in CreatePoints()
266 PetscReal *pcoords; in main() local
281 PetscCall(CreatePoints(dm, &Np, &pcoords, &pointsAllProcs, &ctx)); in main()
285 PetscCall(DMInterpolationAddPoints(interpolator, Np, pcoords)); in main()
342 PetscCall(PetscFree(pcoords)); in main()