Home
last modified time | relevance | path

Searched refs:cdim (Results 1 – 25 of 87) sorted by relevance

1234

/petsc/src/dm/impls/plex/tests/
H A Dex8.c198 PetscInt coneSize, f, dim, cdim, d; in CheckGaussLaw() local
202 PetscCall(DMGetCoordinateDim(dm, &cdim)); in CheckGaussLaw()
203 if (dim != cdim) PetscFunctionReturn(PETSC_SUCCESS); in CheckGaussLaw()
213 for (d = 0; d < cdim; ++d) integral[d] += sgn * area * normal[d]; in CheckGaussLaw()
215 for (d = 0; d < cdim; ++d) in CheckGaussLaw()
224 PetscInt dim, depth, cdim; in CheckCell() local
229 PetscCall(DMGetCoordinateDim(dm, &cdim)); in CheckCell()
230 if (v0Ex) PetscCall(CheckFEMGeometry(dm, cell, cdim, v0Ex, JEx, invJEx, detJEx)); in CheckCell()
232 PetscCall(CheckFVMGeometry(dm, cell, cdim, centroidEx, normalEx, volEx)); in CheckCell()
253 …PetscCall(PetscMalloc5(cdim, &v0ExT, cdim * cdim, &JExT, cdim * cdim, &invJExT, cdim, &centroidExT… in CheckCell()
[all …]
H A Dex17.c45 PetscInt cdim, n; in TestCentroidLocation() local
50 PetscCall(DMGetCoordinateDim(dm, &cdim)); in TestCentroidLocation()
54 PetscCall(VecCreateSeq(PETSC_COMM_SELF, (cEnd - cStart) * cdim, &points)); in TestCentroidLocation()
55 PetscCall(VecSetBlockSize(points, cdim)); in TestCentroidLocation()
59 PetscInt off = (c - cStart) * cdim, d; in TestCentroidLocation()
62 for (d = 0; d < cdim; ++d) a[off + d] = centroid[d]; in TestCentroidLocation()
86 PetscInt cdim, Np = 1, Nfd; in TestCustomLocation() local
92 PetscCall(DMGetCoordinateDim(dm, &cdim)); in TestCustomLocation()
96 PetscCall(VecSetBlockSize(points, cdim)); in TestCustomLocation()
97 PetscCall(VecSetSizes(points, Np * cdim, PETSC_DETERMINE)); in TestCustomLocation()
[all …]
H A Dex100.c70 PetscInt cdim; in main() local
75 PetscCall(DMGetCoordinateDim(dm_read, &cdim)); in main()
87 for (PetscInt n = 0; n < num_closure / cdim; n++) { in main()
88 for (PetscInt d = 0; d < cdim; ++d) { in main()
89 min[d] = PetscMin(min[d], PetscRealPart(cell_coords[n * cdim + d])); in main()
90 max[d] = PetscMax(max[d], PetscRealPart(cell_coords[n * cdim + d])); in main()
94 for (PetscInt d = 0; d < cdim; d++) cell_bounding_box_size[d] = max[d] - min[d]; in main()
95 …cell == cStart) PetscCall(PetscArraycpy(ref_cell_bounding_box_size, cell_bounding_box_size, cdim)); in main()
97 for (PetscInt d = 0; d < cdim; d++) { in main()
H A Dex35.c8 PetscInt cdim, depth, d, pStart, pEnd, p, Nd[4] = {0, 0, 0, 0}, lsize = 0, rmem = 0, imem = 0; in EstimateMemory() local
13 PetscCall(DMGetCoordinateDim(dm, &cdim)); in EstimateMemory()
23 rmem += cdim * Nd[0]; in EstimateMemory()
25 …F, " Coordinate mem: %" PetscInt_FMT " %" PetscInt_FMT "\n", (PetscInt)(cdim * Nd[0] * sizeof(Pe… in EstimateMemory()
H A Dex16.c41 PetscInt cStart, cEnd, cdim; in CreateHalfDomainLabel() local
49 PetscCall(DMGetCoordinateDim(dm, &cdim)); in CreateHalfDomainLabel()
104 PetscInt cdim; in TestBoundaryField() local
118 PetscCall(DMGetCoordinateDim(subdm, &cdim)); in TestBoundaryField()
119 PetscCall(PetscFVSetSpatialDimension(fvm, cdim)); in TestBoundaryField()
H A Dex49.c138 PetscInt cdim, *offsets, Ncell, Ncl, Nc, n; in CheckOffsets() local
155 PetscCall(DMGetCoordinateDim(dm, &cdim)); in CheckOffsets()
156 …PetscCheck(Nc == cdim, PETSC_COMM_SELF, PETSC_ERR_ARG_INCOMP, "Geometric dimension %" PetscInt_FMT… in CheckOffsets()
169 switch (cdim) { in CheckOffsets()
/petsc/include/petsc/private/
H A Dpetscfeimpl.h345 const PetscInt cdim = T->cdim; in PetscFEInterpolateGradient_Static() local
347cdim == fegeom->dimEmbed, PETSC_COMM_SELF, PETSC_ERR_ARG_INCOMP, "Geometry dim %" PetscInt_FMT " m… in PetscFEInterpolateGradient_Static()
349 for (d = 0; d < cdim; ++d) interpolant[fc * cdim + d] = 0.0; in PetscFEInterpolateGradient_Static()
351 …for (d = 0; d < cdim; ++d) interpolant[fc * cdim + d] += x[f] * basisDer[((q * Nb + f) * Nc + fc) … in PetscFEInterpolateGradient_Static()
355 const PetscInt off = Nc * cdim; in PetscFEInterpolateGradient_Static()
358 for (d = 0; d < cdim * cdim; ++d) interpolant[off + fc * cdim * cdim + d] = 0.0; in PetscFEInterpolateGradient_Static()
360 …for (d = 0; d < cdim * cdim; ++d) interpolant[off + fc * cdim + d] += x[f] * basisHes[((q * Nb + f… in PetscFEInterpolateGradient_Static()
411 const PetscInt cdim = T->cdim; in PetscFEInterpolateFieldAndGradient_Static() local
413cdim == fegeom->dimEmbed, PETSC_COMM_SELF, PETSC_ERR_ARG_INCOMP, "Geometry dim %" PetscInt_FMT " m… in PetscFEInterpolateFieldAndGradient_Static()
416 for (d = 0; d < cdim; ++d) interpolantGrad[fc * cdim + d] = 0.0; in PetscFEInterpolateFieldAndGradient_Static()
[all …]
/petsc/src/dm/impls/plex/
H A Dplexgeometry.c40 PetscInt c, cdim, i, j, o, p, vStart, vEnd; in DMPlexFindVertices() local
49 PetscCall(DMGetCoordinateDim(dm, &cdim)); in DMPlexFindVertices()
54cdim == 0, PETSC_COMM_SELF, PETSC_ERR_ARG_INCOMP, "Given coordinates Vec has local length %" Petsc… in DMPlexFindVertices()
55 npoints = n / cdim; in DMPlexFindVertices()
69 …k(ndof == cdim, PETSC_COMM_SELF, PETSC_ERR_PLIB, "point %" PetscInt_FMT ": ndof = %" PetscInt_FMT … in DMPlexFindVertices()
74 for (i = 0, j = 0; i < npoints; i++, j += cdim) { in DMPlexFindVertices()
76 for (p = vStart, o = 0; p < vEnd; p++, o += cdim) { in DMPlexFindVertices()
77 for (c = 0; c < cdim; c++) { in DMPlexFindVertices()
80 if (c == cdim) { in DMPlexFindVertices()
87 for (i = 0, j = 0; i < npoints; i++, j += cdim) { in DMPlexFindVertices()
[all …]
H A Dplexply.c26 PetscInt dim = 2, cdim = 3, Nvp = 0, coordSize, xi = -1, yi = -1, zi = -1, v, c, p; in DMPlexCreatePLYFromFile() local
134 PetscCall(DMSetCoordinateDim(*dm, cdim)); in DMPlexCreatePLYFromFile()
138 PetscCall(PetscSectionSetFieldComponents(coordSection, 0, cdim)); in DMPlexCreatePLYFromFile()
141 PetscCall(PetscSectionSetDof(coordSection, v, cdim)); in DMPlexCreatePLYFromFile()
142 PetscCall(PetscSectionSetFieldDof(coordSection, v, 0, cdim)); in DMPlexCreatePLYFromFile()
149 PetscCall(VecSetBlockSize(coordinates, cdim)); in DMPlexCreatePLYFromFile()
161 if (p == xi) coords[v * cdim + 0] = rbuf[0]; in DMPlexCreatePLYFromFile()
162 else if (p == yi) coords[v * cdim + 1] = rbuf[0]; in DMPlexCreatePLYFromFile()
163 else if (p == zi) coords[v * cdim + 2] = rbuf[0]; in DMPlexCreatePLYFromFile()
H A Dplexceed.c368 PetscInt label_value = 0, height = 1, Nf, cdim; in DMPlexCeedComputeGeometryFVM() local
374 PetscCall(DMGetCoordinateDim(dm, &cdim)); in DMPlexCeedComputeGeometryFVM()
400 for (PetscInt d = 0; d < cdim; ++d) qdata[off + d] *= area; in DMPlexCeedComputeGeometryFVM()
401 off += cdim; in DMPlexCeedComputeGeometryFVM()
412 for (PetscInt d = 0; d < cdim; ++d) centroids[s][d] = fcentroid[d]; in DMPlexCeedComputeGeometryFVM()
416 CeedScalar *normal = &qdata[off - cdim]; in DMPlexCeedComputeGeometryFVM()
419 PetscCall(DMLocalizeCoordinateReal_Internal(dm, cdim, fcentroid, centroids[0], l)); in DMPlexCeedComputeGeometryFVM()
420 PetscCall(DMLocalizeCoordinateReal_Internal(dm, cdim, fcentroid, centroids[1], r)); in DMPlexCeedComputeGeometryFVM()
421 DMPlex_WaxpyD_Internal(cdim, -1, l, r, v); in DMPlexCeedComputeGeometryFVM()
422 if (DMPlex_DotRealD_Internal(cdim, normal, v) < 0) { in DMPlexCeedComputeGeometryFVM()
[all …]
/petsc/src/binding/petsc4py/test/
H A Dtest_dmstag.py355 cdim = cda.getDim()
383 self.assertEqual(cdim, kargs['dim'])
410 self.assertEqual(cdim, ddim)
432 self.assertEqual(cdim + 1, len(cdof))
433 self.assertEqual(cdim, len(cgsizes))
434 self.assertEqual(cdim, len(clsizes))
435 self.assertEqual(cdim, len(cboundary))
436 self.assertEqual(cdim, len(cstarts))
437 self.assertEqual(cdim, len(csizes))
438 self.assertEqual(cdim, len(cnextra))
[all …]
/petsc/src/dm/impls/plex/tutorials/
H A Dex8.c51 PetscInt cdim; in main() local
52 PetscCall(DMGetCoordinateDim(dm, &cdim)); in main()
53 PetscCall(PetscFECreateLagrange(PETSC_COMM_SELF, cdim, cdim, PETSC_FALSE, 1, 1, &fe_coords)); in main()
133 PetscInt cdim; in main() local
137 PetscCall(DMGetCoordinateDim(dm, &cdim)); in main()
150 … PetscCheck(ndof % cdim == 0, PETSC_COMM_SELF, PETSC_ERR_ARG_INCOMP, "ndof not divisible by cdim"); in main()
152 …for (PetscInt i = 0; i < ndof; i += cdim) PetscCall(PetscScalarView(cdim, &x[i], PETSC_VIEWER_STDO… in main()
H A Ddmplexgetrestoreclosureindices.F9018 PetscInt :: cdim, nIdx, idx, cnt, Nf
33 PetscCallA(DMGetCoordinateDim(cdm, cdim, ierr))
58 PetscCheckA(cnt == sharedNodes*cdim, PETSC_COMM_WORLD, PETSC_ERR_PLIB, "Wrong DOF indices")
/petsc/src/ksp/pc/impls/bddc/
H A Dbddcgraph.c306 PetscCall(PetscMalloc1(maxc * graph->cdim, &wdist)); in PCBDDCGraphComputeConnectedComponents()
311 PetscInt fst, j, k, d, cdim = graph->cdim, n = n_shared[ns]; in PCBDDCGraphComputeConnectedComponents() local
318 for (d = 0; d < cdim; d++) { in PCBDDCGraphComputeConnectedComponents()
319 PetscReal c = graph->coords[shared[ns][j] * cdim + d]; in PCBDDCGraphComputeConnectedComponents()
332 anchor = wdist + fst * cdim; in PCBDDCGraphComputeConnectedComponents()
339 …for (d = 0; d < cdim; d++) dist += (wdist[j * cdim + d] - anchor[d]) * (wdist[j * cdim + d] - anch… in PCBDDCGraphComputeConnectedComponents()
347 anchor = wdist + point1 * cdim; in PCBDDCGraphComputeConnectedComponents()
354 …for (d = 0; d < cdim; d++) dist += (wdist[j * cdim + d] - anchor[d]) * (wdist[j * cdim + d] - anch… in PCBDDCGraphComputeConnectedComponents()
363 if (cdim > 2) { in PCBDDCGraphComputeConnectedComponents()
366 …for (d = 0; d < cdim; d++) a += (wdist[point1 * cdim + d] - wdist[point2 * cdim + d]) * (wdist[poi… in PCBDDCGraphComputeConnectedComponents()
[all …]
/petsc/src/dm/impls/network/tests/
H A Dex2.c143 PetscInt cdim, v, off, vglobal, vStart, vEnd; in CoordinatePrint() local
157 PetscCall(DMGetCoordinateDim(dm, &cdim)); in CoordinatePrint()
160 PetscCall(PetscPrintf(MPI_COMM_WORLD, "\nCoordinatePrint, cdim %" PetscInt_FMT ":\n", cdim)); in CoordinatePrint()
165 switch (cdim) { in CoordinatePrint()
170 …PetscCheck(cdim == 2, MPI_COMM_WORLD, PETSC_ERR_SUP, "Only supports Network embedding dimension of… in CoordinatePrint()
/petsc/src/binding/petsc4py/src/petsc4py/PETSc/
H A DFE.pyx111 cdef PetscInt cdim = asInt(dim)
118 CHKERR(PetscFECreateDefault(ccomm, cdim, cnc, cisSimplex, cprefix, cqorder, &newfe))
157 cdef PetscInt cdim = asInt(dim)
164 CHKERR(PetscFECreateDefault(ccomm, cdim, cnc, cCellType, cprefix, cqorder, &newfe))
203 cdef PetscInt cdim = asInt(dim)
208 CHKERR(PetscFECreateLagrange(ccomm, cdim, cnc, cisSimplex, ck, cqorder, &newfe))
237 cdef PetscInt cdim = 0
238 CHKERR(PetscFEGetDimension(self.fe, &cdim))
239 return toInt(cdim)
301 cdef PetscInt cdim = 0
[all …]
H A DDMUtils.pyx102 cdef PetscInt cdim = 0
103 CHKERR(DMInterpolationGetDim(self.dminterp, &cdim))
104 return toInt(cdim)
135 cdef PetscInt cdim = asInt(dim)
136 CHKERR(DMInterpolationSetDim(self.dminterp, cdim))
H A DDT.pyx93 cdef PetscInt cdim = 0
98 CHKERR(PetscQuadratureGetData(self.quad, &cdim, &cnc, &cnpoints, &cpoints, &cweights))
99 return array_r(cnpoints*cdim, cpoints), array_r(cnpoints*cnc, cweights)
/petsc/src/dm/interface/
H A Ddmcoordinates.c886 PetscInt cdim, i, j; in DMGetLocalBoundingBox_Coordinates() local
891 PetscCall(DMGetCoordinateDim(dm, &cdim)); in DMGetLocalBoundingBox_Coordinates()
897 for (PetscInt d = 0; d < cdim; ++d) in DMGetLocalBoundingBox_Coordinates()
909 for (j = cdim; j < 3; ++j) { in DMGetLocalBoundingBox_Coordinates()
915 Ni = N / cdim; in DMGetLocalBoundingBox_Coordinates()
917 for (j = 0; j < cdim; ++j) { in DMGetLocalBoundingBox_Coordinates()
918 min[j] = PetscMin(min[j], PetscRealPart(local_coords[i * cdim + j])); in DMGetLocalBoundingBox_Coordinates()
919 max[j] = PetscMax(max[j], PetscRealPart(local_coords[i * cdim + j])); in DMGetLocalBoundingBox_Coordinates()
927 Ni = N / cdim; in DMGetLocalBoundingBox_Coordinates()
929 for (j = 0; j < cdim; ++j) { in DMGetLocalBoundingBox_Coordinates()
[all …]
H A Ddmceed.c143 PetscInt dim, cdim, cStart, cEnd, Ncell; in DMCeedCreateGeometry() local
149 PetscCall(DMGetCoordinateDim(dm, &cdim)); in DMCeedCreateGeometry()
160 *Nqdata = 1 + cdim + cdim * dim; // |J| * w_q, x, J^{-1} in DMCeedCreateGeometry()
174 PetscCallCEED(CeedQFunctionAddInput(sd->qf, "x", cdim, CEED_EVAL_INTERP)); in DMCeedCreateGeometry()
175 PetscCallCEED(CeedQFunctionAddInput(sd->qf, "dx", cdim * dim, CEED_EVAL_GRAD)); in DMCeedCreateGeometry()
225 PetscInt cdim; in DMCeedCreate_Internal() local
231 PetscCall(DMGetCoordinateDim(dm, &cdim)); in DMCeedCreate_Internal()
232cdim, PetscObjectComm((PetscObject)dm), PETSC_ERR_ARG_INCOMP, "Topological dimension %" PetscInt_F… in DMCeedCreate_Internal()
280 PetscInt dim, cdim, fStart, fEnd, Nface, Nq = 1; in DMCeedCreateGeometryFVM() local
285 PetscCall(DMGetCoordinateDim(dm, &cdim)); in DMCeedCreateGeometryFVM()
[all …]
/petsc/src/dm/impls/da/
H A Dgrvtk.c46 PetscInt dim, mx, my, mz, cdim, bs, maxnnodes, maxbs, i, j, k; in DMDAVTKWriteAll_VTS() local
63 cdim = csize / (mx * my * mz); in DMDAVTKWriteAll_VTS()
64 …PetscCheck(cdim >= dim && cdim <= 3, PETSC_COMM_SELF, PETSC_ERR_PLIB, "Coordinate vector size mism… in DMDAVTKWriteAll_VTS()
66 cdim = dim; in DMDAVTKWriteAll_VTS()
174 PetscCallMPI(MPIU_Recv(array, nnodes * cdim, MPIU_SCALAR, r, tag, comm, &status)); in DMDAVTKWriteAll_VTS()
176 PetscCheck(nn == nnodes * cdim, PETSC_COMM_SELF, PETSC_ERR_PLIB, "Array size mismatch"); in DMDAVTKWriteAll_VTS()
177 } else PetscCall(PetscArraycpy(array, coords, nnodes * cdim)); in DMDAVTKWriteAll_VTS()
183 array2[Iloc * 3 + 0] = array[Iloc * cdim + 0]; in DMDAVTKWriteAll_VTS()
184 array2[Iloc * 3 + 1] = cdim > 1 ? array[Iloc * cdim + 1] : 0.0; in DMDAVTKWriteAll_VTS()
185 array2[Iloc * 3 + 2] = cdim > 2 ? array[Iloc * cdim + 2] : 0.0; in DMDAVTKWriteAll_VTS()
[all …]
/petsc/src/dm/dt/fe/interface/
H A Dfe.c801 …PetscCheck(!fem->T || k <= fem->T->K || (!fem->T->cdim && !fem->T->K), PetscObjectComm((PetscObjec… in PetscFEGetCellTabulation()
984 PetscInt cdim; /* Reference coordinate dimension */ in PetscFECreateTabulation() local
997 PetscCall(DMGetDimension(dm, &cdim)); in PetscFECreateTabulation()
1001 (*T)->K = !cdim ? 0 : K; in PetscFECreateTabulation()
1006 (*T)->cdim = cdim; in PetscFECreateTabulation()
1008 …T)->K; ++k) PetscCall(PetscCalloc1(nrepl * npoints * Nb * Nc * PetscPowInt(cdim, k), &(*T)->T[k])); in PetscFECreateTabulation()
1051 PetscInt cdim; /* Reference coordinate dimension */ in PetscFEComputeTabulation() local
1055 PetscCall(DMGetDimension(dm, &cdim)); in PetscFEComputeTabulation()
1058 …->K == (!cdim ? 0 : K), PETSC_COMM_SELF, PETSC_ERR_ARG_SIZ, "Tabulation K %" PetscInt_FMT " must m… in PetscFEComputeTabulation()
1061 …ck(T->cdim == cdim, PETSC_COMM_SELF, PETSC_ERR_ARG_SIZ, "Tabulation cdim %" PetscInt_FMT " must ma… in PetscFEComputeTabulation()
[all …]
/petsc/src/dm/dt/interface/ftn-custom/
H A Dzdtdsf90.c22 PetscInt cdim; member
46 size *= tab[*i - 1]->cdim; in petscdsgettabulationsetpointers_()
/petsc/src/dm/dt/tests/
H A Dex16.c14 PetscInt Nb, vNb, vNb_s, vNb_d, Nc, vNc, cdim; in PetscFEVectorTest() local
34 PetscCall(PetscFEGetSpatialDimension(orig_fe, &cdim)); in PetscFEVectorTest()
50 PetscInt dblock = PetscPowInt(cdim, k); in PetscFEVectorTest()
59 …for (PetscInt d = 0; d < PetscPowInt(cdim, k); d++) err = PetscMax(err, PetscAbsReal(s_Tc[d] - v_T… in PetscFEVectorTest()
98 PetscInt dblock = PetscPowInt(cdim, k); in PetscFEVectorTest()
/petsc/src/dm/impls/swarm/
H A Dswarm.c702 PetscInt cdim, Nf, Nfc, cStart, cEnd, totDim, maxC = 0; in DMSwarmComputeMassMatrixSquare_Private() local
709 PetscCall(DMGetCoordinateDim(dmf, &cdim)); in DMSwarmComputeMassMatrixSquare_Private()
713 PetscCall(PetscMalloc3(cdim, &v0, cdim * cdim, &J, cdim * cdim, &invJ)); in DMSwarmComputeMassMatrixSquare_Private()
797 …(PetscMalloc4(maxC * totDim, &elemMat, maxC * maxC, &elemMatSq, maxC, &rowIDXs, maxC * cdim, &xi)); in DMSwarmComputeMassMatrixSquare_Private()
831cdim, PETSC_COMM_SELF, PETSC_ERR_ARG_WRONG, "The total block size of coordinates is %" PetscInt_FM… in DMSwarmComputeMassMatrixSquare_Private()
832 CoordinatesRealToRef(cdim, cdim, v0ref, v0, invJ, xr, &xi[p * cdim]); in DMSwarmComputeMassMatrixSquare_Private()
953 PetscInt cdim, Nf, Nfc, cStart, cEnd, totDim, maxNpc = 0, totNc = 0; in DMSwarmComputeGradientMatrix_Private() local
960 PetscCall(DMGetCoordinateDim(dm, &cdim)); in DMSwarmComputeGradientMatrix_Private()
965 PetscCall(PetscMalloc3(cdim, &v0, cdim * cdim, &J, cdim * cdim, &invJ)); in DMSwarmComputeGradientMatrix_Private()
978 PetscCall(PetscLayoutSetBlockSize(rLayout, cdim)); in DMSwarmComputeGradientMatrix_Private()
[all …]

1234