Lines Matching refs:invJ
425 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()
430 xi = invJ * (x - v0); 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()
449 for (PetscInt j = 0; j < embedDim; ++j) xi[i] += invJ[i * embedDim + j] * (x[j] - v0[j]); 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()
466 xi = invJ[0 * embedDim + 0] * (x - v0[0]) + invJ[0 * embedDim + 1] * (y - v0[1]); in DMPlexClosestPoint_Simplex_2D_Internal()
467 eta = invJ[1 * embedDim + 0] * (x - v0[0]) + invJ[1 * embedDim + 1] * (y - v0[1]); 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()
584 …xi = invJ[0 * embedDim + 0] * (x - v0[0]) + invJ[0 * embedDim + 1] * (y - v0[1]) + invJ[0 * embe… in DMPlexLocatePoint_Simplex_3D_Internal()
585 …eta = invJ[1 * embedDim + 0] * (x - v0[0]) + invJ[1 * embedDim + 1] * (y - v0[1]) + invJ[1 * embe… in DMPlexLocatePoint_Simplex_3D_Internal()
586 …zeta = invJ[2 * embedDim + 0] * (x - v0[0]) + invJ[2 * embedDim + 1] * (y - v0[1]) + invJ[2 * embe… in DMPlexLocatePoint_Simplex_3D_Internal()
1668 …metry_Internal(DM dm, PetscInt e, PetscReal v0[], PetscReal J[], PetscReal invJ[], PetscReal *detJ) in DMPlexComputePointGeometry_Internal() argument
1690 if (invJ) { in DMPlexComputePointGeometry_Internal()
1691 for (d = 0; d < dim * dim; d++) invJ[d] = 0.; in DMPlexComputePointGeometry_Internal()
1692 for (d = 0; d < dim; d++) invJ[d * dim + d] = 1.; in DMPlexComputePointGeometry_Internal()
1798 …metry_Internal(DM dm, PetscInt e, PetscReal v0[], PetscReal J[], PetscReal invJ[], PetscReal *detJ) in DMPlexComputeLineGeometry_Internal() argument
1807 …PetscCheck(!invJ || J, PETSC_COMM_SELF, PETSC_ERR_ARG_WRONG, "In order to compute invJ, J must not… in DMPlexComputeLineGeometry_Internal()
1829 if (invJ) DMPlex_Invert3D_Internal(invJ, J, *detJ); in DMPlexComputeLineGeometry_Internal()
1846 if (invJ) DMPlex_Invert2D_Internal(invJ, J, *detJ); in DMPlexComputeLineGeometry_Internal()
1858 if (invJ) { in DMPlexComputeLineGeometry_Internal()
1859 invJ[0] = 1.0 / J[0]; in DMPlexComputeLineGeometry_Internal()
1868 …metry_Internal(DM dm, PetscInt e, PetscReal v0[], PetscReal J[], PetscReal invJ[], PetscReal *detJ) in DMPlexComputeTriangleGeometry_Internal() argument
1877 …PetscCheck(!invJ || J, PETSC_COMM_SELF, PETSC_ERR_ARG_WRONG, "In order to compute invJ, J must not… in DMPlexComputeTriangleGeometry_Internal()
1903 if (invJ) DMPlex_Invert3D_Internal(invJ, J, *detJ); in DMPlexComputeTriangleGeometry_Internal()
1917 if (invJ) DMPlex_Invert2D_Internal(invJ, J, *detJ); in DMPlexComputeTriangleGeometry_Internal()
1923 …cInt Nq, const PetscReal points[], PetscReal v[], PetscReal J[], PetscReal invJ[], PetscReal *detJ) in DMPlexComputeRectangleGeometry_Internal() argument
1932 …PetscCheck(!invJ || J, PETSC_COMM_SELF, PETSC_ERR_ARG_WRONG, "In order to compute invJ, J must not… in DMPlexComputeRectangleGeometry_Internal()
1966 if (invJ) DMPlex_Invert3D_Internal(invJ, J, *detJ); in DMPlexComputeRectangleGeometry_Internal()
1981 if (invJ) DMPlex_Invert2D_Internal(invJ, J, *detJ); in DMPlexComputeRectangleGeometry_Internal()
2066 if (invJ) DMPlex_Invert3D_Internal(&invJ[i * dim * dim], &J[i * dim * dim], detJ[i]); in DMPlexComputeRectangleGeometry_Internal()
2069 if (invJ) DMPlex_Invert2D_Internal(&invJ[i * dim * dim], &J[i * dim * dim], detJ[i]); in DMPlexComputeRectangleGeometry_Internal()
2078 …metry_Internal(DM dm, PetscInt e, PetscReal v0[], PetscReal J[], PetscReal invJ[], PetscReal *detJ) in DMPlexComputeTetrahedronGeometry_Internal() argument
2088 …PetscCheck(!invJ || J, PETSC_COMM_SELF, PETSC_ERR_ARG_WRONG, "In order to compute invJ, J must not… in DMPlexComputeTetrahedronGeometry_Internal()
2103 if (invJ) DMPlex_Invert3D_Internal(invJ, J, *detJ); in DMPlexComputeTetrahedronGeometry_Internal()
2108 …cInt Nq, const PetscReal points[], PetscReal v[], PetscReal J[], PetscReal invJ[], PetscReal *detJ) in DMPlexComputeHexahedronGeometry_Internal() argument
2118 …PetscCheck(!invJ || J, PETSC_COMM_SELF, PETSC_ERR_ARG_WRONG, "In order to compute invJ, J must not… in DMPlexComputeHexahedronGeometry_Internal()
2133 if (invJ) DMPlex_Invert3D_Internal(invJ, J, *detJ); in DMPlexComputeHexahedronGeometry_Internal()
2216 if (invJ) DMPlex_Invert3D_Internal(&invJ[i * dim * dim], &J[i * dim * dim], detJ[i]); in DMPlexComputeHexahedronGeometry_Internal()
2224 …cInt Nq, const PetscReal points[], PetscReal v[], PetscReal J[], PetscReal invJ[], PetscReal *detJ) in DMPlexComputeTriangularPrismGeometry_Internal() argument
2234 …PetscCheck(!invJ || J, PETSC_COMM_SELF, PETSC_ERR_ARG_WRONG, "In order to compute invJ, J must not… in DMPlexComputeTriangularPrismGeometry_Internal()
2250 if (invJ) DMPlex_Invert3D_Internal(invJ, J, *detJ); in DMPlexComputeTriangularPrismGeometry_Internal()
2357 if (invJ) DMPlex_Invert3D_Internal(&invJ[i * dim * dim], &J[i * dim * dim], detJ[i]); in DMPlexComputeTriangularPrismGeometry_Internal()
2365 … PetscInt cell, PetscQuadrature quad, PetscReal *v, PetscReal *J, PetscReal *invJ, PetscReal *detJ) in DMPlexComputeCellGeometryFEM_Implicit() argument
2387 PetscCall(DMPlexComputePointGeometry_Internal(dm, cell, v, J, invJ, detJ)); in DMPlexComputeCellGeometryFEM_Implicit()
2393 else PetscCall(DMPlexComputeLineGeometry_Internal(dm, cell, v, J, invJ, detJ)); in DMPlexComputeCellGeometryFEM_Implicit()
2397 else PetscCall(DMPlexComputeTriangleGeometry_Internal(dm, cell, v, J, invJ, detJ)); in DMPlexComputeCellGeometryFEM_Implicit()
2400 …PetscCall(DMPlexComputeRectangleGeometry_Internal(dm, cell, PETSC_FALSE, Nq, points, v, J, invJ, d… in DMPlexComputeCellGeometryFEM_Implicit()
2404 …PetscCall(DMPlexComputeRectangleGeometry_Internal(dm, cell, PETSC_TRUE, Nq, points, v, J, invJ, de… in DMPlexComputeCellGeometryFEM_Implicit()
2409 else PetscCall(DMPlexComputeTetrahedronGeometry_Internal(dm, cell, v, J, invJ, detJ)); in DMPlexComputeCellGeometryFEM_Implicit()
2412 PetscCall(DMPlexComputeHexahedronGeometry_Internal(dm, cell, Nq, points, v, J, invJ, detJ)); in DMPlexComputeCellGeometryFEM_Implicit()
2416 … PetscCall(DMPlexComputeTriangularPrismGeometry_Internal(dm, cell, Nq, points, v, J, invJ, detJ)); in DMPlexComputeCellGeometryFEM_Implicit()
2438 if (invJ) { in DMPlexComputeCellGeometryFEM_Implicit()
2444 invJ[0] = 1. / J0[0]; in DMPlexComputeCellGeometryFEM_Implicit()
2447 DMPlex_Invert2D_Internal(invJ, J0, detJ0); in DMPlexComputeCellGeometryFEM_Implicit()
2450 DMPlex_Invert3D_Internal(invJ, J0, detJ0); in DMPlexComputeCellGeometryFEM_Implicit()
2456 for (j = 0; j < coordDim * coordDim; j++, k++) invJ[k] = invJ[j]; in DMPlexComputeCellGeometryFEM_Implicit()
2482 …ryAffineFEM(DM dm, PetscInt cell, PetscReal v0[], PetscReal J[], PetscReal invJ[], PetscReal *detJ) in DMPlexComputeCellGeometryAffineFEM() argument
2485 PetscCall(DMPlexComputeCellGeometryFEM_Implicit(dm, cell, NULL, v0, J, invJ, detJ)); in DMPlexComputeCellGeometryAffineFEM()
2489 …scInt point, PetscQuadrature quad, PetscReal v[], PetscReal J[], PetscReal invJ[], PetscReal *detJ) in DMPlexComputeCellGeometryFEM_FE() argument
2561 if (!detJ && !invJ) continue; in DMPlexComputeCellGeometryFEM_FE()
2566 if (invJ) DMPlex_Invert3D_Internal(&invJ[q * cdim * dim], &J[q * cdim * dim], detJt); in DMPlexComputeCellGeometryFEM_FE()
2570 if (invJ) DMPlex_Invert2D_Internal(&invJ[q * cdim * dim], &J[q * cdim * dim], detJt); in DMPlexComputeCellGeometryFEM_FE()
2574 if (invJ) invJ[q * cdim * dim] = 1.0 / detJt; in DMPlexComputeCellGeometryFEM_FE()
2578 …} else PetscCheck(!detJ && !invJ, PETSC_COMM_SELF, PETSC_ERR_ARG_SIZ, "Need J to compute invJ or d… in DMPlexComputeCellGeometryFEM_FE()
2612 …scInt cell, PetscQuadrature quad, PetscReal v[], PetscReal J[], PetscReal invJ[], PetscReal detJ[]) in DMPlexComputeCellGeometryFEM() argument
2637 … (dim != cdim)) PetscCall(DMPlexComputeCellGeometryFEM_Implicit(dm, cell, quad, v, J, invJ, detJ)); in DMPlexComputeCellGeometryFEM()
2638 else PetscCall(DMPlexComputeCellGeometryFEM_FE(dm, fe, cell, quad, v, J, invJ, detJ)); in DMPlexComputeCellGeometryFEM()
3492 …e_NewtonUpdate(PetscInt dimC, PetscInt dimR, PetscScalar *J, PetscScalar *invJ, PetscScalar *work,… in DMPlexCoordinatesToReference_NewtonUpdate() argument
3503 invJ[0] = 1. / J[0]; in DMPlexCoordinatesToReference_NewtonUpdate()
3508 invJ[0] = J[3] * idet; in DMPlexCoordinatesToReference_NewtonUpdate()
3509 invJ[1] = -J[1] * idet; in DMPlexCoordinatesToReference_NewtonUpdate()
3510 invJ[2] = -J[2] * idet; in DMPlexCoordinatesToReference_NewtonUpdate()
3511 invJ[3] = J[0] * idet; in DMPlexCoordinatesToReference_NewtonUpdate()
3514 invJ[0] = J[4] * J[8] - J[5] * J[7]; in DMPlexCoordinatesToReference_NewtonUpdate()
3515 invJ[1] = J[2] * J[7] - J[1] * J[8]; in DMPlexCoordinatesToReference_NewtonUpdate()
3516 invJ[2] = J[1] * J[5] - J[2] * J[4]; in DMPlexCoordinatesToReference_NewtonUpdate()
3517 det = invJ[0] * J[0] + invJ[1] * J[3] + invJ[2] * J[6]; in DMPlexCoordinatesToReference_NewtonUpdate()
3519 invJ[0] *= idet; in DMPlexCoordinatesToReference_NewtonUpdate()
3520 invJ[1] *= idet; in DMPlexCoordinatesToReference_NewtonUpdate()
3521 invJ[2] *= idet; in DMPlexCoordinatesToReference_NewtonUpdate()
3522 invJ[3] = idet * (J[5] * J[6] - J[3] * J[8]); in DMPlexCoordinatesToReference_NewtonUpdate()
3523 invJ[4] = idet * (J[0] * J[8] - J[2] * J[6]); in DMPlexCoordinatesToReference_NewtonUpdate()
3524 invJ[5] = idet * (J[2] * J[3] - J[0] * J[5]); in DMPlexCoordinatesToReference_NewtonUpdate()
3525 invJ[6] = idet * (J[3] * J[7] - J[4] * J[6]); in DMPlexCoordinatesToReference_NewtonUpdate()
3526 invJ[7] = idet * (J[1] * J[6] - J[0] * J[7]); in DMPlexCoordinatesToReference_NewtonUpdate()
3527 invJ[8] = idet * (J[0] * J[4] - J[1] * J[3]); in DMPlexCoordinatesToReference_NewtonUpdate()
3531 for (m = 0; m < dimC; m++) guess[l] += PetscRealPart(invJ[l * dimC + m]) * resNeg[m]; in DMPlexCoordinatesToReference_NewtonUpdate()
3540 for (l = 0; l < dimC; l++) invJ[l] = resNeg[l]; in DMPlexCoordinatesToReference_NewtonUpdate()
3542 …PetscCallBLAS("LAPACKgels", LAPACKgels_(&transpose, &m, &n, &one, J, &m, invJ, &n, work, &worksize… in DMPlexCoordinatesToReference_NewtonUpdate()
3545 for (l = 0; l < dimR; l++) guess[l] += PetscRealPart(invJ[l]); in DMPlexCoordinatesToReference_NewtonUpdate()
3555 PetscScalar *J, *invJ, *work; in DMPlexCoordinatesToReference_Tensor() local
3567 invJ = &J[dimR * dimC]; in DMPlexCoordinatesToReference_Tensor()
3644 … PetscCall(DMPlexCoordinatesToReference_NewtonUpdate(dimC, dimR, J, invJ, work, resNeg, guess)); in DMPlexCoordinatesToReference_Tensor()
3733 PetscScalar *J, *invJ, *work; in DMPlexCoordinatesToReference_FE() local
3753 invJ = &J[Nc * dimR]; in DMPlexCoordinatesToReference_FE()
3754 work = &invJ[Nc * dimR]; in DMPlexCoordinatesToReference_FE()
3781 PetscCall(DMPlexCoordinatesToReference_NewtonUpdate(Nc, dimR, J, invJ, work, resNeg, guess)); in DMPlexCoordinatesToReference_FE()
3895 PetscReal detJ, *v0, *J, *invJ; in DMPlexCoordinatesToReference() local
3899 invJ = &J[dimC * dimC]; in DMPlexCoordinatesToReference()
3900 PetscCall(DMPlexComputeCellGeometryAffineFEM(dm, cell, v0, J, invJ, &detJ)); in DMPlexCoordinatesToReference()
3904 CoordinatesRealToRef(dimC, dimR, x0, v0, invJ, &realCoords[dimC * i], &refCoords[dimR * i]); in DMPlexCoordinatesToReference()