| petsc_ops.c (f545224771c1a6d188cc0fad9830d905771d2bc9) | petsc_ops.c (f0d883e9d475b280723bc0b83596a5da47df75e2) |
|---|---|
| 1// Copyright (c) 2017-2023, Lawrence Livermore National Security, LLC and other CEED contributors. 2// All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 3// 4// SPDX-License-Identifier: BSD-2-Clause 5// 6// This file is part of CEED: http://github.com/ceed 7 8#include "../include/petsc_ops.h" --- 288 unchanged lines hidden (view full) --- 297 } 298 299 PetscFunctionReturn(0); 300} 301 302/** 303 * @brief Apply FEM Operator defined by `OperatorApplyContext` to various input and output vectors 304 * | 1// Copyright (c) 2017-2023, Lawrence Livermore National Security, LLC and other CEED contributors. 2// All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 3// 4// SPDX-License-Identifier: BSD-2-Clause 5// 6// This file is part of CEED: http://github.com/ceed 7 8#include "../include/petsc_ops.h" --- 288 unchanged lines hidden (view full) --- 297 } 298 299 PetscFunctionReturn(0); 300} 301 302/** 303 * @brief Apply FEM Operator defined by `OperatorApplyContext` to various input and output vectors 304 * |
| 305 * @param X Input global `Vec`, maybe `NULL` 306 * @param X_loc Input local `Vec`, maybe `NULL` 307 * @param x_ceed Input `CeedVector`, maybe `CEED_VECTOR_NONE` 308 * @param y_ceed Output `CeedVector`, maybe `CEED_VECTOR_NONE` 309 * @param Y_loc Output local `Vec`, maybe `NULL` 310 * @param Y Output global `Vec`, maybe `NULL` 311 * @param ctx Context for the operator apply 312 * @param use_apply_add Whether to use `CeedOperatorApply` or `CeedOperatorApplyAdd` | 305 * @param[in] X Input global `Vec`, maybe `NULL` 306 * @param[in] X_loc Input local `Vec`, maybe `NULL` 307 * @param[in] x_ceed Input `CeedVector`, maybe `CEED_VECTOR_NONE` 308 * @param[in,out] y_ceed Output `CeedVector`, maybe `CEED_VECTOR_NONE` 309 * @param[in,out] Y_loc Output local `Vec`, maybe `NULL` 310 * @param[in,out] Y Output global `Vec`, maybe `NULL` 311 * @param[in] ctx Context for the operator apply 312 * @param[in] use_apply_add Whether to use `CeedOperatorApply` or `CeedOperatorApplyAdd` |
| 313 */ 314PetscErrorCode ApplyCeedOperator_Core(Vec X, Vec X_loc, CeedVector x_ceed, CeedVector y_ceed, Vec Y_loc, Vec Y, OperatorApplyContext ctx, 315 bool use_apply_add) { 316 PetscMemType x_mem_type, y_mem_type; 317 318 PetscFunctionBeginUser; 319 if (X) PetscCall(DMGlobalToLocal(ctx->dm_x, X, INSERT_VALUES, X_loc)); 320 if (X_loc) PetscCall(VecReadP2C(X_loc, &x_mem_type, x_ceed)); --- 149 unchanged lines hidden --- | 313 */ 314PetscErrorCode ApplyCeedOperator_Core(Vec X, Vec X_loc, CeedVector x_ceed, CeedVector y_ceed, Vec Y_loc, Vec Y, OperatorApplyContext ctx, 315 bool use_apply_add) { 316 PetscMemType x_mem_type, y_mem_type; 317 318 PetscFunctionBeginUser; 319 if (X) PetscCall(DMGlobalToLocal(ctx->dm_x, X, INSERT_VALUES, X_loc)); 320 if (X_loc) PetscCall(VecReadP2C(X_loc, &x_mem_type, x_ceed)); --- 149 unchanged lines hidden --- |