Lines Matching refs:coords

205 …on_Coords_Internal(DM dm, PetscInt dim, PetscInt cdim, const PetscScalar coords[], const PetscReal…  in DMPlexGetPlaneSimplexIntersection_Coords_Internal()  argument
224 for (PetscInt i = 0; i < cdim; ++i) c[i] = PetscRealPart(coords[v * cdim + i]); in DMPlexGetPlaneSimplexIntersection_Coords_Internal()
227 d[v] = DMPlex_DotRealD_Internal(cdim, normal, &coords[v * cdim]); in DMPlexGetPlaneSimplexIntersection_Coords_Internal()
249 … for (PetscInt i = 0; i < cdim; ++i) intPoints[n * cdim + i] = PetscRealPart(coords[v * cdim + i]); in DMPlexGetPlaneSimplexIntersection_Coords_Internal()
258 …i) intPoints[n * cdim + i] = (d[v] * PetscRealPart(coords[w * cdim + i]) - d[w] * PetscRealPart(co… in DMPlexGetPlaneSimplexIntersection_Coords_Internal()
272 PetscScalar *coords = NULL; in DMPlexGetPlaneSimplexIntersection_Internal() local
280 PetscCall(DMPlexGetCellCoordinates(dm, c, &isDG, &numCoords, &array, &coords)); in DMPlexGetPlaneSimplexIntersection_Internal()
284 …PetscCall(DMPlexGetPlaneSimplexIntersection_Coords_Internal(dm, dim, cdim, coords, p, normal, pos,… in DMPlexGetPlaneSimplexIntersection_Internal()
286 PetscCall(DMPlexRestoreCellCoordinates(dm, c, &isDG, &numCoords, &array, &coords)); in DMPlexGetPlaneSimplexIntersection_Internal()
293 PetscScalar *coords = NULL; in DMPlexGetPlaneQuadIntersection_Internal() local
305 PetscCall(DMPlexGetCellCoordinates(dm, c, &isDG, &numCoords, &array, &coords)); in DMPlexGetPlaneQuadIntersection_Internal()
310 for (PetscInt d = 0; d < cdim; ++d) tcoords[v * cdim + d] = coords[vertsA[v] * cdim + d]; in DMPlexGetPlaneQuadIntersection_Internal()
313 for (PetscInt d = 0; d < cdim; ++d) tcoords[v * cdim + d] = coords[vertsB[v] * cdim + d]; in DMPlexGetPlaneQuadIntersection_Internal()
317 PetscCall(DMPlexRestoreCellCoordinates(dm, c, &isDG, &numCoords, &array, &coords)); in DMPlexGetPlaneQuadIntersection_Internal()
324 PetscScalar *coords = NULL; in DMPlexGetPlaneHexIntersection_Internal() local
341 PetscCall(DMPlexGetCellCoordinates(dm, c, &isDG, &numCoords, &array, &coords)); in DMPlexGetPlaneHexIntersection_Internal()
346 for (PetscInt d = 0; d < cdim; ++d) tcoords[v * cdim + d] = coords[vertsA[v] * cdim + d]; in DMPlexGetPlaneHexIntersection_Internal()
350 for (PetscInt d = 0; d < cdim; ++d) tcoords[v * cdim + d] = coords[vertsB[v] * cdim + d]; in DMPlexGetPlaneHexIntersection_Internal()
354 for (PetscInt d = 0; d < cdim; ++d) tcoords[v * cdim + d] = coords[vertsC[v] * cdim + d]; in DMPlexGetPlaneHexIntersection_Internal()
358 for (PetscInt d = 0; d < cdim; ++d) tcoords[v * cdim + d] = coords[vertsD[v] * cdim + d]; in DMPlexGetPlaneHexIntersection_Internal()
362 for (PetscInt d = 0; d < cdim; ++d) tcoords[v * cdim + d] = coords[vertsE[v] * cdim + d]; in DMPlexGetPlaneHexIntersection_Internal()
366 for (PetscInt d = 0; d < cdim; ++d) tcoords[v * cdim + d] = coords[vertsF[v] * cdim + d]; in DMPlexGetPlaneHexIntersection_Internal()
371 PetscCall(DMPlexRestoreCellCoordinates(dm, c, &isDG, &numCoords, &array, &coords)); in DMPlexGetPlaneHexIntersection_Internal()
485 PetscScalar *coords = NULL; in DMPlexLocatePoint_Quad_2D_Linear_Internal() local
493 PetscCall(DMPlexGetCellCoordinates(dm, c, &isDG, &numCoords, &array, &coords)); in DMPlexLocatePoint_Quad_2D_Linear_Internal()
498 PetscReal x_i = PetscRealPart(coords[faces[2 * f + 0] * embedDim + 0]); in DMPlexLocatePoint_Quad_2D_Linear_Internal()
499 PetscReal y_i = PetscRealPart(coords[faces[2 * f + 0] * embedDim + 1]); in DMPlexLocatePoint_Quad_2D_Linear_Internal()
500 PetscReal x_j = PetscRealPart(coords[faces[2 * f + 1] * embedDim + 0]); in DMPlexLocatePoint_Quad_2D_Linear_Internal()
501 PetscReal y_j = PetscRealPart(coords[faces[2 * f + 1] * embedDim + 1]); in DMPlexLocatePoint_Quad_2D_Linear_Internal()
520 PetscCall(DMPlexRestoreCellCoordinates(dm, c, &isDG, &numCoords, &array, &coords)); in DMPlexLocatePoint_Quad_2D_Linear_Internal()
532 Vec coords; in DMPlexLocatePoint_Quad_2D_Internal() local
552 PetscCall(DMGetCoordinatesLocal(dm, &coords)); in DMPlexLocatePoint_Quad_2D_Internal()
555 …PetscCall(DMPlexCoordinatesToReference_FE(cdm, fe, c, 1, pointR, ref, coords, dimC, dimR, 10, &err… in DMPlexLocatePoint_Quad_2D_Internal()
562 PetscCall(DMPlexReferenceToCoordinates_FE(cdm, fe, c, 1, ref, real, coords, dimC, dimR)); in DMPlexLocatePoint_Quad_2D_Internal()
596 PetscScalar *coords = NULL; in DMPlexLocatePoint_Hex_3D_Linear_Internal() local
603 PetscCall(DMPlexGetCellCoordinates(dm, c, &isDG, &numCoords, &array, &coords)); in DMPlexLocatePoint_Hex_3D_Linear_Internal()
614 v_i[0] = PetscRealPart(coords[faces[f * 4 + 3] * 3 + 0] - coords[faces[f * 4 + 0] * 3 + 0]); in DMPlexLocatePoint_Hex_3D_Linear_Internal()
615 v_i[1] = PetscRealPart(coords[faces[f * 4 + 3] * 3 + 1] - coords[faces[f * 4 + 0] * 3 + 1]); in DMPlexLocatePoint_Hex_3D_Linear_Internal()
616 v_i[2] = PetscRealPart(coords[faces[f * 4 + 3] * 3 + 2] - coords[faces[f * 4 + 0] * 3 + 2]); in DMPlexLocatePoint_Hex_3D_Linear_Internal()
617 v_j[0] = PetscRealPart(coords[faces[f * 4 + 1] * 3 + 0] - coords[faces[f * 4 + 0] * 3 + 0]); in DMPlexLocatePoint_Hex_3D_Linear_Internal()
618 v_j[1] = PetscRealPart(coords[faces[f * 4 + 1] * 3 + 1] - coords[faces[f * 4 + 0] * 3 + 1]); in DMPlexLocatePoint_Hex_3D_Linear_Internal()
619 v_j[2] = PetscRealPart(coords[faces[f * 4 + 1] * 3 + 2] - coords[faces[f * 4 + 0] * 3 + 2]); in DMPlexLocatePoint_Hex_3D_Linear_Internal()
623 pp[0] = PetscRealPart(coords[faces[f * 4 + 0] * 3 + 0] - point[0]); in DMPlexLocatePoint_Hex_3D_Linear_Internal()
624 pp[1] = PetscRealPart(coords[faces[f * 4 + 0] * 3 + 1] - point[1]); in DMPlexLocatePoint_Hex_3D_Linear_Internal()
625 pp[2] = PetscRealPart(coords[faces[f * 4 + 0] * 3 + 2] - point[2]); in DMPlexLocatePoint_Hex_3D_Linear_Internal()
636 PetscCall(DMPlexRestoreCellCoordinates(dm, c, &isDG, &numCoords, &array, &coords)); in DMPlexLocatePoint_Hex_3D_Linear_Internal()
648 Vec coords; in DMPlexLocatePoint_Hex_3D_Internal() local
668 PetscCall(DMGetCoordinatesLocal(dm, &coords)); in DMPlexLocatePoint_Hex_3D_Internal()
671 …PetscCall(DMPlexCoordinatesToReference_FE(cdm, fe, c, 1, pointR, ref, coords, dimC, dimR, 10, &err… in DMPlexLocatePoint_Hex_3D_Internal()
678 PetscCall(DMPlexReferenceToCoordinates_FE(cdm, fe, c, 1, ref, real, coords, dimC, dimR)); in DMPlexLocatePoint_Hex_3D_Internal()
734 PetscScalar *coords = NULL; in DMPlexCreateGridHash() local
738 PetscCall(DMPlexGetCellCoordinates(dm, c, &isDG, &numCoords, &array, &coords)); in DMPlexCreateGridHash()
739 …for (PetscInt i = 0; i < numCoords / cdim; ++i) PetscCall(PetscGridHashEnlarge(*box, &coords[i * c… in DMPlexCreateGridHash()
740 PetscCall(DMPlexRestoreCellCoordinates(dm, c, &isDG, &numCoords, &array, &coords)); in DMPlexCreateGridHash()
1018 PetscScalar *coords = NULL; in DMPlexComputeGridHash_Internal() local
1030 PetscCall(DMPlexGetCellCoordinates(dm, c, &isDG, &numCoords, &array, &coords)); in DMPlexComputeGridHash_Internal()
1031 PetscCall(PetscGridHashGetEnclosingBox(lbox, numCoords / cdim, coords, dboxes, boxes)); in DMPlexComputeGridHash_Internal()
1032 PetscCall(DMPlexRestoreCellCoordinates(dm, c, &isDG, &numCoords, &array, &coords)); in DMPlexComputeGridHash_Internal()
1467 PetscErrorCode DMPlexComputeProjection2Dto1D(PetscScalar coords[], PetscReal R[]) in DMPlexComputeProjection2Dto1D() argument
1469 const PetscReal x = PetscRealPart(coords[2] - coords[0]); in DMPlexComputeProjection2Dto1D()
1470 const PetscReal y = PetscRealPart(coords[3] - coords[1]); in DMPlexComputeProjection2Dto1D()
1478 coords[0] = 0.0; in DMPlexComputeProjection2Dto1D()
1479 coords[1] = r; in DMPlexComputeProjection2Dto1D()
1501 PetscErrorCode DMPlexComputeProjection3Dto1D(PetscScalar coords[], PetscReal R[]) in DMPlexComputeProjection3Dto1D() argument
1503 PetscReal x = PetscRealPart(coords[3] - coords[0]); in DMPlexComputeProjection3Dto1D()
1504 PetscReal y = PetscRealPart(coords[4] - coords[1]); in DMPlexComputeProjection3Dto1D()
1505 PetscReal z = PetscRealPart(coords[5] - coords[2]); in DMPlexComputeProjection3Dto1D()
1538 coords[0] = 0.0; in DMPlexComputeProjection3Dto1D()
1539 coords[1] = r; in DMPlexComputeProjection3Dto1D()
1540 coords[2] = 0.0; in DMPlexComputeProjection3Dto1D()
1564 PetscErrorCode DMPlexComputeProjection3Dto2D(PetscInt coordSize, PetscScalar coords[], PetscReal R[… in DMPlexComputeProjection3Dto2D() argument
1573 x1[d] = PetscRealPart(coords[1 * dim + d] - coords[0 * dim + d]); in DMPlexComputeProjection3Dto2D()
1574 x2[d] = PetscRealPart(coords[2 * dim + d] - coords[0 * dim + d]); in DMPlexComputeProjection3Dto2D()
1592 c[d] = PetscRealPart(coords[0 * dim + d]); in DMPlexComputeProjection3Dto2D()
1596 for (d = 0; d < dim; d++) y[d] = PetscRealPart(coords[p * dim + d]) - c[d]; in DMPlexComputeProjection3Dto2D()
1597 …for (d = 0; d < 2; d++) coords[p * 2 + d] = R[0 * dim + d] * y[0] + R[1 * dim + d] * y[1] + R[2 * … in DMPlexComputeProjection3Dto2D()
1602 PETSC_UNUSED static inline void Volume_Triangle_Internal(PetscReal *vol, PetscReal coords[]) in Volume_Triangle_Internal() argument
1615 const PetscReal x1 = coords[2] - coords[0], y1 = coords[3] - coords[1]; in Volume_Triangle_Internal()
1616 const PetscReal x2 = coords[4] - coords[0], y2 = coords[5] - coords[1]; in Volume_Triangle_Internal()
1627 PETSC_UNUSED static inline void Volume_Tetrahedron_Internal(PetscReal *vol, PetscReal coords[]) in Volume_Tetrahedron_Internal() argument
1642 …const PetscReal x1 = coords[3] - coords[0], y1 = coords[4] - coords[1], z1 = coords[5] - coords[2]; in Volume_Tetrahedron_Internal()
1643 …const PetscReal x2 = coords[6] - coords[0], y2 = coords[7] - coords[1], z2 = coords[8] - coords[2]; in Volume_Tetrahedron_Internal()
1644 …const PetscReal x3 = coords[9] - coords[0], y3 = coords[10] - coords[1], z3 = coords[11] - coords[… in Volume_Tetrahedron_Internal()
1661 static inline void Volume_Tetrahedron_Origin_Internal(PetscReal *vol, PetscReal coords[]) in Volume_Tetrahedron_Origin_Internal() argument
1664 DMPlex_Det3D_Internal(vol, coords); in Volume_Tetrahedron_Origin_Internal()
1672 const PetscScalar *coords; in DMPlexComputePointGeometry_Internal() local
1681 PetscCall(VecGetArrayRead(coordinates, &coords)); in DMPlexComputePointGeometry_Internal()
1683 for (d = 0; d < dim; d++) v0[d] = PetscRealPart(coords[off + d]); in DMPlexComputePointGeometry_Internal()
1685 PetscCall(VecRestoreArrayRead(coordinates, &coords)); in DMPlexComputePointGeometry_Internal()
1717 …m, PetscInt cell, PetscBool *isDG, PetscInt *Nc, const PetscScalar *array[], PetscScalar *coords[]) in DMPlexGetCellCoordinates() argument
1729 *coords = NULL; in DMPlexGetCellCoordinates()
1746 PetscCall(DMGetWorkArray(cdm, *Nc, MPIU_SCALAR, coords)); in DMPlexGetCellCoordinates()
1747 PetscCall(PetscArraycpy(*coords, ccoords, *Nc)); in DMPlexGetCellCoordinates()
1756 PetscCall(DMPlexVecGetOrientedClosure(cdm, cs, PETSC_FALSE, coordinates, cell, 0, Nc, coords)); in DMPlexGetCellCoordinates()
1779 …m, PetscInt cell, PetscBool *isDG, PetscInt *Nc, const PetscScalar *array[], PetscScalar *coords[]) in DMPlexRestoreCellCoordinates() argument
1788 PetscCall(DMRestoreWorkArray(cdm, *Nc, MPIU_SCALAR, coords)); in DMPlexRestoreCellCoordinates()
1793 PetscCall(DMPlexVecRestoreClosure(cdm, cs, coordinates, cell, Nc, coords)); in DMPlexRestoreCellCoordinates()
1801 PetscScalar *coords = NULL; in DMPlexComputeLineGeometry_Internal() local
1806 PetscCall(DMPlexGetCellCoordinates(dm, e, &isDG, &numCoords, &array, &coords)); in DMPlexComputeLineGeometry_Internal()
1814 for (d = 0; d < dim; d++) v0[d] = PetscRealPart(coords[d]); in DMPlexComputeLineGeometry_Internal()
1816 PetscCall(DMPlexComputeProjection3Dto1D(coords, R)); in DMPlexComputeLineGeometry_Internal()
1818 J0 = 0.5 * PetscRealPart(coords[1]); in DMPlexComputeLineGeometry_Internal()
1836 for (d = 0; d < dim; d++) v0[d] = PetscRealPart(coords[d]); in DMPlexComputeLineGeometry_Internal()
1838 PetscCall(DMPlexComputeProjection2Dto1D(coords, R)); in DMPlexComputeLineGeometry_Internal()
1840 J0 = 0.5 * PetscRealPart(coords[1]); in DMPlexComputeLineGeometry_Internal()
1852 for (d = 0; d < dim; d++) v0[d] = PetscRealPart(coords[d]); in DMPlexComputeLineGeometry_Internal()
1855 J[0] = 0.5 * (PetscRealPart(coords[1]) - PetscRealPart(coords[0])); in DMPlexComputeLineGeometry_Internal()
1864 PetscCall(DMPlexRestoreCellCoordinates(dm, e, &isDG, &numCoords, &array, &coords)); in DMPlexComputeLineGeometry_Internal()
1871 PetscScalar *coords = NULL; in DMPlexComputeTriangleGeometry_Internal() local
1876 PetscCall(DMPlexGetCellCoordinates(dm, e, &isDG, &numCoords, &array, &coords)); in DMPlexComputeTriangleGeometry_Internal()
1884 for (d = 0; d < dim; d++) v0[d] = PetscRealPart(coords[d]); in DMPlexComputeTriangleGeometry_Internal()
1886 PetscCall(DMPlexComputeProjection3Dto2D(numCoords, coords, R)); in DMPlexComputeTriangleGeometry_Internal()
1891 … pdim; f++) J0[d * dim + f] = 0.5 * (PetscRealPart(coords[(f + 1) * pdim + d]) - PetscRealPart(coo… in DMPlexComputeTriangleGeometry_Internal()
1908 for (d = 0; d < dim; d++) v0[d] = PetscRealPart(coords[d]); in DMPlexComputeTriangleGeometry_Internal()
1912 …f < dim; f++) J[d * dim + f] = 0.5 * (PetscRealPart(coords[(f + 1) * dim + d]) - PetscRealPart(coo… in DMPlexComputeTriangleGeometry_Internal()
1919 PetscCall(DMPlexRestoreCellCoordinates(dm, e, &isDG, &numCoords, &array, &coords)); in DMPlexComputeTriangleGeometry_Internal()
1926 PetscScalar *coords = NULL; in DMPlexComputeRectangleGeometry_Internal() local
1931 PetscCall(DMPlexGetCellCoordinates(dm, e, &isDG, &numCoords, &array, &coords)); in DMPlexComputeRectangleGeometry_Internal()
1946 for (d = 0; d < dim; d++) v[d] = PetscRealPart(coords[d]); in DMPlexComputeRectangleGeometry_Internal()
1948 PetscCall(DMPlexComputeProjection3Dto2D(numCoords, coords, R)); in DMPlexComputeRectangleGeometry_Internal()
1953 …J0[d * dim + 0] = 0.5 * (PetscRealPart(coords[vorder[1] * pdim + d]) - PetscRealPart(coords[vorder… in DMPlexComputeRectangleGeometry_Internal()
1954 …J0[d * dim + 1] = 0.5 * (PetscRealPart(coords[vorder[2] * pdim + d]) - PetscRealPart(coords[vorder… in DMPlexComputeRectangleGeometry_Internal()
1971 for (d = 0; d < dim; d++) v[d] = PetscRealPart(coords[d]); in DMPlexComputeRectangleGeometry_Internal()
1975 …J[d * dim + 0] = 0.5 * (PetscRealPart(coords[vorder[1] * dim + d]) - PetscRealPart(coords[vorder[0… in DMPlexComputeRectangleGeometry_Internal()
1976 …J[d * dim + 1] = 0.5 * (PetscRealPart(coords[vorder[3] * dim + d]) - PetscRealPart(coords[vorder[0… in DMPlexComputeRectangleGeometry_Internal()
2003 for (j = 0; j < dim; j++) zOrder[dim * i + j] = PetscRealPart(coords[dim * zi + j]); in DMPlexComputeRectangleGeometry_Internal()
2074 PetscCall(DMPlexRestoreCellCoordinates(dm, e, &isDG, &numCoords, &array, &coords)); in DMPlexComputeRectangleGeometry_Internal()
2081 PetscScalar *coords = NULL; in DMPlexComputeTetrahedronGeometry_Internal() local
2087 PetscCall(DMPlexGetCellCoordinates(dm, e, &isDG, &numCoords, &array, &coords)); in DMPlexComputeTetrahedronGeometry_Internal()
2091 for (d = 0; d < dim; d++) v0[d] = PetscRealPart(coords[d]); in DMPlexComputeTetrahedronGeometry_Internal()
2096 … J[d * dim + 0] = 0.5 * (PetscRealPart(coords[2 * dim + d]) - PetscRealPart(coords[0 * dim + d])); in DMPlexComputeTetrahedronGeometry_Internal()
2097 … J[d * dim + 1] = 0.5 * (PetscRealPart(coords[1 * dim + d]) - PetscRealPart(coords[0 * dim + d])); in DMPlexComputeTetrahedronGeometry_Internal()
2098 … J[d * dim + 2] = 0.5 * (PetscRealPart(coords[3 * dim + d]) - PetscRealPart(coords[0 * dim + d])); in DMPlexComputeTetrahedronGeometry_Internal()
2104 PetscCall(DMPlexRestoreCellCoordinates(dm, e, &isDG, &numCoords, &array, &coords)); in DMPlexComputeTetrahedronGeometry_Internal()
2111 PetscScalar *coords = NULL; in DMPlexComputeHexahedronGeometry_Internal() local
2117 PetscCall(DMPlexGetCellCoordinates(dm, e, &isDG, &numCoords, &array, &coords)); in DMPlexComputeHexahedronGeometry_Internal()
2122 for (d = 0; d < dim; d++) v[d] = PetscRealPart(coords[d]); in DMPlexComputeHexahedronGeometry_Internal()
2126 … J[d * dim + 0] = 0.5 * (PetscRealPart(coords[3 * dim + d]) - PetscRealPart(coords[0 * dim + d])); in DMPlexComputeHexahedronGeometry_Internal()
2127 … J[d * dim + 1] = 0.5 * (PetscRealPart(coords[1 * dim + d]) - PetscRealPart(coords[0 * dim + d])); in DMPlexComputeHexahedronGeometry_Internal()
2128 … J[d * dim + 2] = 0.5 * (PetscRealPart(coords[4 * dim + d]) - PetscRealPart(coords[0 * dim + d])); in DMPlexComputeHexahedronGeometry_Internal()
2146 for (j = 0; j < dim; j++) zOrder[dim * i + j] = PetscRealPart(coords[dim * zi + j]); in DMPlexComputeHexahedronGeometry_Internal()
2220 PetscCall(DMPlexRestoreCellCoordinates(dm, e, &isDG, &numCoords, &array, &coords)); in DMPlexComputeHexahedronGeometry_Internal()
2227 PetscScalar *coords = NULL; in DMPlexComputeTriangularPrismGeometry_Internal() local
2233 PetscCall(DMPlexGetCellCoordinates(dm, e, &isDG, &numCoords, &array, &coords)); in DMPlexComputeTriangularPrismGeometry_Internal()
2239 for (d = 0; d < dim; d++) v[d] = PetscRealPart(coords[d]); in DMPlexComputeTriangularPrismGeometry_Internal()
2243 … J[d * dim + 0] = 0.5 * (PetscRealPart(coords[2 * dim + d]) - PetscRealPart(coords[0 * dim + d])); in DMPlexComputeTriangularPrismGeometry_Internal()
2244 … J[d * dim + 1] = 0.5 * (PetscRealPart(coords[1 * dim + d]) - PetscRealPart(coords[0 * dim + d])); in DMPlexComputeTriangularPrismGeometry_Internal()
2245 … J[d * dim + 2] = 0.5 * (PetscRealPart(coords[4 * dim + d]) - PetscRealPart(coords[0 * dim + d])); in DMPlexComputeTriangularPrismGeometry_Internal()
2260 for (j = 0; j < dim; ++j) verts[dim * i + j] = PetscRealPart(coords[dim * i + j]); in DMPlexComputeTriangularPrismGeometry_Internal()
2361 PetscCall(DMPlexRestoreCellCoordinates(dm, e, &isDG, &numCoords, &array, &coords)); in DMPlexComputeTriangularPrismGeometry_Internal()
2492 PetscScalar *coords = NULL; in DMPlexComputeCellGeometryFEM_FE() local
2503 PetscCall(DMPlexGetCellCoordinates(dm, point, &isDG, &numCoords, &array, &coords)); in DMPlexComputeCellGeometryFEM_FE()
2539 …++i) v[q * cdim + i] += basis[(q * pdim + k) * cdim + i] * PetscRealPart(coords[vertex * cdim + i]… in DMPlexComputeCellGeometryFEM_FE()
2553 … + j] += basisDer[((q * pdim + k) * cdim + i) * dim + j] * PetscRealPart(coords[vertex * cdim + i]… in DMPlexComputeCellGeometryFEM_FE()
2581 PetscCall(DMPlexRestoreCellCoordinates(dm, point, &isDG, &numCoords, &array, &coords)); in DMPlexComputeCellGeometryFEM_FE()
2646 const PetscScalar *coords = NULL; in DMPlexComputeGeometryFVM_0D_Internal() local
2652 PetscCall(VecGetArrayRead(coordinates, &coords)); in DMPlexComputeGeometryFVM_0D_Internal()
2658 for (d = 0; d < dof; d++) centroid[d] = PetscRealPart(coords[off + d]); in DMPlexComputeGeometryFVM_0D_Internal()
2673 for (d = 0; d < dof; d++) normal[d] -= PetscRealPart(coords[off + d]); in DMPlexComputeGeometryFVM_0D_Internal()
2683 PetscCall(VecRestoreArrayRead(coordinates, &coords)); in DMPlexComputeGeometryFVM_0D_Internal()
2690 PetscScalar *coords = NULL; in DMPlexComputeGeometryFVM_1D_Internal() local
2696 PetscCall(DMPlexGetCellCoordinates(dm, cell, &isDG, &coordSize, &array, &coords)); 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()
2708 normal[0] = -PetscRealPart(coords[1] - coords[cdim + 1]); in DMPlexComputeGeometryFVM_1D_Internal()
2709 normal[1] = PetscRealPart(coords[0] - coords[cdim + 0]); in DMPlexComputeGeometryFVM_1D_Internal()
2722 for (d = 0; d < cdim; ++d) *vol += PetscSqr(PetscRealPart(coords[d] - coords[cdim + d])); in DMPlexComputeGeometryFVM_1D_Internal()
2725 PetscCall(DMPlexRestoreCellCoordinates(dm, cell, &isDG, &coordSize, &array, &coords)); in DMPlexComputeGeometryFVM_1D_Internal()
2734 PetscScalar *coords = NULL; in DMPlexComputeGeometryFVM_2D_Internal() local
2753 PetscCall(DMPlexGetCellCoordinates(dm, cell, &isDG, &coordSize, &array, &coords)); in DMPlexComputeGeometryFVM_2D_Internal()
2757 for (d = 0; d < cdim; d++) origin[d] = PetscRealPart(coords[d]); in DMPlexComputeGeometryFVM_2D_Internal()
2761 e0[d] = PetscRealPart(coords[cdim * fv[p + 1] + d]) - origin[d]; in DMPlexComputeGeometryFVM_2D_Internal()
2762 e1[d] = PetscRealPart(coords[cdim * fv[p + 2] + d]) - origin[d]; in DMPlexComputeGeometryFVM_2D_Internal()
2772 …= 0; d < cdim; d++) c[d] += a * PetscRealPart(origin[d] + coords[cdim * fv[p + 1] + d] + coords[cd… in DMPlexComputeGeometryFVM_2D_Internal()
2790 PetscCall(DMPlexRestoreCellCoordinates(dm, cell, &isDG, &coordSize, &array, &coords)); in DMPlexComputeGeometryFVM_2D_Internal()
2799 PetscScalar *coords = NULL; in DMPlexComputeGeometryFVM_3D_Internal() local
2829 PetscCall(DMPlexGetCellCoordinates(dm, cell, &isDG, &coordSize, &array, &coords)); in DMPlexComputeGeometryFVM_3D_Internal()
2837 for (d = 0; d < dim; d++) origin[d] = PetscRealPart(coords[d]); in DMPlexComputeGeometryFVM_3D_Internal()
2841 coordsTmp[0 * dim + d] = PetscRealPart(coords[faces[fOff + 0] * dim + d]) - origin[d]; in DMPlexComputeGeometryFVM_3D_Internal()
2842 coordsTmp[1 * dim + d] = PetscRealPart(coords[faces[fOff + 1] * dim + d]) - origin[d]; in DMPlexComputeGeometryFVM_3D_Internal()
2843 coordsTmp[2 * dim + d] = PetscRealPart(coords[faces[fOff + 2] * dim + d]) - origin[d]; in DMPlexComputeGeometryFVM_3D_Internal()
2866 coordsTmp[0 * dim + d] = PetscRealPart(coords[faces[fOff + fv[0]] * dim + d]) - origin[d]; in DMPlexComputeGeometryFVM_3D_Internal()
2867 coordsTmp[1 * dim + d] = PetscRealPart(coords[faces[fOff + fv[1]] * dim + d]) - origin[d]; in DMPlexComputeGeometryFVM_3D_Internal()
2868 coordsTmp[2 * dim + d] = PetscRealPart(coords[faces[fOff + fv[3]] * dim + d]) - origin[d]; in DMPlexComputeGeometryFVM_3D_Internal()
2880 coordsTmp[0 * dim + d] = PetscRealPart(coords[faces[fOff + fv[1]] * dim + d]) - origin[d]; in DMPlexComputeGeometryFVM_3D_Internal()
2881 coordsTmp[1 * dim + d] = PetscRealPart(coords[faces[fOff + fv[2]] * dim + d]) - origin[d]; in DMPlexComputeGeometryFVM_3D_Internal()
2882 coordsTmp[2 * dim + d] = PetscRealPart(coords[faces[fOff + fv[3]] * dim + d]) - origin[d]; in DMPlexComputeGeometryFVM_3D_Internal()
2900 PetscCall(DMPlexRestoreCellCoordinates(dm, cell, &isDG, &coordSize, &array, &coords)); in DMPlexComputeGeometryFVM_3D_Internal()
3550 …cInt numPoints, const PetscReal realCoords[], PetscReal refCoords[], Vec coords, PetscInt dimC, Pe… in DMPlexCoordinatesToReference_Tensor() argument
3559 PetscCall(DMPlexVecGetClosure(dm, NULL, coords, cell, &coordSize, &coordsScalar)); in DMPlexCoordinatesToReference_Tensor()
3649 PetscCall(DMPlexVecRestoreClosure(dm, NULL, coords, cell, &coordSize, &coordsScalar)); in DMPlexCoordinatesToReference_Tensor()
3653 …cInt numPoints, const PetscReal refCoords[], PetscReal realCoords[], Vec coords, PetscInt dimC, Pe… in DMPlexReferenceToCoordinates_Tensor() argument
3661 PetscCall(DMPlexVecGetClosure(dm, NULL, coords, cell, &coordSize, &coordsScalar)); in DMPlexReferenceToCoordinates_Tensor()
3723 PetscCall(DMPlexVecRestoreClosure(dm, NULL, coords, cell, &coordSize, &coordsScalar)); in DMPlexReferenceToCoordinates_Tensor()
3727 …cInt numPoints, const PetscReal realCoords[], PetscReal refCoords[], Vec coords, PetscInt Nc, Pets… in DMPlexCoordinatesToReference_FE() argument
3741 …PetscCall(DMPlexVecGetOrientedClosure(dm, NULL, PETSC_FALSE, coords, cell, 0, &coordSize, &nodes)); in DMPlexCoordinatesToReference_FE()
3787 PetscCall(DMPlexVecRestoreClosure(dm, NULL, coords, cell, &coordSize, &nodes)); in DMPlexCoordinatesToReference_FE()
3792 …cInt numPoints, const PetscReal refCoords[], PetscReal realCoords[], Vec coords, PetscInt Nc, Pets… in DMPlexReferenceToCoordinates_FE() argument
3804 …PetscCall(DMPlexVecGetOrientedClosure(dm, NULL, PETSC_FALSE, coords, cell, 0, &coordSize, &nodes)); in DMPlexReferenceToCoordinates_FE()
3824 PetscCall(DMPlexVecRestoreClosure(dm, NULL, coords, cell, &coordSize, &nodes)); in DMPlexReferenceToCoordinates_FE()
3858 Vec coords; in DMPlexCoordinatesToReference() local
3867 PetscCall(DMGetCoordinatesLocal(dm, &coords)); in DMPlexCoordinatesToReference()
3908 …oordinatesToReference_Tensor(coordDM, cell, numPoints, realCoords, refCoords, coords, dimC, dimR)); in DMPlexCoordinatesToReference()
3911 …natesToReference_FE(coordDM, fe, cell, numPoints, realCoords, refCoords, coords, dimC, dimR, 7, NU… in DMPlexCoordinatesToReference()
3941 Vec coords; in DMPlexReferenceToCoordinates() local
3950 PetscCall(DMGetCoordinatesLocal(dm, &coords)); in DMPlexReferenceToCoordinates()
3990 …eferenceToCoordinates_Tensor(coordDM, cell, numPoints, refCoords, realCoords, coords, dimC, dimR)); in DMPlexReferenceToCoordinates()
3993 …eferenceToCoordinates_FE(coordDM, fe, cell, numPoints, refCoords, realCoords, coords, dimC, dimR)); in DMPlexReferenceToCoordinates()
4011 …t, const PetscReal x[], PetscInt numConstants, const PetscScalar constants[], PetscScalar coords[]) in coordMap_shear() argument
4017 for (c = 0; c < Nc; ++c) coords[c] = u[c] + constants[c + 1] * u[ax]; in coordMap_shear()
4024 …t, const PetscReal x[], PetscInt numConstants, const PetscScalar constants[], PetscScalar coords[]) in coordMap_flare() argument
4030 for (c = 0; c < Nc; ++c) coords[c] = u[c] * (c == cf ? 1.0 : constants[c + 1] * u[cf]); in coordMap_flare()
4139 PetscScalar *coords, f[16]; in DMPlexRemapGeometry() local
4148 PetscCall(VecGetArrayWrite(lCoords, &coords)); in DMPlexRemapGeometry()
4154 …(*func)(dim, 1, 0, uOff, NULL, &coords[off], NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.0, NULL, … in DMPlexRemapGeometry()
4155 for (c = 0; c < cdim; ++c) coords[off + c] = f[c]; in DMPlexRemapGeometry()
4157 PetscCall(VecRestoreArrayWrite(lCoords, &coords)); in DMPlexRemapGeometry()