| /petsc/src/dm/impls/plex/tests/ |
| H A D | ex25.c | 35 Vec locX; in test0() local 38 PetscCall(DMGetLocalVector(dm, &locX)); in test0() 39 PetscCall(DMRestoreLocalVector(dm, &locX)); in test0() 47 Vec locX, locX_t, locA; in test1() local 52 PetscCall(DMGetLocalVector(dm, &locX)); in test1() 55 PetscCall(DMPlexGetCellFields(dm, cells, locX, locX_t, locA, &u, &u_t, &a)); in test1() 56 PetscCall(DMPlexRestoreCellFields(dm, cells, locX, locX_t, locA, &u, &u_t, &a)); in test1() 57 PetscCall(DMRestoreLocalVector(dm, &locX)); in test1() 68 Vec locX, locX_t, locA; in test2() local 75 PetscCall(DMGetLocalVector(dm, &locX)); in test2() [all …]
|
| H A D | ex5.c | 1130 Vec locX, locF, locW; in TestAssembly() local 1150 PetscCall(DMGetLocalVector(dm, &locX)); in TestAssembly() 1151 PetscCall(PetscObjectSetName((PetscObject)locX, "Local Solution")); in TestAssembly() 1162 …lLocal(dm, 0.0, material, 1, &id, PETSC_DETERMINE, NULL, initialGuess, NULL, INSERT_VALUES, locX)); in TestAssembly() 1166 …lLocal(dm, 0.0, material, 1, &id, PETSC_DETERMINE, NULL, initialGuess, NULL, INSERT_VALUES, locX)); in TestAssembly() 1170 …abelLocal(dm, 0.0, fault, 1, &id, PETSC_DETERMINE, NULL, initialGuess, NULL, INSERT_VALUES, locX)); in TestAssembly() 1171 PetscCall(VecViewFromOptions(locX, NULL, "-local_solution_view")); in TestAssembly() 1193 …dFieldLabelLocal(dmFault, 0.0, depthLabel, 1, &id, PETSC_DETERMINE, NULL, locX, faultFuncs, INSERT… in TestAssembly() 1198 …dFieldLabelLocal(dmFault, 0.0, depthLabel, 1, &id, PETSC_DETERMINE, NULL, locX, faultFuncs, INSERT… in TestAssembly() 1229 …PetscCall(DMPlexComputeResidualHybridByKey(dm, keys, cohesiveCells, 0.0, locX, NULL, 0.0, locF, us… in TestAssembly() [all …]
|
| H A D | ex3.c | 655 Vec locX; in TestFVGrad() local 661 PetscCall(DMGetLocalVector(dmfv, &locX)); in TestFVGrad() 676 PetscCall(DMPlexVecSetClosure(dmfv, NULL, locX, c, cx, INSERT_ALL_VALUES)); in TestFVGrad() 679 PetscCall(DMPlexReconstructGradientsFVM(dmfv, locX, grad)); in TestFVGrad() 710 PetscCall(DMRestoreLocalVector(dmfv, &locX)); in TestFVGrad()
|
| /petsc/src/ts/utils/ |
| H A D | dmlocalts.c | 50 Vec locX, locX_t, locF; in TSComputeIFunction_DMLocal() local 59 PetscCall(DMGetLocalVector(dm, &locX)); in TSComputeIFunction_DMLocal() 62 PetscCall(VecZeroEntries(locX)); in TSComputeIFunction_DMLocal() 64 …if (dmlocalts->boundarylocal) PetscCall((*dmlocalts->boundarylocal)(dm, time, locX, locX_t, dmloca… in TSComputeIFunction_DMLocal() 65 PetscCall(DMGlobalToLocalBegin(dm, X, INSERT_VALUES, locX)); in TSComputeIFunction_DMLocal() 66 PetscCall(DMGlobalToLocalEnd(dm, X, INSERT_VALUES, locX)); in TSComputeIFunction_DMLocal() 71 …PetscCall((*dmlocalts->ifunctionlocal)(dm, time, locX, locX_t, locF, dmlocalts->ifunctionlocalctx)… in TSComputeIFunction_DMLocal() 76 PetscCall(DMRestoreLocalVector(dm, &locX)); in TSComputeIFunction_DMLocal() 92 Vec locX, locF; in TSComputeRHSFunction_DMLocal() local 100 PetscCall(DMGetLocalVector(dm, &locX)); in TSComputeRHSFunction_DMLocal() [all …]
|
| H A D | dmplexts.c | 49 PetscErrorCode DMPlexTSComputeRHSFunctionFVM(DM dm, PetscReal time, Vec locX, Vec F, PetscCtx ctx) in DMPlexTSComputeRHSFunctionFVM() argument 64 PetscCall(DMPlexComputeResidualByKey(plex, key, cellIS, time, locX, NULL, time, locF, ctx)); in DMPlexTSComputeRHSFunctionFVM() 88 PetscErrorCode DMPlexTSComputeBoundary(DM dm, PetscReal time, Vec locX, Vec locX_t, PetscCtx ctx) in DMPlexTSComputeBoundary() argument 111 PetscCall(DMPlexInsertBoundaryValues(plex, PETSC_TRUE, locX, time, faceGeometryFVM, NULL, NULL)); in DMPlexTSComputeBoundary() 134 PetscErrorCode DMPlexTSComputeIFunctionFEM(DM dm, PetscReal time, Vec locX, Vec locX_t, Vec locF, P… in DMPlexTSComputeIFunctionFEM() argument 164 PetscCall(DMPlexComputeResidualByKey(plex, key, cellIS, time, locX, locX_t, time, locF, ctx)); in DMPlexTSComputeIFunctionFEM() 191 PetscErrorCode DMPlexTSComputeIJacobianFEM(DM dm, PetscReal time, Vec locX, Vec locX_t, PetscReal X… in DMPlexTSComputeIJacobianFEM() argument 228 …PetscCall(DMPlexComputeJacobianByKey(plex, key, cellIS, time, X_tShift, locX, locX_t, Jac, JacP, c… in DMPlexTSComputeIJacobianFEM() 252 PetscErrorCode DMPlexTSComputeRHSFunctionFEM(DM dm, PetscReal time, Vec locX, Vec locG, PetscCtx ct… in DMPlexTSComputeRHSFunctionFEM() argument 282 PetscCall(DMPlexComputeResidualByKey(plex, key, cellIS, time, locX, NULL, time, locG, ctx)); in DMPlexTSComputeRHSFunctionFEM()
|
| /petsc/src/ts/utils/libceed/ |
| H A D | dmplextsceed.c | 7 PetscErrorCode DMPlexTSComputeRHSFunctionFVMCEED(DM dm, PetscReal time, Vec locX, Vec F, PetscCtx c… in DMPlexTSComputeRHSFunctionFVMCEED() argument 20 PetscCall(DMPlexInsertBoundaryValuesFVM(dm, fv, locX, time, NULL)); in DMPlexTSComputeRHSFunctionFVMCEED() 23 PetscCall(VecGetCeedVectorRead(locX, ceed, &clocX)); in DMPlexTSComputeRHSFunctionFVMCEED() 26 PetscCall(VecRestoreCeedVectorRead(locX, &clocX)); in DMPlexTSComputeRHSFunctionFVMCEED()
|
| /petsc/src/dm/impls/plex/ftn-custom/ |
| H A D | zplexfemf90.c | 21 PETSC_EXTERN void dmplexgetcellfields_(DM *dm, IS *cellIS, Vec *locX, Vec *locX_t, Vec *locA, F90Ar… in dmplexgetcellfields_() argument 29 *ierr = DMPlexGetCellFields(*dm, *cellIS, *locX, *locX_t, *locA, &u, &u_t, &a); in dmplexgetcellfields_() 53 PETSC_EXTERN void dmplexrestorecellfields_(DM *dm, IS *cellIS, Vec *locX, Vec *locX_t, Vec *locA, F… in dmplexrestorecellfields_() argument 63 …*ierr = DMPlexRestoreCellFields(*dm, *cellIS, *locX, NULL, NULL, &u, u_t ? &u_t : NULL, a ? &a : N… in dmplexrestorecellfields_() 73 PETSC_EXTERN void dmplexgetfacefields_(DM *dm, PetscInt *fStart, PetscInt *fEnd, Vec *locX, Vec *lo… in dmplexgetfacefields_() argument 79 …*ierr = DMPlexGetFaceFields(*dm, *fStart, *fEnd, *locX, *locX_t, *faceGeometry, *cellGeometry, *lo… in dmplexgetfacefields_() 91 PETSC_EXTERN void dmplexrestorefacefields_(DM *dm, PetscInt *fStart, PetscInt *fEnd, Vec *locX, Vec… in dmplexrestorefacefields_() argument 99 …*ierr = DMPlexRestoreFaceFields(*dm, *fStart, *fEnd, *locX, NULL, *faceGeometry, *cellGeometry, NU… in dmplexrestorefacefields_()
|
| /petsc/src/snes/utils/libceed/ |
| H A D | dmplexsnesceed.c | 9 PetscErrorCode DMPlexSNESComputeResidualCEED(DM dm, Vec locX, Vec locF, PetscCtx ctx) in DMPlexSNESComputeResidualCEED() argument 20 PetscCall(VecGetCeedVectorRead(locX, ceed, &clocX)); in DMPlexSNESComputeResidualCEED() 23 PetscCall(VecRestoreCeedVectorRead(locX, &clocX)); in DMPlexSNESComputeResidualCEED()
|
| /petsc/src/dm/impls/plex/ |
| H A D | plexfvm.c | 56 …etscFV fvm, PetscInt fStart, PetscInt fEnd, Vec faceGeometry, Vec cellGeometry, Vec locX, Vec grad) in DMPlexReconstructGradients_Internal() argument 80 PetscCall(VecGetArrayRead(locX, &x)); in DMPlexReconstructGradients_Internal() 153 PetscCall(VecRestoreArrayRead(locX, &x)); in DMPlexReconstructGradients_Internal() 172 PetscErrorCode DMPlexReconstructGradientsFVM(DM dm, Vec locX, Vec grad) in DMPlexReconstructGradientsFVM() argument 203 …econstructGradients_Internal(dm, fvm, fStart, fEnd, faceGeometryFVM, cellGeometryFVM, locX, grad)); in DMPlexReconstructGradientsFVM()
|
| H A D | plexfem.c | 915 …)(PetscInt, PetscReal, const PetscReal[], PetscInt, PetscScalar *, void *), PetscCtx ctx, Vec locX) in DMPlexInsertBoundaryValuesEssential() argument 926 …tFunctionLabelLocal(dm, time, label, numids, ids, Nc, comps, funcs, ctxs, INSERT_BC_VALUES, locX)); in DMPlexInsertBoundaryValuesEssential() 954 …etscReal, const PetscReal[], PetscInt, const PetscScalar[], PetscScalar[]), PetscCtx ctx, Vec locX) in DMPlexInsertBoundaryValuesEssentialField() argument 965 …jectFieldLabelLocal(dm, time, label, numids, ids, Nc, comps, locU, funcs, INSERT_BC_VALUES, locX)); in DMPlexInsertBoundaryValuesEssentialField() 995 …scReal[], const PetscReal[], PetscInt, const PetscScalar[], PetscScalar[]), PetscCtx ctx, Vec locX) in DMPlexInsertBoundaryValuesEssentialBdField() argument 1006 …ctBdFieldLabelLocal(dm, time, label, numids, ids, Nc, comps, locU, funcs, INSERT_BC_VALUES, locX)); in DMPlexInsertBoundaryValuesEssentialBdField() 1039 …etscReal *, const PetscReal *, const PetscScalar *, PetscScalar *, void *), PetscCtx ctx, Vec locX) in DMPlexInsertBoundaryValuesRiemann() argument 1072 PetscCall(VecGetArray(locX, &x)); in DMPlexInsertBoundaryValuesRiemann() 1123 PetscCall(VecRestoreArray(locX, &x)); in DMPlexInsertBoundaryValuesRiemann() 1141 PetscErrorCode DMPlexInsertBoundaryValues_Plex(DM dm, PetscBool insertEssential, Vec locX, PetscRea… in DMPlexInsertBoundaryValues_Plex() argument [all …]
|
| /petsc/src/snes/utils/dm/ |
| H A D | dmadapt.c | 693 static PetscErrorCode DMAdaptorPreAdapt(DMAdaptor adaptor, Vec locX) in DMAdaptorPreAdapt() argument 734 …PetscCall(DMPlexInsertBoundaryValues(plex, PETSC_TRUE, locX, 0.0, adaptor->faceGeom, adaptor->cell… in DMAdaptorPreAdapt() 753 …PetscCall(DMPlexInsertBoundaryValues(plex, PETSC_TRUE, locX, 0.0, adaptor->faceGeom, adaptor->cell… in DMAdaptorPreAdapt() 756 PetscCall(DMPlexReconstructGradientsFVM(plex, locX, grad)); in DMAdaptorPreAdapt() 852 static PetscErrorCode DMAdaptorComputeErrorIndicator_Gradient(DMAdaptor adaptor, Vec locX, Vec errV… in DMAdaptorComputeErrorIndicator_Gradient() argument 865 PetscCall(VecGetDM(locX, &dm)); in DMAdaptorComputeErrorIndicator_Gradient() 891 PetscCall(VecGetArrayRead(locX, &pointSols)); in DMAdaptorComputeErrorIndicator_Gradient() 896 PetscCall(VecRestoreArrayRead(locX, &pointSols)); in DMAdaptorComputeErrorIndicator_Gradient() 917 PetscCall(DMPlexVecGetClosure(plex, NULL, locX, cell, NULL, &x)); in DMAdaptorComputeErrorIndicator_Gradient() 936 PetscCall(DMPlexVecRestoreClosure(plex, NULL, locX, cell, NULL, &x)); in DMAdaptorComputeErrorIndicator_Gradient() [all …]
|
| /petsc/src/ts/tutorials/ |
| H A D | ex11.c | 1113 Vec grad, locGrad, locX, errVec; in adaptToleranceFVMSetUp() local 1132 PetscCall(DMCreateLocalVector(plex, &locX)); in adaptToleranceFVMSetUp() 1133 PetscCall(DMPlexInsertBoundaryValues(plex, PETSC_TRUE, locX, 0.0, faceGeom, cellGeom, NULL)); in adaptToleranceFVMSetUp() 1134 PetscCall(DMGlobalToLocalBegin(plex, sol, INSERT_VALUES, locX)); in adaptToleranceFVMSetUp() 1135 PetscCall(DMGlobalToLocalEnd(plex, sol, INSERT_VALUES, locX)); in adaptToleranceFVMSetUp() 1137 PetscCall(DMPlexReconstructGradientsFVM(plex, locX, grad)); in adaptToleranceFVMSetUp() 1145 PetscCall(VecGetArrayRead(locX, &pointVals)); in adaptToleranceFVMSetUp() 1167 PetscCall(VecRestoreArrayRead(locX, &pointVals)); in adaptToleranceFVMSetUp() 1171 PetscCall(VecDestroy(&locX)); in adaptToleranceFVMSetUp()
|
| H A D | ex30.c | 1425 static PetscErrorCode DMPlexTSComputeIFunctionFEM_Private(DM dm, PetscReal time, Vec locX, Vec locX… in DMPlexTSComputeIFunctionFEM_Private() argument 1437 PetscCall(DMPlexSNESComputeObjectiveFEM(dm, locX, vals, NULL)); in DMPlexTSComputeIFunctionFEM_Private() 1445 PetscCall(DMPlexTSComputeIFunctionFEM(dm, time, locX, work, locF, user)); in DMPlexTSComputeIFunctionFEM_Private() 1451 PetscCall(DMPlexTSComputeIFunctionFEM(dm, time, locX, locX_t, locF, user)); in DMPlexTSComputeIFunctionFEM_Private() 1456 static PetscErrorCode DMPlexTSComputeIJacobianFEM_Private(DM dm, PetscReal time, Vec locX, Vec locX… in DMPlexTSComputeIJacobianFEM_Private() argument 1464 PetscCall(DMPlexTSComputeIJacobianFEM(dm, time, locX, locX_t, 0.0, Jac, JacP, user)); in DMPlexTSComputeIJacobianFEM_Private() 1471 PetscCall(DMPlexTSComputeIJacobianFEM(dm, time, locX, locX_t, X_tShift, Jac, JacP, user)); in DMPlexTSComputeIJacobianFEM_Private()
|
| /petsc/src/dm/impls/swarm/tests/ |
| H A D | ex2.c | 439 static PetscErrorCode InterpolateGradient(DM dm, Vec locX, Vec locC) in InterpolateGradient() argument 498 PetscCall(DMPlexVecGetClosure(dm, NULL, locX, cell, NULL, &x)); in InterpolateGradient() 526 PetscCall(DMPlexVecRestoreClosure(dm, NULL, locX, cell, NULL, &x)); in InterpolateGradient()
|
| /petsc/src/ts/utils/dmplexlandau/ |
| H A D | plexland.c | 164 …Vec locX = locXArray[LAND_PACK_IDX(b_id, grid)], globX = globXArray[LAND_PACK_IDX(b_id, grid)… in LandauFormJacobian_Internal() local 166 PetscCall(VecDuplicate(locX, &locX2)); in LandauFormJacobian_Internal() 2606 Vec locX; in DMPlexLandauCreateMassMatrix() local 2608 PetscCall(DMGetLocalVector(plex, &locX)); in DMPlexLandauCreateMassMatrix() 2610 PetscCall(DMPlexSNESComputeJacobianFEM(plex, locX, subM[grid], subM[grid], ctx)); in DMPlexLandauCreateMassMatrix() 2611 PetscCall(DMRestoreLocalVector(plex, &locX)); in DMPlexLandauCreateMassMatrix()
|
| /petsc/src/binding/petsc4py/src/petsc4py/PETSc/ |
| H A D | DMPlex.pyx | 3217 def computeGradientClementInterpolant(self, Vec locX, Vec locC) -> Vec: argument 3224 locX 3234 CHKERR(DMPlexComputeGradientClementInterpolant(self.dm, locX.vec, locC.vec))
|