Lines Matching refs:dimC
527 PetscInt degree, dimR, dimC; in DMPlexLocatePoint_Quad_2D_Internal() local
538 PetscCall(DMGetDimension(cdm, &dimC)); in DMPlexLocatePoint_Quad_2D_Internal()
554 for (PetscInt d = 0; d < dimC; d++) pointR[d] = PetscRealPart(point[d]); 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()
559 PetscReal real[3], inverseError = 0, normPoint = DMPlex_NormD_Internal(dimC, pointR); in DMPlexLocatePoint_Quad_2D_Internal()
562 PetscCall(DMPlexReferenceToCoordinates_FE(cdm, fe, c, 1, ref, real, coords, dimC, dimR)); in DMPlexLocatePoint_Quad_2D_Internal()
563 inverseError = DMPlex_DistRealD_Internal(dimC, real, pointR); in DMPlexLocatePoint_Quad_2D_Internal()
643 PetscInt degree, dimR, dimC; in DMPlexLocatePoint_Hex_3D_Internal() local
654 PetscCall(DMGetDimension(cdm, &dimC)); in DMPlexLocatePoint_Hex_3D_Internal()
670 for (PetscInt d = 0; d < dimC; d++) pointR[d] = PetscRealPart(point[d]); 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()
675 PetscReal real[3], inverseError = 0, normPoint = DMPlex_NormD_Internal(dimC, pointR); in DMPlexLocatePoint_Hex_3D_Internal()
678 PetscCall(DMPlexReferenceToCoordinates_FE(cdm, fe, c, 1, ref, real, coords, dimC, dimR)); in DMPlexLocatePoint_Hex_3D_Internal()
679 inverseError = DMPlex_DistRealD_Internal(dimC, real, pointR); in DMPlexLocatePoint_Hex_3D_Internal()
3492 static PetscErrorCode DMPlexCoordinatesToReference_NewtonUpdate(PetscInt dimC, PetscInt dimR, Petsc… in DMPlexCoordinatesToReference_NewtonUpdate() argument
3497 if (dimC == dimR && dimR <= 3) { in DMPlexCoordinatesToReference_NewtonUpdate()
3531 for (m = 0; m < dimC; m++) guess[l] += PetscRealPart(invJ[l * dimC + m]) * resNeg[m]; in DMPlexCoordinatesToReference_NewtonUpdate()
3538 PetscCall(PetscBLASIntCast(dimC, &n)); in DMPlexCoordinatesToReference_NewtonUpdate()
3539 PetscCall(PetscBLASIntCast(dimC * dimC, &worksize)); in DMPlexCoordinatesToReference_NewtonUpdate()
3540 for (l = 0; l < dimC; l++) invJ[l] = resNeg[l]; in DMPlexCoordinatesToReference_NewtonUpdate()
3550 …nts, const PetscReal realCoords[], PetscReal refCoords[], Vec coords, PetscInt dimC, PetscInt dimR) in DMPlexCoordinatesToReference_Tensor() argument
3560 …k(coordSize >= dimC * numV, PETSC_COMM_SELF, PETSC_ERR_PLIB, "Expecting at least %" PetscInt_FMT "… in DMPlexCoordinatesToReference_Tensor()
3561 PetscCall(DMGetWorkArray(dm, 2 * coordSize + dimR + dimC, MPIU_REAL, &cellData)); in DMPlexCoordinatesToReference_Tensor()
3562 PetscCall(DMGetWorkArray(dm, 3 * dimR * dimC, MPIU_SCALAR, &J)); in DMPlexCoordinatesToReference_Tensor()
3567 invJ = &J[dimR * dimC]; in DMPlexCoordinatesToReference_Tensor()
3568 work = &J[2 * dimR * dimC]; in DMPlexCoordinatesToReference_Tensor()
3575 …for (j = 0; j < dimC; j++) cellCoords[dimC * i + j] = PetscRealPart(coordsScalar[dimC * plexI + j]… in DMPlexCoordinatesToReference_Tensor()
3583 …for (j = 0; j < dimC; j++) cellCoords[dimC * i + j] = PetscRealPart(coordsScalar[dimC * plexI + j]… in DMPlexCoordinatesToReference_Tensor()
3593 for (k = 0; k < dimC; k++) { in DMPlexCoordinatesToReference_Tensor()
3594 …cellCoeffs[dimC * j + k] = 0.5 * (cellCoords[dimC * (2 * j + 1) + k] + cellCoords[d… in DMPlexCoordinatesToReference_Tensor()
3595 …cellCoeffs[dimC * (j + (numV / 2)) + k] = 0.5 * (cellCoords[dimC * (2 * j + 1) + k] - cellCoords[d… in DMPlexCoordinatesToReference_Tensor()
3611 for (k = 0; k < dimC; k++) resNeg[k] = realCoords[dimC * j + k]; in DMPlexCoordinatesToReference_Tensor()
3612 for (k = 0; k < dimC * dimR; k++) J[k] = 0.; in DMPlexCoordinatesToReference_Tensor()
3630 for (l = 0; l < dimC; l++) { in DMPlexCoordinatesToReference_Tensor()
3631 PetscReal coeff = cellCoeffs[dimC * k + l]; in DMPlexCoordinatesToReference_Tensor()
3640 for (l = 0; l < dimC; l++) maxAbs = PetscMax(maxAbs, PetscAbsReal(resNeg[l])); in DMPlexCoordinatesToReference_Tensor()
3644 … PetscCall(DMPlexCoordinatesToReference_NewtonUpdate(dimC, dimR, J, invJ, work, resNeg, guess)); in DMPlexCoordinatesToReference_Tensor()
3647 PetscCall(DMRestoreWorkArray(dm, 3 * dimR * dimC, MPIU_SCALAR, &J)); in DMPlexCoordinatesToReference_Tensor()
3648 PetscCall(DMRestoreWorkArray(dm, 2 * coordSize + dimR + dimC, MPIU_REAL, &cellData)); in DMPlexCoordinatesToReference_Tensor()
3653 …nts, const PetscReal refCoords[], PetscReal realCoords[], Vec coords, PetscInt dimC, PetscInt dimR) in DMPlexReferenceToCoordinates_Tensor() argument
3662 …k(coordSize >= dimC * numV, PETSC_COMM_SELF, PETSC_ERR_PLIB, "Expecting at least %" PetscInt_FMT "… in DMPlexReferenceToCoordinates_Tensor()
3672 …for (j = 0; j < dimC; j++) cellCoords[dimC * i + j] = PetscRealPart(coordsScalar[dimC * plexI + j]… in DMPlexReferenceToCoordinates_Tensor()
3680 …for (j = 0; j < dimC; j++) cellCoords[dimC * i + j] = PetscRealPart(coordsScalar[dimC * plexI + j]… in DMPlexReferenceToCoordinates_Tensor()
3690 for (k = 0; k < dimC; k++) { in DMPlexReferenceToCoordinates_Tensor()
3691 …cellCoeffs[dimC * j + k] = 0.5 * (cellCoords[dimC * (2 * j + 1) + k] + cellCoords[d… in DMPlexReferenceToCoordinates_Tensor()
3692 …cellCoeffs[dimC * (j + (numV / 2)) + k] = 0.5 * (cellCoords[dimC * (2 * j + 1) + k] - cellCoords[d… in DMPlexReferenceToCoordinates_Tensor()
3702 PetscCall(PetscArrayzero(realCoords, numPoints * dimC)); in DMPlexReferenceToCoordinates_Tensor()
3705 PetscReal *mapped = &realCoords[dimC * j]; in DMPlexReferenceToCoordinates_Tensor()
3715 for (l = 0; l < dimC; l++) { in DMPlexReferenceToCoordinates_Tensor()
3716 PetscReal coeff = cellCoeffs[dimC * k + l]; in DMPlexReferenceToCoordinates_Tensor()
3855 PetscInt dimC, dimR, depth, i, cellHeight, height; in DMPlexCoordinatesToReference() local
3864 PetscCall(DMGetCoordinateDim(dm, &dimC)); in DMPlexCoordinatesToReference()
3865 if (dimR <= 0 || dimC <= 0 || numPoints <= 0) PetscFunctionReturn(PETSC_SUCCESS); in DMPlexCoordinatesToReference()
3897 PetscCall(DMGetWorkArray(dm, dimC + 2 * dimC * dimC, MPIU_REAL, &v0)); in DMPlexCoordinatesToReference()
3898 J = &v0[dimC]; in DMPlexCoordinatesToReference()
3899 invJ = &J[dimC * dimC]; in DMPlexCoordinatesToReference()
3904 CoordinatesRealToRef(dimC, dimR, x0, v0, invJ, &realCoords[dimC * i], &refCoords[dimR * i]); in DMPlexCoordinatesToReference()
3906 PetscCall(DMRestoreWorkArray(dm, dimC + 2 * dimC * dimC, MPIU_REAL, &v0)); in DMPlexCoordinatesToReference()
3908 …oordinatesToReference_Tensor(coordDM, cell, numPoints, realCoords, refCoords, coords, dimC, dimR)); in DMPlexCoordinatesToReference()
3911 …sToReference_FE(coordDM, fe, cell, numPoints, realCoords, refCoords, coords, dimC, dimR, 7, NULL)); in DMPlexCoordinatesToReference()
3938 PetscInt dimC, dimR, depth, i, cellHeight, height; in DMPlexReferenceToCoordinates() local
3947 PetscCall(DMGetCoordinateDim(dm, &dimC)); in DMPlexReferenceToCoordinates()
3948 if (dimR <= 0 || dimC <= 0 || numPoints <= 0) PetscFunctionReturn(PETSC_SUCCESS); in DMPlexReferenceToCoordinates()
3980 PetscCall(DMGetWorkArray(dm, dimC + 2 * dimC * dimC, MPIU_REAL, &v0)); in DMPlexReferenceToCoordinates()
3981 J = &v0[dimC]; in DMPlexReferenceToCoordinates()
3986 CoordinatesRefToReal(dimC, dimR, xi0, v0, J, &refCoords[dimR * i], &realCoords[dimC * i]); in DMPlexReferenceToCoordinates()
3988 PetscCall(DMRestoreWorkArray(dm, dimC + 2 * dimC * dimC, MPIU_REAL, &v0)); 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()