| petsc_ops.c (d0593705e733b5bdd5e4c173fe0008b11db2ed29) | petsc_ops.c (dcdae71a12e7586aa5b34629ddc5e415fada0864) |
|---|---|
| 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" --- 153 unchanged lines hidden (view full) --- 162/** 163 * @brief Create local PETSc Vecs for CeedOperator's active input/outputs 164 * 165 * This is primarily used for when the active input/ouput vector does not correspond to a `DM` object, and thus `DMCreateLocalVector` or 166 * `DMGetLocalVector` are not applicable. 167 * For example, if statitics are being store at quadrature points, a `DM`-created `Vec` will not have the 168 * correct size. 169 * | 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" --- 153 unchanged lines hidden (view full) --- 162/** 163 * @brief Create local PETSc Vecs for CeedOperator's active input/outputs 164 * 165 * This is primarily used for when the active input/ouput vector does not correspond to a `DM` object, and thus `DMCreateLocalVector` or 166 * `DMGetLocalVector` are not applicable. 167 * For example, if statitics are being store at quadrature points, a `DM`-created `Vec` will not have the 168 * correct size. 169 * |
| 170 * @param[in] dm DM overwhich the Vecs would be used 171 * @param[in] op Operator to make the Vecs for 172 * @param[out] input Vec for CeedOperator active input 173 * @param[out] output Vec for CeedOperator active output | 170 * @param[in] op Operator to make the Vecs for 171 * @param[in] vec_type `VecType` for the new Vecs 172 * @param[in] comm `MPI_Comm` for the new Vecs 173 * @param[out] input Vec for CeedOperator active input 174 * @param[out] output Vec for CeedOperator active output |
| 174 */ 175PetscErrorCode CeedOperatorCreateLocalVecs(CeedOperator op, VecType vec_type, MPI_Comm comm, Vec *input, Vec *output) { 176 CeedSize input_size, output_size; 177 Ceed ceed; 178 179 PetscFunctionBeginUser; 180 PetscCall(CeedOperatorGetCeed(op, &ceed)); 181 PetscCallCeed(ceed, CeedOperatorGetActiveVectorLengths(op, &input_size, &output_size)); --- 190 unchanged lines hidden --- | 175 */ 176PetscErrorCode CeedOperatorCreateLocalVecs(CeedOperator op, VecType vec_type, MPI_Comm comm, Vec *input, Vec *output) { 177 CeedSize input_size, output_size; 178 Ceed ceed; 179 180 PetscFunctionBeginUser; 181 PetscCall(CeedOperatorGetCeed(op, &ceed)); 182 PetscCallCeed(ceed, CeedOperatorGetActiveVectorLengths(op, &input_size, &output_size)); --- 190 unchanged lines hidden --- |