Lines Matching full:if

21   if (local_size) PetscCall(VecGetLocalSize(V_loc, local_size));  in DMGetLocalVectorInfo()
22 if (global_size) PetscCall(VecGetSize(V_loc, global_size)); in DMGetLocalVectorInfo()
23 if (vec_type) PetscCall(VecGetType(V_loc, vec_type)); in DMGetLocalVectorInfo()
34 if (local_size) PetscCall(VecGetLocalSize(V, local_size)); in DMGetGlobalVectorInfo()
35 if (global_size) PetscCall(VecGetSize(V, global_size)); in DMGetGlobalVectorInfo()
36 if (vec_type) PetscCall(VecGetType(V, vec_type)); in DMGetGlobalVectorInfo()
44 …* All passed in objects are reference copied and may be destroyed if desired (with the exception o…
51 …eedVector` for operator active input. May be `CEED_VECTOR_NONE` or `NULL`. If `NULL`, `CeedVector`…
53 …edVector` for operator active output. May be `CEED_VECTOR_NONE` or `NULL`. If `NULL`, `CeedVector`…
55 …aram[in] X_loc Local `Vec` for operator active input. If `NULL`, vector will be obtained if ne…
56 …ram[in] Y_loc Local `Vec` for operator active output. If `NULL`, vector will be obtained if ne…
68 if (dm_x) PetscCall(DMGetLocalVectorInfo(dm_x, &dm_X_size, NULL, NULL)); in OperatorApplyContextCreate()
69 if (dm_y) PetscCall(DMGetLocalVectorInfo(dm_y, &dm_Y_size, NULL, NULL)); in OperatorApplyContextCreate()
70 if (X_loc) { in OperatorApplyContextCreate()
74 if (dm_x) { in OperatorApplyContextCreate()
79 if (Y_loc) { in OperatorApplyContextCreate()
83 if (dm_y) { in OperatorApplyContextCreate()
88 if (x_ceed && x_ceed != CEED_VECTOR_NONE) { in OperatorApplyContextCreate()
92 if (dm_x) { in OperatorApplyContextCreate()
97 if (y_ceed && y_ceed != CEED_VECTOR_NONE) { in OperatorApplyContextCreate()
101 if (dm_y) { in OperatorApplyContextCreate()
111 if (dm_x) PetscCall(PetscObjectReference((PetscObject)dm_x)); in OperatorApplyContextCreate()
113 if (dm_y) PetscCall(PetscObjectReference((PetscObject)dm_y)); in OperatorApplyContextCreate()
116 if (X_loc) PetscCall(PetscObjectReference((PetscObject)X_loc)); in OperatorApplyContextCreate()
118 if (Y_loc) PetscCall(PetscObjectReference((PetscObject)Y_loc)); in OperatorApplyContextCreate()
122 if (x_ceed) PetscCallCeed(ceed, CeedVectorReferenceCopy(x_ceed, &(*ctx)->x_ceed)); in OperatorApplyContextCreate()
125 if (y_ceed) PetscCallCeed(ceed, CeedVectorReferenceCopy(y_ceed, &(*ctx)->y_ceed)); in OperatorApplyContextCreate()
140 if (!ctx) PetscFunctionReturn(PETSC_SUCCESS); in OperatorApplyContextDestroy()
171 …* For example, if statitics are being store at quadrature points, a `DM`-created `Vec` will not ha…
190 if (input) { in CeedOperatorCreateLocalVecs()
195 if (output) { in CeedOperatorCreateLocalVecs()
222 if (X) PetscCall(DMGlobalToLocal(ctx->dm_x, X, INSERT_VALUES, X_loc)); in ApplyCeedOperator_Core()
223 if (X_loc) PetscCall(VecReadPetscToCeed(X_loc, &x_mem_type, x_ceed)); in ApplyCeedOperator_Core()
225 if (Y_loc) PetscCall(VecPetscToCeed(Y_loc, &y_mem_type, y_ceed)); in ApplyCeedOperator_Core()
229if (use_apply_add) PetscCallCeed(ceed, CeedOperatorApplyAdd(ctx->op, x_ceed, y_ceed, CEED_REQUEST_… in ApplyCeedOperator_Core()
234 if (X_loc) PetscCall(VecReadCeedToPetsc(ctx->x_ceed, x_mem_type, X_loc)); in ApplyCeedOperator_Core()
236 if (Y_loc) PetscCall(VecCeedToPetsc(ctx->y_ceed, y_mem_type, Y_loc)); in ApplyCeedOperator_Core()
237 if (Y) PetscCall(DMLocalToGlobal(ctx->dm_y, Y_loc, ADD_VALUES, Y)); in ApplyCeedOperator_Core()
247 // Get local vectors (if needed) in ApplyCeedOperatorGlobalToGlobal()
248 if (!ctx->X_loc) PetscCall(DMGetLocalVector(ctx->dm_x, &X_loc)); in ApplyCeedOperatorGlobalToGlobal()
249 if (!ctx->Y_loc) PetscCall(DMGetLocalVector(ctx->dm_y, &Y_loc)); in ApplyCeedOperatorGlobalToGlobal()
253 // Restore local vector (if needed) in ApplyCeedOperatorGlobalToGlobal()
254 if (!ctx->X_loc) PetscCall(DMRestoreLocalVector(ctx->dm_x, &X_loc)); in ApplyCeedOperatorGlobalToGlobal()
255 if (!ctx->Y_loc) PetscCall(DMRestoreLocalVector(ctx->dm_y, &Y_loc)); in ApplyCeedOperatorGlobalToGlobal()
265 // Get local vectors (if needed) in ApplyCeedOperatorLocalToGlobal()
266 if (!ctx->Y_loc) PetscCall(DMGetLocalVector(ctx->dm_y, &Y_loc)); in ApplyCeedOperatorLocalToGlobal()
270 // Restore local vectors (if needed) in ApplyCeedOperatorLocalToGlobal()
271 if (!ctx->Y_loc) PetscCall(DMRestoreLocalVector(ctx->dm_y, &Y_loc)); in ApplyCeedOperatorLocalToGlobal()
279 // Get local vectors (if needed) in ApplyCeedOperatorGlobalToLocal()
280 if (!ctx->X_loc) PetscCall(DMGetLocalVector(ctx->dm_x, &X_loc)); in ApplyCeedOperatorGlobalToLocal()
284 // Restore local vector (if needed) in ApplyCeedOperatorGlobalToLocal()
285 if (!ctx->X_loc) PetscCall(DMRestoreLocalVector(ctx->dm_x, &X_loc)); in ApplyCeedOperatorGlobalToLocal()
304 …* Uses command-line flag with `ksp`'s prefix to determine if mat_ceed should be used directly or w…
305 * If `Amat` is to be assembled, then `Pmat` is equal to `Amat`.
307 …* If `Amat` uses `mat_ceed`, then `Pmat` is either assembled or uses `mat_ceed` based on the preco…
311 * @param[in] assemble Whether to assemble `Amat` and `Pmat` if they are not `mat_ceed`
319 { // Determine if Amat should be MATCEED or assembled in CreateSolveOperatorsFromMatCeed()
328 if (assemble_amat) { in CreateSolveOperatorsFromMatCeed()
330 if (assemble) PetscCall(MatCeedAssembleCOO(mat_ceed, *Amat)); in CreateSolveOperatorsFromMatCeed()
340 { // Determine if Pmat should be MATCEED or assembled in CreateSolveOperatorsFromMatCeed()
349 if (use_matceed_pmat) { in CreateSolveOperatorsFromMatCeed()
354 if (assemble) PetscCall(MatCeedAssembleCOO(mat_ceed, *Pmat)); in CreateSolveOperatorsFromMatCeed()