ceed-operator.c (6a6b797f790a7f197cde448212987b3ead5d18fa) ceed-operator.c (690992b2ef7dcef8d00e259f2fa17075fde4c330)
1// Copyright (c) 2017-2025, 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 <ceed-impl.h>

--- 161 unchanged lines hidden (view full) ---

170 fprintf(stream, "%s %" CeedInt_FMT " output field%s:\n", tabs, num_output_fields, num_output_fields > 1 ? "s" : "");
171 for (CeedInt i = 0; i < num_output_fields; i++) {
172 CeedCall(CeedOperatorFieldView(op_output_fields[i], qf_output_fields[i], i, tabs, 0, stream));
173 }
174 return CEED_ERROR_SUCCESS;
175}
176
177/**
1// Copyright (c) 2017-2025, 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 <ceed-impl.h>

--- 161 unchanged lines hidden (view full) ---

170 fprintf(stream, "%s %" CeedInt_FMT " output field%s:\n", tabs, num_output_fields, num_output_fields > 1 ? "s" : "");
171 for (CeedInt i = 0; i < num_output_fields; i++) {
172 CeedCall(CeedOperatorFieldView(op_output_fields[i], qf_output_fields[i], i, tabs, 0, stream));
173 }
174 return CEED_ERROR_SUCCESS;
175}
176
177/**
178 @brief Get the number of tabs to indent for @ref CeedOperatorView() output
179
180 @param[in] op `CeedOperator` to get the number of view tabs
181 @param[out] num_tabs Number of view tabs
182
183 @return Error code: 0 - success, otherwise - failure
184
185 @ref Backend
186**/
187int CeedOperatorGetNumViewTabs(CeedOperator op, CeedInt *num_tabs) {
188 *num_tabs = op->num_tabs;
189 return CEED_ERROR_SUCCESS;
190}
191
192/**
193 @brief Find the active input vector `CeedBasis` for a non-composite `CeedOperator`.
194
195 Note: Caller is responsible for destroying the `active_basis` with @ref CeedBasisDestroy().
196
197 @param[in] op `CeedOperator` to find active `CeedBasis` for
198 @param[out] active_basis `CeedBasis` for active input vector or `NULL` for composite operator
199
200 @return An error code: 0 - success, otherwise - failure

--- 1451 unchanged lines hidden (view full) ---

1652**/
1653int CeedOperatorSetNumViewTabs(CeedOperator op, CeedInt num_tabs) {
1654 CeedCheck(num_tabs >= 0, CeedOperatorReturnCeed(op), CEED_ERROR_MINOR, "Number of view tabs must be non-negative");
1655 op->num_tabs = num_tabs;
1656 return CEED_ERROR_SUCCESS;
1657}
1658
1659/**
178 @brief Find the active input vector `CeedBasis` for a non-composite `CeedOperator`.
179
180 Note: Caller is responsible for destroying the `active_basis` with @ref CeedBasisDestroy().
181
182 @param[in] op `CeedOperator` to find active `CeedBasis` for
183 @param[out] active_basis `CeedBasis` for active input vector or `NULL` for composite operator
184
185 @return An error code: 0 - success, otherwise - failure

--- 1451 unchanged lines hidden (view full) ---

1637**/
1638int CeedOperatorSetNumViewTabs(CeedOperator op, CeedInt num_tabs) {
1639 CeedCheck(num_tabs >= 0, CeedOperatorReturnCeed(op), CEED_ERROR_MINOR, "Number of view tabs must be non-negative");
1640 op->num_tabs = num_tabs;
1641 return CEED_ERROR_SUCCESS;
1642}
1643
1644/**
1645 @brief Get the number of tabs to indent for @ref CeedOperatorView() output
1646
1647 @param[in] op `CeedOperator` to get the number of view tabs
1648 @param[out] num_tabs Number of view tabs
1649
1650 @return Error code: 0 - success, otherwise - failure
1651
1652 @ref User
1653**/
1654int CeedOperatorGetNumViewTabs(CeedOperator op, CeedInt *num_tabs) {
1655 *num_tabs = op->num_tabs;
1656 return CEED_ERROR_SUCCESS;
1657}
1658
1659/**
1660 @brief View a `CeedOperator`
1661
1662 @param[in] op `CeedOperator` to view
1663 @param[in] stream Stream to write; typically `stdout` or a file
1664
1665 @return Error code: 0 - success, otherwise - failure
1666
1667 @ref User

--- 777 unchanged lines hidden ---
1660 @brief View a `CeedOperator`
1661
1662 @param[in] op `CeedOperator` to view
1663 @param[in] stream Stream to write; typically `stdout` or a file
1664
1665 @return Error code: 0 - success, otherwise - failure
1666
1667 @ref User

--- 777 unchanged lines hidden ---