Home
last modified time | relevance | path

Searched refs:detJ (Results 1 – 25 of 34) sorted by relevance

12

/petsc/src/dm/dt/fe/interface/
H A Dfegeom.c35 PetscCall(PetscCalloc3(N * dimEmbed, &g->v, N * dimEmbed * dimEmbed, &g->J, N, &g->detJ)); in PetscFEGeomCreate()
59 PetscCall(PetscFree3((*geom)->v, (*geom)->J, (*geom)->detJ)); in PetscFEGeomDestroy()
105 (*chunkGeom)->detJ = PetscSafePointerPlusOffset(geom->detJ, Nq * cStart); in PetscFEGeomGetChunk()
176 pgeom->detJ = &geom->detJ[c * Np]; in PetscFEGeomGetPoint()
184 pgeom->detJ = &geom->detJ[c * Np + p]; in PetscFEGeomGetPoint()
229 pgeom->detJ = &geom->suppDetJ[0][c * Np]; in PetscFEGeomGetCellPoint()
233 pgeom->detJ = &geom->detJ[c * Np]; in PetscFEGeomGetCellPoint()
240 pgeom->detJ = &geom->suppDetJ[0][c * Np + p]; in PetscFEGeomGetCellPoint()
244 pgeom->detJ = &geom->detJ[c * Np + p]; in PetscFEGeomGetCellPoint()
270 DMPlex_Det3D_Internal(&geom->detJ[i], &geom->J[dE * dE * i]); in PetscFEGeomComplete()
[all …]
H A Dfe.c828 PetscReal v0[3], J[9], detJ; in PetscFEExpandFaceQuadrature() local
830 PetscCall(DMPlexComputeCellGeometryFEM(dm, faces[f], NULL, v0, J, NULL, &detJ)); in PetscFEExpandFaceQuadrature()
1102 PetscReal *xi, *v, *J, detJ; in PetscFECreatePointTraceDefault_Internal() local
1119 PetscCall(DMPlexComputeCellGeometryFEM(dm, refPoint, origin, v, J, NULL, &detJ)); in PetscFECreatePointTraceDefault_Internal()
2879 PetscCall(PetscMalloc1(Nq, &cgeom->detJ)); in PetscFECreateCellGeometry()
2884 …PetscCall(DMPlexComputeCellGeometryFEM(dm, 0, quad, cgeom->v, cgeom->J, cgeom->invJ, cgeom->detJ)); in PetscFECreateCellGeometry()
2894 PetscCall(PetscFree(cgeom->detJ)); in PetscFEDestroyCellGeometry()
/petsc/src/dm/impls/plex/tests/
H A Dex32.c7 PetscReal detJ, J[9]; in CheckMesh() local
16 PetscCall(DMPlexComputeCellGeometryFEM(dm, c, NULL, NULL, J, NULL, &detJ)); in CheckMesh()
17 …PetscCheck(detJ > 0.0, PETSC_COMM_SELF, PETSC_ERR_ARG_WRONG, "Mesh cell %" PetscInt_FMT " is inver… in CheckMesh()
H A Ddmplexcomputecellgeometryfem.F9035 …PetscReal :: J(tria_qpts*numDim**2), invJ(tria_qpts*numDim**2), v(tria_qpts*numDim), detJ(tria_qpt…
42 PetscCallA(DMPlexComputeCellGeometryFEM(dm, cStart, q, v, J, invJ, detJ, ierr))
62 …PetscReal :: J(quad_qpts*numDim**2), invJ(quad_qpts*numDim**2), v(quad_qpts*numDim), detJ(quad_qpt…
76 PetscCallA(DMPlexComputeCellGeometryFEM(dm, cStart, q, v, J, invJ, detJ, ierr))
H A Dex8.c17 PetscReal *v0, *J, *invJ, *detJ; /* FEM data */ member
56 …umCells * dim * dim, &options->J, numCells * dim * dim, &options->invJ, numCells, &options->detJ)); in ProcessOptions()
70 …sRealArray("-detJ", "Input Jacobian determinant for each cell", "ex8.c", options->detJ, &n, &flg)); in ProcessOptions()
74 PetscCall(PetscFree4(options->v0, options->J, options->invJ, options->detJ)); in ProcessOptions()
75 options->v0 = options->J = options->invJ = options->detJ = NULL; in ProcessOptions()
148 PetscReal v0[3], J[9], invJ[9], detJ; in CheckFEMGeometry() local
152 PetscCall(DMPlexComputeCellGeometryFEM(dm, cell, NULL, v0, J, invJ, &detJ)); in CheckFEMGeometry()
171 …ror(detJ, detJEx) < 10 * PETSC_SMALL, PETSC_COMM_SELF, PETSC_ERR_PLIB, "Invalid |J| = %g != %g dif… in CheckFEMGeometry()
637 PetscReal detJ = user.detJ ? user.detJ[c] : 0.0; in main() local
642 …PetscCall(CheckCell(user.dm, c + cStart, PETSC_FALSE, v0, J, invJ, detJ, centroid, normal, vol, NU… in main()
[all …]
/petsc/src/dm/dt/fe/impls/basic/
H A Dfebasic.c219 fegeom.detJ = &cgeom->detJ[e * Np]; in PetscFEIntegrate_Basic()
231 fegeom.detJ = &cgeom->detJ[e * Np + q]; in PetscFEIntegrate_Basic()
233 PetscCall(PetscDSSetCellParameters(ds, fegeom.detJ[0] * cellScale)); in PetscFEIntegrate_Basic()
234 w = fegeom.detJ[0] * quadWeights[q]; in PetscFEIntegrate_Basic()
236 PetscCall(PetscPrintf(PETSC_COMM_SELF, " detJ: %g\n", (double)fegeom.detJ[0])); in PetscFEIntegrate_Basic()
311 fegeom.detJ = NULL; in PetscFEIntegrateBd_Basic()
321 fegeom.detJ = &fgeom->detJ[e * Np]; in PetscFEIntegrateBd_Basic()
326 cgeom.detJ = &fgeom->suppDetJ[0][e * Np]; in PetscFEIntegrateBd_Basic()
338 fegeom.detJ = &fgeom->detJ[e * Np + q]; in PetscFEIntegrateBd_Basic()
343 cgeom.detJ = &fgeom->suppDetJ[0][e * Np + q]; in PetscFEIntegrateBd_Basic()
[all …]
/petsc/src/dm/impls/plex/tutorials/
H A Dex3f90.F9031 PetscReal :: detJ
67 PetscCallA(DMPlexComputeCellGeometryAffineFEM(dm, i, pv0, pJ, pinvJ, detJ, ierr))
/petsc/src/dm/impls/plex/
H A Dplexgeometry.c425 PetscReal v0, J, invJ, detJ; in DMPlexLocatePoint_Simplex_1D_Internal() local
429 PetscCall(DMPlexComputeCellGeometryFEM(dm, c, NULL, &v0, &J, &invJ, &detJ)); in DMPlexLocatePoint_Simplex_1D_Internal()
441 PetscReal x[3], v0[3], J[9], invJ[9], detJ; in DMPlexLocatePoint_Simplex_2D_Internal() local
446 PetscCall(DMPlexComputeCellGeometryFEM(dm, c, NULL, v0, J, invJ, &detJ)); in DMPlexLocatePoint_Simplex_2D_Internal()
461 PetscReal v0[2], J[4], invJ[4], detJ; in DMPlexClosestPoint_Simplex_2D_Internal() local
465 PetscCall(DMPlexComputeCellGeometryFEM(dm, c, NULL, v0, J, invJ, &detJ)); in DMPlexClosestPoint_Simplex_2D_Internal()
576 PetscReal v0[3], J[9], invJ[9], detJ; in DMPlexLocatePoint_Simplex_3D_Internal() local
583 PetscCall(DMPlexComputeCellGeometryFEM(dm, c, NULL, v0, J, invJ, &detJ)); in DMPlexLocatePoint_Simplex_3D_Internal()
1668 …metry_Internal(DM dm, PetscInt e, PetscReal v0[], PetscReal J[], PetscReal invJ[], PetscReal *detJ) in DMPlexComputePointGeometry_Internal() argument
1686 *detJ = 1.; in DMPlexComputePointGeometry_Internal()
[all …]
H A Dplexproject.c278 fegeom.detJ = cgeom->detJ; in DMProjectPoint_Field_Private()
282 fgeomN[0].detJ = cgeom->suppDetJ[0]; in DMProjectPoint_Field_Private()
285 fgeomN[1].detJ = cgeom->suppDetJ[1]; in DMProjectPoint_Field_Private()
325 fegeom.detJ = &cgeom->detJ[tp]; in DMProjectPoint_Field_Private()
329 fgeomN[0].detJ = &cgeom->suppDetJ[0][tp]; in DMProjectPoint_Field_Private()
332 fgeomN[1].detJ = &cgeom->suppDetJ[1][tp]; in DMProjectPoint_Field_Private()
443 fegeom.detJ = fgeom->detJ; in DMProjectPoint_BdField_Private()
448 cgeom.detJ = fgeom->suppDetJ[0]; in DMProjectPoint_BdField_Private()
453 fgeomN[0].detJ = fgeom->suppDetJ[0]; in DMProjectPoint_BdField_Private()
456 fgeomN[1].detJ = fgeom->suppDetJ[1]; in DMProjectPoint_BdField_Private()
[all …]
H A Dplexfem.c1504 …l, numComponents, &interpolant, coordDim * (Nq + 1), &coords, Nq, &fegeom.detJ, coordDim * coordDi… in DMPlexComputeL2DiffLocal()
1512 … PetscCall(DMPlexComputeCellGeometryFEM(dm, c, quad, coords, fegeom.J, fegeom.invJ, fegeom.detJ)); in DMPlexComputeL2DiffLocal()
1542 qgeom.detJ = &fegeom.detJ[q]; in DMPlexComputeL2DiffLocal()
1543detJ[q] > 0.0, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "Invalid determinant %g for element %" P… in DMPlexComputeL2DiffLocal()
1555 PetscCall(PetscFree6(funcVal, interpolant, coords, fegeom.detJ, fegeom.J, fegeom.invJ)); in DMPlexComputeL2DiffLocal()
1565 …ble)(PetscSqr(PetscRealPart(interpolant[fc] - funcVal[fc])) * wt * fegeom.detJ[q]), (double)PetscR… in DMPlexComputeL2DiffLocal()
1566 elemDiff += PetscSqr(PetscRealPart(interpolant[fc] - funcVal[fc])) * wt * fegeom.detJ[q]; in DMPlexComputeL2DiffLocal()
1576 PetscCall(PetscFree6(funcVal, interpolant, coords, fegeom.detJ, fegeom.J, fegeom.invJ)); in DMPlexComputeL2DiffLocal()
1621 …coordDim * coordDim * Nq, &fegeom.invJ, numComponents * coordDim, &interpolant, Nq, &fegeom.detJ)); in DMComputeL2GradientDiff_Plex()
1628 … PetscCall(DMPlexComputeCellGeometryFEM(dm, c, quad, coords, fegeom.J, fegeom.invJ, fegeom.detJ)); in DMComputeL2GradientDiff_Plex()
[all …]
/petsc/src/dm/field/impls/ds/
H A Ddmfieldds.c246 PetscReal *v, *J, *invJ, *detJ; in DMFieldEvaluate_DS() local
269 …herMax * dimR, &v, gatherMax * dimR * dimR, &J, gatherMax * dimR * dimR, &invJ, gatherMax, &detJ)); in DMFieldEvaluate_DS()
300 PetscCall(DMPlexComputeCellGeometryFEM(field->dm, c, quad, v, J, invJ, detJ)); in DMFieldEvaluate_DS()
440 PetscCall(PetscFree4(v, J, invJ, detJ)); in DMFieldEvaluate_DS()
507 vol += geom->detJ[i * Nq + k] * weights[k]; in DMFieldEvaluateFV_DS()
508 …for (j = 0; j < Nc; j++) sB[i * Nc + j] += geom->detJ[i * Nq + k] * weights[k] * sqB[(i * Nq + k) … in DMFieldEvaluateFV_DS()
521 vol += geom->detJ[i * Nq + k] * weights[k]; in DMFieldEvaluateFV_DS()
540 vol += geom->detJ[i * Nq + k] * weights[k]; in DMFieldEvaluateFV_DS()
547 …for (l = 0; l < dimC; l++) sD[(i * Nc + j) * dimC + l] += geom->detJ[i * Nq + k] * weights[k] * pD… in DMFieldEvaluateFV_DS()
561 vol += geom->detJ[i * Nq + k] * weights[k]; in DMFieldEvaluateFV_DS()
[all …]
/petsc/src/dm/impls/swarm/tests/
H A Dex2.c178 PetscReal *centroid, *coords, *xi0, *v0, *J, *invJ, detJ; in CreateParticles() local
223 PetscCall(DMPlexComputeCellGeometryFEM(dm, c, NULL, v0, J, invJ, &detJ)); /* affine */ in CreateParticles()
271 PetscReal *v0, *J, *invJ, detJ, *coords, *xi0; in CreateParticles_Shape() local
304 PetscCall(DMPlexComputeCellGeometryFEM(dm, c, NULL, v0, J, invJ, &detJ)); in CreateParticles_Shape()
308 vals[c * Nq + q] *= qweights[q] * detJ; in CreateParticles_Shape()
482 …ordDim * numComponents, &interpolant, coordDim * Nq, &coords, Nq, &fegeom.detJ, coordDim * coordDi… in InterpolateGradient()
497 …etscCall(DMPlexComputeCellGeometryFEM(dm, cell, quad, coords, fegeom.J, fegeom.invJ, fegeom.detJ)); in InterpolateGradient()
515detJ[q] > 0.0, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "Invalid determinant %g for element %" P… in InterpolateGradient()
521 …= 0; d < coordDim; ++d) grad[fc * coordDim + d] += interpolant[fc * dim + d] * wt * fegeom.detJ[q]; in InterpolateGradient()
544 PetscCall(PetscFree6(gradsum, interpolant, coords, fegeom.detJ, fegeom.J, fegeom.invJ)); in InterpolateGradient()
/petsc/src/tao/tutorials/
H A Dex3.c123 PetscReal v0[3], J[9], invJ[9], detJ; in CreateMesh() local
125 PetscCall(DMPlexComputeCellGeometryFEM(*dm, 0, NULL, v0, J, invJ, &detJ)); in CreateMesh()
126 if (detJ < 0) { in CreateMesh()
128 PetscCall(DMPlexComputeCellGeometryFEM(*dm, 0, NULL, v0, J, invJ, &detJ)); in CreateMesh()
129 PetscCheck(detJ >= 0, PETSC_COMM_SELF, PETSC_ERR_PLIB, "Something is wrong"); in CreateMesh()
/petsc/include/petsc/private/
H A Ddmpleximpl.h707 static inline void DMPlex_Invert2D_Internal(PetscReal invJ[], PetscReal J[], PetscReal detJ) in DMPlex_Invert2D_Internal() argument
710 const PetscReal invDet = detJ == 0 ? 1.0 : (PetscReal)1.0 / detJ; in DMPlex_Invert2D_Internal()
719 static inline void DMPlex_Invert3D_Internal(PetscReal invJ[], PetscReal J[], PetscReal detJ) in DMPlex_Invert3D_Internal() argument
722 const PetscReal invDet = detJ == 0 ? 1.0 : (PetscReal)1.0 / detJ; in DMPlex_Invert3D_Internal()
736 static inline void DMPlex_Det2D_Internal(PetscReal *detJ, const PetscReal J[]) in DMPlex_Det2D_Internal() argument
738 *detJ = J[0] * J[3] - J[1] * J[2]; in DMPlex_Det2D_Internal()
742 static inline void DMPlex_Det3D_Internal(PetscReal *detJ, const PetscReal J[]) in DMPlex_Det3D_Internal() argument
744 …*detJ = (J[0 * 3 + 0] * (J[1 * 3 + 1] * J[2 * 3 + 2] - J[1 * 3 + 2] * J[2 * 3 + 1]) + J[0 * 3 + 1]… in DMPlex_Det3D_Internal()
748 static inline void DMPlex_Det2D_Scalar_Internal(PetscReal *detJ, const PetscScalar J[]) in DMPlex_Det2D_Scalar_Internal() argument
750 *detJ = PetscRealPart(J[0]) * PetscRealPart(J[3]) - PetscRealPart(J[1]) * PetscRealPart(J[2]); in DMPlex_Det2D_Scalar_Internal()
[all …]
/petsc/src/snes/utils/dm/
H A Ddminterpolatesnes.c373 PetscReal v0, J, invJ, detJ, xir[1]; in DMInterpolate_Segment_Private() local
379 PetscCall(DMPlexComputeCellGeometryFEM(dm, c, NULL, &v0, &J, &invJ, &detJ)); in DMInterpolate_Segment_Private()
380 …PetscCheck(detJ > 0.0, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "Invalid determinant %g for elem… in DMInterpolate_Segment_Private()
400 PetscReal *v0, *J, *invJ, detJ; in DMInterpolate_Triangle_Private() local
407 PetscCall(DMPlexComputeCellGeometryFEM(dm, c, NULL, v0, J, invJ, &detJ)); in DMInterpolate_Triangle_Private()
408 …PetscCheck(detJ > 0.0, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "Invalid determinant %g for elem… in DMInterpolate_Triangle_Private()
428 PetscReal *v0, *J, *invJ, detJ; in DMInterpolate_Tetrahedron_Private() local
437 PetscCall(DMPlexComputeCellGeometryFEM(dm, c, NULL, v0, J, invJ, &detJ)); in DMInterpolate_Tetrahedron_Private()
438 …PetscCheck(detJ > 0.0, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "Invalid determinant %g for elem… in DMInterpolate_Tetrahedron_Private()
H A Ddmadapt.c912 …PetscCall(PetscCalloc6(Nc, &field, cdim * Nc, &gradient, cdim * Nq, &coords, Nq, &fegeom.detJ, cdi… in DMAdaptorComputeErrorIndicator_Gradient()
914 …scCall(DMPlexComputeCellGeometryFEM(plex, cell, quad, coords, fegeom.J, fegeom.invJ, fegeom.detJ)); in DMAdaptorComputeErrorIndicator_Gradient()
929 field[fc] += interpolant[fc] * wt * fegeom.detJ[q]; in DMAdaptorComputeErrorIndicator_Gradient()
930 …= 0; d < cdim; ++d) gradient[fc * cdim + d] += interpolantGrad[fc * dim + d] * wt * fegeom.detJ[q]; in DMAdaptorComputeErrorIndicator_Gradient()
942 PetscCall(PetscFree6(field, gradient, coords, fegeom.detJ, fegeom.J, fegeom.invJ)); in DMAdaptorComputeErrorIndicator_Gradient()
/petsc/src/dm/dt/tests/
H A Dex5.c47 PetscReal J[9], detJ; in main() local
66 PetscCall(DMPlexComputeCellGeometryFEM(dm, point, NULL, testFull, J, NULL, &detJ)); in main()
/petsc/src/dm/impls/swarm/
H A Dswarmpic.c1011 PetscReal v0[3], J[9], invJ[9], detJ, detJp = 2. / (gmax[0] - gmin[0]), xr[3], den; in DMSwarmComputeLocalSize() local
1014 PetscCall(DMPlexComputeCellGeometryFEM(dm, cell, NULL, v0, J, invJ, &detJ)); in DMSwarmComputeLocalSize()
1023 n_int[s] += (detJp * den) * (detJ * wq[q]) / (PetscReal)Ns; in DMSwarmComputeLocalSize()
1167 PetscReal v0[3], J[9], invJ[9], detJ; in DMSwarmInitializeCoordinates() local
1171 PetscCall(DMPlexComputeCellGeometryFEM(dm, c, NULL, v0, J, invJ, &detJ)); in DMSwarmInitializeCoordinates()
1310 PetscReal *xi, *v0, *J, *invJ, detJ = 1.0, v0ref[3] = {-1.0, -1.0, -1.0}; in DMProjectFieldLocal_Swarm() local
1336 fegeom.detJ = &detJ; in DMProjectFieldLocal_Swarm()
1368 PetscCall(DMPlexComputeCellGeometryFEM(dmIn, cell, NULL, v0, J, invJ, &detJ)); in DMProjectFieldLocal_Swarm()
H A Dswarm.c477 PetscReal *xi, *v0, *J, *invJ, detJ = 1.0, v0ref[3] = {-1.0, -1.0, -1.0}; in DMSwarmComputeMassMatrix_Private() local
595 PetscCall(DMPlexComputeCellGeometryFEM(dmf, cell, NULL, v0, J, invJ, &detJ)); in DMSwarmComputeMassMatrix_Private()
617 …c + c] += Tcoarse->T[0][(j * numFIndices + i * Nc + c) * Nc + c] * (useDeltaFunction ? 1.0 : detJ); in DMSwarmComputeMassMatrix_Private()
700 PetscReal *xi, *v0, *J, *invJ, detJ = 1.0, v0ref[3] = {-1.0, -1.0, -1.0}; in DMSwarmComputeMassMatrixSquare_Private() local
821 PetscCall(DMPlexComputeCellGeometryFEM(dmf, cell, NULL, v0, J, invJ, &detJ)); in DMSwarmComputeMassMatrixSquare_Private()
841 …umFIndices + i] += Tcoarse->T[0][(p * numFIndices + i) * Nc + c] * (useDeltaFunction ? 1.0 : detJ); in DMSwarmComputeMassMatrixSquare_Private()
951 PetscReal *xi, *v0, *J, *invJ, detJ = 1.0, v0ref[3] = {-1.0, -1.0, -1.0}; in DMSwarmComputeGradientMatrix_Private() local
1021 PetscCall(DMPlexComputeCellGeometryFEM(dm, cell, NULL, v0, J, invJ, &detJ)); in DMSwarmComputeGradientMatrix_Private()
1043 elemMat[(j * cdim + d) * numFIndices + i] += xi[d] * (useDeltaFunction ? 1.0 : detJ); in DMSwarmComputeGradientMatrix_Private()
2213 PetscReal *centroid, *coords, *xi0, *v0, *J, *invJ, detJ; in DMSwarmSetPointCoordinatesRandom() local
[all …]
/petsc/src/dm/impls/plex/transform/impls/refine/regular/
H A Dplexrefregular.c45 …lytopeType ct, PetscInt *Nf, PetscReal *v0[], PetscReal *J[], PetscReal *invJ[], PetscReal *detJ[]) in DMPlexRefineRegularGetAffineFaceTransforms() argument
98 if (detJ) *detJ = tri_detJ; in DMPlexRefineRegularGetAffineFaceTransforms()
105 if (detJ) *detJ = quad_detJ; in DMPlexRefineRegularGetAffineFaceTransforms()
/petsc/src/snes/tutorials/
H A Dex77.c56 static inline void Det2D(PetscReal *detJ, const PetscReal J[])
58 *detJ = J[0]*J[3] - J[1]*J[2];
62 static inline void Det3D(PetscReal *detJ, const PetscScalar J[]) in Det3D() argument
64 …*detJ = PetscRealPart(J[0 * 3 + 0] * (J[1 * 3 + 1] * J[2 * 3 + 2] - J[1 * 3 + 2] * J[2 * 3 + 1]) +… in Det3D()
/petsc/src/dm/dt/fe/impls/opencl/
H A Dfeopencl.c603 f_detJ[c] = (float)cgeom->detJ[c]; in PetscFEIntegrateResidual_OpenCL()
624 d_detJ[c] = (double)cgeom->detJ[c]; in PetscFEIntegrateResidual_OpenCL()
648 r_detJ[c] = cgeom->detJ[c]; in PetscFEIntegrateResidual_OpenCL()
/petsc/src/ts/tests/
H A Dex27.c67 PetscReal *centroid, *coords, *velocity, *xi0, *v0, *J, *invJ, detJ, *vals; in SetInitialCoordinates() local
97 PetscCall(DMPlexComputeCellGeometryFEM(dm, c, NULL, v0, J, invJ, &detJ)); /* affine */ in SetInitialCoordinates()
H A Dex28.c64 PetscReal *centroid, *coords, *xi0, *v0, *J, *invJ, detJ, *vals; in SetInitialCoordinates() local
96 PetscCall(DMPlexComputeCellGeometryFEM(dm, c, NULL, v0, J, invJ, &detJ)); /* affine */ in SetInitialCoordinates()
/petsc/include/
H A Dpetscfe.h50 …PetscReal *detJ; // detJ[Nc*Np]: The determinant of J, and if J is non-square it i… member

12