Lines Matching full:if
17 if (local_size) PetscCall(VecGetLocalSize(V_loc, local_size)); in DMGetLocalVectorInfo()
18 if (global_size) PetscCall(VecGetSize(V_loc, global_size)); in DMGetLocalVectorInfo()
19 if (vec_type) PetscCall(VecGetType(V_loc, vec_type)); in DMGetLocalVectorInfo()
30 if (local_size) PetscCall(VecGetLocalSize(V, local_size)); in DMGetGlobalVectorInfo()
31 if (global_size) PetscCall(VecGetSize(V, global_size)); in DMGetGlobalVectorInfo()
32 if (vec_type) PetscCall(VecGetType(V, vec_type)); in DMGetGlobalVectorInfo()
40 …* All passed in objects are reference copied and may be destroyed if desired (with the exception o…
47 …eedVector` for operator active input. May be `CEED_VECTOR_NONE` or `NULL`. If `NULL`, `CeedVector`…
49 …edVector` for operator active output. May be `CEED_VECTOR_NONE` or `NULL`. If `NULL`, `CeedVector`…
51 …aram[in] X_loc Local `Vec` for operator active input. If `NULL`, vector will be obtained if ne…
52 …ram[in] Y_loc Local `Vec` for operator active output. If `NULL`, vector will be obtained if ne…
64 if (dm_x) PetscCall(DMGetLocalVectorInfo(dm_x, &dm_X_size, NULL, NULL)); in OperatorApplyContextCreate()
65 if (dm_y) PetscCall(DMGetLocalVectorInfo(dm_y, &dm_Y_size, NULL, NULL)); in OperatorApplyContextCreate()
66 if (X_loc) { in OperatorApplyContextCreate()
70 if (dm_x) in OperatorApplyContextCreate()
74 if (Y_loc) { in OperatorApplyContextCreate()
78 if (dm_y) in OperatorApplyContextCreate()
82 if (x_ceed && x_ceed != CEED_VECTOR_NONE) { in OperatorApplyContextCreate()
86 if (dm_x) in OperatorApplyContextCreate()
90 if (y_ceed && y_ceed != CEED_VECTOR_NONE) { in OperatorApplyContextCreate()
94 if (dm_y) in OperatorApplyContextCreate()
103 if (dm_x) PetscCall(PetscObjectReference((PetscObject)dm_x)); in OperatorApplyContextCreate()
105 if (dm_y) PetscCall(PetscObjectReference((PetscObject)dm_y)); in OperatorApplyContextCreate()
108 if (X_loc) PetscCall(PetscObjectReference((PetscObject)X_loc)); in OperatorApplyContextCreate()
110 if (Y_loc) PetscCall(PetscObjectReference((PetscObject)Y_loc)); in OperatorApplyContextCreate()
114 if (x_ceed) PetscCallCeed(ceed, CeedVectorReferenceCopy(x_ceed, &(*ctx)->x_ceed)); in OperatorApplyContextCreate()
117 if (y_ceed) PetscCallCeed(ceed, CeedVectorReferenceCopy(y_ceed, &(*ctx)->y_ceed)); in OperatorApplyContextCreate()
132 if (!ctx) PetscFunctionReturn(PETSC_SUCCESS); in OperatorApplyContextDestroy()
163 …* For example, if statitics are being store at quadrature points, a `DM`-created `Vec` will not ha…
182 if (input) { in CeedOperatorCreateLocalVecs()
187 if (output) { in CeedOperatorCreateLocalVecs()
214 if (X) PetscCall(DMGlobalToLocal(ctx->dm_x, X, INSERT_VALUES, X_loc)); in ApplyCeedOperator_Core()
215 if (X_loc) PetscCall(VecReadPetscToCeed(X_loc, &x_mem_type, x_ceed)); in ApplyCeedOperator_Core()
217 if (Y_loc) PetscCall(VecPetscToCeed(Y_loc, &y_mem_type, y_ceed)); in ApplyCeedOperator_Core()
221 …if (use_apply_add) PetscCallCeed(ceed, CeedOperatorApplyAdd(ctx->op, x_ceed, y_ceed, CEED_REQUEST_… in ApplyCeedOperator_Core()
226 if (X_loc) PetscCall(VecReadCeedToPetsc(ctx->x_ceed, x_mem_type, X_loc)); in ApplyCeedOperator_Core()
228 if (Y_loc) PetscCall(VecCeedToPetsc(ctx->y_ceed, y_mem_type, Y_loc)); in ApplyCeedOperator_Core()
229 if (Y) PetscCall(DMLocalToGlobal(ctx->dm_y, Y_loc, ADD_VALUES, Y)); in ApplyCeedOperator_Core()
239 // Get local vectors (if needed) in ApplyCeedOperatorGlobalToGlobal()
240 if (!ctx->X_loc) PetscCall(DMGetLocalVector(ctx->dm_x, &X_loc)); in ApplyCeedOperatorGlobalToGlobal()
241 if (!ctx->Y_loc) PetscCall(DMGetLocalVector(ctx->dm_y, &Y_loc)); in ApplyCeedOperatorGlobalToGlobal()
245 // Restore local vector (if needed) in ApplyCeedOperatorGlobalToGlobal()
246 if (!ctx->X_loc) PetscCall(DMRestoreLocalVector(ctx->dm_x, &X_loc)); in ApplyCeedOperatorGlobalToGlobal()
247 if (!ctx->Y_loc) PetscCall(DMRestoreLocalVector(ctx->dm_y, &Y_loc)); in ApplyCeedOperatorGlobalToGlobal()
257 // Get local vectors (if needed) in ApplyCeedOperatorLocalToGlobal()
258 if (!ctx->Y_loc) PetscCall(DMGetLocalVector(ctx->dm_y, &Y_loc)); in ApplyCeedOperatorLocalToGlobal()
262 // Restore local vectors (if needed) in ApplyCeedOperatorLocalToGlobal()
263 if (!ctx->Y_loc) PetscCall(DMRestoreLocalVector(ctx->dm_y, &Y_loc)); in ApplyCeedOperatorLocalToGlobal()
271 // Get local vectors (if needed) in ApplyCeedOperatorGlobalToLocal()
272 if (!ctx->X_loc) PetscCall(DMGetLocalVector(ctx->dm_x, &X_loc)); in ApplyCeedOperatorGlobalToLocal()
276 // Restore local vector (if needed) in ApplyCeedOperatorGlobalToLocal()
277 if (!ctx->X_loc) PetscCall(DMRestoreLocalVector(ctx->dm_x, &X_loc)); in ApplyCeedOperatorGlobalToLocal()
296 …* Uses command-line flag with `ksp`'s prefix to determine if mat_ceed should be used directly or w…
297 * If `Amat` is to be assembled, then `Pmat` is equal to `Amat`.
299 …* If `Amat` uses `mat_ceed`, then `Pmat` is either assembled or uses `mat_ceed` based on the preco…
303 * @param[in] assemble Whether to assemble `Amat` and `Pmat` if they are not `mat_ceed`
311 { // Determine if Amat should be MATCEED or assembled in CreateSolveOperatorsFromMatCeed()
322 if (add_postsolve_residual) { in CreateSolveOperatorsFromMatCeed()
327 if (assemble_amat) { in CreateSolveOperatorsFromMatCeed()
329 if (assemble) PetscCall(MatCeedAssembleCOO(mat_ceed, *Amat)); in CreateSolveOperatorsFromMatCeed()
339 { // Determine if Pmat should be MATCEED or assembled in CreateSolveOperatorsFromMatCeed()
348 if (use_matceed_pmat) { in CreateSolveOperatorsFromMatCeed()
353 if (assemble) PetscCall(MatCeedAssembleCOO(mat_ceed, *Pmat)); in CreateSolveOperatorsFromMatCeed()