Home
last modified time | relevance | path

Searched refs:gcoords (Results 1 – 9 of 9) sorted by relevance

/petsc/src/dm/interface/
H A Ddmgeommodel.c10 …ToGeomModelBall(DM dm, PetscInt p, PetscInt dE, const PetscScalar mcoords[], PetscScalar gcoords[]) in DMSnapToGeomModelBall() argument
21 for (PetscInt d = 0; d < dE; ++d) gcoords[d] = mcoords[d] / norm; in DMSnapToGeomModelBall()
23 for (PetscInt d = 0; d < dE; ++d) gcoords[d] = mcoords[d]; in DMSnapToGeomModelBall()
28 …omModelCylinder(DM dm, PetscInt p, PetscInt dE, const PetscScalar mcoords[], PetscScalar gcoords[]) in DMSnapToGeomModelCylinder() argument
41 for (PetscInt d = 0; d < dE - 1; ++d) gcoords[d] = mcoords[d] * gmax[0] / norm; in DMSnapToGeomModelCylinder()
42 gcoords[dE - 1] = mcoords[dE - 1]; in DMSnapToGeomModelCylinder()
44 for (PetscInt d = 0; d < dE; ++d) gcoords[d] = mcoords[d]; in DMSnapToGeomModelCylinder()
179 …SnapToGeomModel(DM dm, PetscInt p, PetscInt dE, const PetscScalar mcoords[], PetscScalar gcoords[]) in DMSnapToGeomModel() argument
183 for (PetscInt d = 0; d < dE; ++d) gcoords[d] = mcoords[d]; in DMSnapToGeomModel()
184 else PetscUseTypeMethod(dm, snaptogeommodel, p, dE, mcoords, gcoords); in DMSnapToGeomModel()
/petsc/src/mat/tests/
H A Dex246.cxx27 …MyIMatrix(PetscInt spacedim, PetscReal *gcoords) : htool::VirtualGenerator<PetscScalar>(), coords( in MyIMatrix() argument
49 PetscReal *coords, *gcoords, norm, epsilon, relative; in main() local
67 PetscCall(PetscCalloc1(M * dim, &gcoords)); in main()
69 PetscCall(PetscArraycpy(gcoords + begin * dim, coords, m * dim)); in main()
70 …PetscCallMPI(MPIU_Allreduce(MPI_IN_PLACE, gcoords, M * dim, MPIU_REAL, MPI_SUM, PETSC_COMM_WORLD)); in main()
71 imatrix = new MyIMatrix(dim, gcoords); in main()
78 …oolFromKernel(PETSC_COMM_WORLD, m, m, M, M, dim, coords, coords, kernel, gcoords, &B)); /* entry-w… in main()
97 PetscCall(PetscFree(gcoords)); in main()
H A Dex268.c27 PetscReal *coords, *gcoords, norm, epsilon; in main() local
47 PetscCall(PetscCalloc1(M * dim, &gcoords)); in main()
51 PetscCall(PetscArraycpy(gcoords + begin * dim, coords, m * dim)); in main()
52 …PetscCallMPI(MPIU_Allreduce(MPI_IN_PLACE, gcoords, M * dim, MPIU_REAL, MPI_SUM, PETSC_COMM_WORLD)); in main()
53 …(MatCreateHtoolFromKernel(PETSC_COMM_WORLD, m, m, M, M, dim, coords, coords, kernel, gcoords, &A)); in main()
128 PetscCall(PetscFree(gcoords)); in main()
H A Dex241.c43 …PetscReal *coords, *gcoords, *scoords, *gscoords, *ctx[2], norm, epsilon = PetscSqrtReal(PE… in main() local
65 PetscCall(PetscCalloc1(M * dim, &gcoords)); in main()
69 PetscCall(PetscArraycpy(gcoords + begin * dim, coords, m * dim)); in main()
70 …PetscCallMPI(MPIU_Allreduce(MPI_IN_PLACE, gcoords, M * dim, MPIU_REAL, MPI_SUM, PETSC_COMM_WORLD)); in main()
71 …(MatCreateHtoolFromKernel(PETSC_COMM_WORLD, m, m, M, M, dim, coords, coords, kernel, gcoords, &A)); in main()
113 …(MatCreateHtoolFromKernel(PETSC_COMM_WORLD, m, m, M, M, dim, coords, coords, kernel, gcoords, &B)); in main()
141 …cInt j = 0; j < M; ++j) PetscCall(GenEntries(dim, 1, 1, &i, &j, ptr + i - begin + j * m, gcoords)); in main()
176 ctx[0] = gcoords; in main()
235 PetscCall(PetscFree(gcoords)); in main()
/petsc/src/dm/tests/
H A Dex32.c25 Vec coords, gcoords, gcoords2; in TestQ2Q1DA() local
42 PetscCall(DMGetCoordinatesLocal(Q1_da, &gcoords)); in TestQ2Q1DA()
51 PetscCall(CompareGhostedCoords(gcoords, gcoords2)); in TestQ2Q1DA()
55 PetscCall(VecScale(gcoords, 10.0)); in TestQ2Q1DA()
57 PetscCall(CompareGhostedCoords(gcoords, gcoords2)); in TestQ2Q1DA()
/petsc/src/ksp/ksp/tutorials/
H A Dex82.c35 PetscReal *coords, *gcoords; in main() local
52 PetscCall(PetscCalloc1(M * dim, &gcoords)); in main()
54 PetscCall(PetscArraycpy(gcoords + begin * dim, coords, m * dim)); in main()
55 …PetscCallMPI(MPIU_Allreduce(MPI_IN_PLACE, gcoords, M * dim, MPIU_REAL, MPI_SUM, PETSC_COMM_WORLD)); in main()
56 …(MatCreateHtoolFromKernel(PETSC_COMM_WORLD, m, m, M, M, dim, coords, coords, kernel, gcoords, &A)); in main()
93 PetscCall(PetscFree(gcoords)); in main()
/petsc/src/mat/impls/h2opus/cuda/
H A Dmath2opus.cu1169 PetscReal *gcoords; in MatH2OpusSetCoords_H2OPUS() local
1192 PetscCall(PetscMalloc1(spacedim * N, &gcoords)); in MatH2OpusSetCoords_H2OPUS()
1193 PetscCall(PetscSFBcastBegin(sf, dtype, coords, gcoords, MPI_REPLACE)); in MatH2OpusSetCoords_H2OPUS()
1194 PetscCall(PetscSFBcastEnd(sf, dtype, coords, gcoords, MPI_REPLACE)); in MatH2OpusSetCoords_H2OPUS()
1197 } else gcoords = (PetscReal *)coords; in MatH2OpusSetCoords_H2OPUS()
1201 h2opus->ptcloud = new PetscPointCloud<PetscReal>(spacedim, N, gcoords); in MatH2OpusSetCoords_H2OPUS()
1203 if (gcoords != coords) PetscCall(PetscFree(gcoords)); in MatH2OpusSetCoords_H2OPUS()
/petsc/src/dm/impls/plex/
H A Dplexfem.c1466 PetscReal *coords, *gcoords; in DMPlexComputeL2DiffLocal() local
1545 gcoords = &coords[coordDim * Nq]; in DMPlexComputeL2DiffLocal()
1546 …(dm, &coords[coordDim * q], PETSC_TRUE, coordDim, &coords[coordDim * q], gcoords, dm->transformCtx… in DMPlexComputeL2DiffLocal()
1548 gcoords = &coords[coordDim * q]; in DMPlexComputeL2DiffLocal()
1551 ierr = (*funcs[field])(coordDim, time, gcoords, Nc, funcVal, ctx); in DMPlexComputeL2DiffLocal()
1592 PetscReal *coords, *gcoords; in DMComputeL2GradientDiff_Plex() local
1654 gcoords = &coords[coordDim * Nq]; in DMComputeL2GradientDiff_Plex()
1655 …(dm, &coords[coordDim * q], PETSC_TRUE, coordDim, &coords[coordDim * q], gcoords, dm->transformCtx… in DMComputeL2GradientDiff_Plex()
1657 gcoords = &coords[coordDim * q]; in DMComputeL2GradientDiff_Plex()
1660 ierr = (*funcs[field])(coordDim, time, gcoords, n, Nc, funcVal, ctx); in DMComputeL2GradientDiff_Plex()
[all …]
H A Dplexegads.c480 …tscInt faceID, PetscInt edgeID, const PetscScalar mcoords[], PetscScalar gcoords[], PetscBool isli… in DMSnapToGeomModel_EGADS_Internal() argument
526 for (d = 0; d < dE; ++d) gcoords[d] = mcoords[d]; in DMSnapToGeomModel_EGADS_Internal()
535 for (d = 0; d < dE; ++d) gcoords[d] = mcoords[d]; in DMSnapToGeomModel_EGADS_Internal()
572 for (d = 0; d < dE; ++d) gcoords[d] = result[d]; in DMSnapToGeomModel_EGADS_Internal()
577 …GeomModel_EGADS(DM dm, PetscInt p, PetscInt dE, const PetscScalar mcoords[], PetscScalar gcoords[]) in DMSnapToGeomModel_EGADS() argument
605 for (PetscInt d = 0; d < dE; ++d) gcoords[d] = mcoords[d]; in DMSnapToGeomModel_EGADS()
608 …PetscCall(DMSnapToGeomModel_EGADS_Internal(dm, p, model, bodyID, faceID, edgeID, mcoords, gcoords,… in DMSnapToGeomModel_EGADS()