| ceed-qfunction.c (49aac155e7a09736f56fb3abac0f57dab29f7cbf) | ceed-qfunction.c (5330800f8a87f3cc5848b1cc2c3c90a0eb696cee) |
|---|---|
| 1// Copyright (c) 2017-2022, 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> --- 75 unchanged lines hidden (view full) --- 84 return CEED_ERROR_SUCCESS; 85} 86 87/** 88 @brief Set a CeedQFunction field, used by CeedQFunctionAddInput/Output 89 90 @param[out] f CeedQFunctionField 91 @param[in] field_name Name of QFunction field | 1// Copyright (c) 2017-2022, 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> --- 75 unchanged lines hidden (view full) --- 84 return CEED_ERROR_SUCCESS; 85} 86 87/** 88 @brief Set a CeedQFunction field, used by CeedQFunctionAddInput/Output 89 90 @param[out] f CeedQFunctionField 91 @param[in] field_name Name of QFunction field |
| 92 @param[in] size Size of QFunction field, (num_comp * dim) for @ref CEED_EVAL_GRAD or (num_comp * 1) for @ref CEED_EVAL_NONE, @ref 93CEED_EVAL_INTERP, and @ref CEED_EVAL_WEIGHT | 92 @param[in] size Size of QFunction field, (num_comp * 1) for @ref CEED_EVAL_NONE and @ref CEED_EVAL_WEIGHT, 93(num_comp * 1) for @ref CEED_EVAL_INTERP for an H^1 space or (num_comp * dim) for an H(div) or H(curl) space, 94(num_comp * dim) for @ref CEED_EVAL_GRAD, or (num_comp * 1) for @ref CEED_EVAL_DIV, and 95(num_comp * curl_dim) with curl_dim = 1 if dim < 3 else dim for @ref CEED_EVAL_CURL. |
| 94 @param[in] eval_mode \ref CEED_EVAL_NONE to use values directly, | 96 @param[in] eval_mode \ref CEED_EVAL_NONE to use values directly, |
| 97 \ref CEED_EVAL_WEIGHT to use quadrature weights, |
|
| 95 \ref CEED_EVAL_INTERP to use interpolated values, 96 \ref CEED_EVAL_GRAD to use gradients, | 98 \ref CEED_EVAL_INTERP to use interpolated values, 99 \ref CEED_EVAL_GRAD to use gradients, |
| 97 \ref CEED_EVAL_WEIGHT to use quadrature weights. | 100 \ref CEED_EVAL_DIV to use divergence, 101 \ref CEED_EVAL_CURL to use curl. |
| 98 99 @return An error code: 0 - success, otherwise - failure 100 101 @ref Developer 102**/ 103static int CeedQFunctionFieldSet(CeedQFunctionField *f, const char *field_name, CeedInt size, CeedEvalMode eval_mode) { 104 CeedCall(CeedCalloc(1, f)); 105 CeedCall(CeedStringAllocCopy(field_name, (char **)&(*f)->field_name)); --- 611 unchanged lines hidden (view full) --- 717 CeedCall(CeedQFunctionDestroy(qf_copy)); 718 *qf_copy = qf; 719 return CEED_ERROR_SUCCESS; 720} 721 722/** 723 @brief Add a CeedQFunction input 724 | 102 103 @return An error code: 0 - success, otherwise - failure 104 105 @ref Developer 106**/ 107static int CeedQFunctionFieldSet(CeedQFunctionField *f, const char *field_name, CeedInt size, CeedEvalMode eval_mode) { 108 CeedCall(CeedCalloc(1, f)); 109 CeedCall(CeedStringAllocCopy(field_name, (char **)&(*f)->field_name)); --- 611 unchanged lines hidden (view full) --- 721 CeedCall(CeedQFunctionDestroy(qf_copy)); 722 *qf_copy = qf; 723 return CEED_ERROR_SUCCESS; 724} 725 726/** 727 @brief Add a CeedQFunction input 728 |
| 725 @param[in,out] qf CeedQFunction 726 @param[in] field_name Name of QFunction field 727 @param[in] size Size of QFunction field, (num_comp * dim) for @ref CEED_EVAL_GRAD or (num_comp * 1) for @ref CEED_EVAL_NONE and @ref 728CEED_EVAL_INTERP 729 @param[in] eval_mode \ref CEED_EVAL_NONE to use values directly, 730 \ref CEED_EVAL_INTERP to use interpolated values, 731 \ref CEED_EVAL_GRAD to use gradients. | 729 @param[in,out] qf CeedQFunction 730 @param[in] field_name Name of QFunction field 731 @param[in] size Size of QFunction field, (num_comp * 1) for @ref CEED_EVAL_NONE, 732(num_comp * 1) for @ref CEED_EVAL_INTERP for an H^1 space or (num_comp * dim) for an H(div) or H(curl) space, 733(num_comp * dim) for @ref CEED_EVAL_GRAD, or (num_comp * 1) for @ref CEED_EVAL_DIV, and 734(num_comp * curl_dim) with curl_dim = 1 if dim < 3 else dim for @ref CEED_EVAL_CURL. 735 @param[in] eval_mode \ref CEED_EVAL_NONE to use values directly, 736 \ref CEED_EVAL_INTERP to use interpolated values, 737 \ref CEED_EVAL_GRAD to use gradients, 738 \ref CEED_EVAL_DIV to use divergence, 739 \ref CEED_EVAL_CURL to use curl. |
| 732 733 @return An error code: 0 - success, otherwise - failure 734 735 @ref User 736**/ 737int CeedQFunctionAddInput(CeedQFunction qf, const char *field_name, CeedInt size, CeedEvalMode eval_mode) { 738 if (qf->is_immutable) { 739 // LCOV_EXCL_START --- 24 unchanged lines hidden (view full) --- 764 return CEED_ERROR_SUCCESS; 765} 766 767/** 768 @brief Add a CeedQFunction output 769 770 @param[in,out] qf CeedQFunction 771 @param[in] field_name Name of QFunction field | 740 741 @return An error code: 0 - success, otherwise - failure 742 743 @ref User 744**/ 745int CeedQFunctionAddInput(CeedQFunction qf, const char *field_name, CeedInt size, CeedEvalMode eval_mode) { 746 if (qf->is_immutable) { 747 // LCOV_EXCL_START --- 24 unchanged lines hidden (view full) --- 772 return CEED_ERROR_SUCCESS; 773} 774 775/** 776 @brief Add a CeedQFunction output 777 778 @param[in,out] qf CeedQFunction 779 @param[in] field_name Name of QFunction field |
| 772 @param[in] size Size of QFunction field, (num_comp * dim) for @ref CEED_EVAL_GRAD or (num_comp * 1) for @ref CEED_EVAL_NONE and @ref 773CEED_EVAL_INTERP | 780 @param[in] size Size of QFunction field, (num_comp * 1) for @ref CEED_EVAL_NONE, 781(num_comp * 1) for @ref CEED_EVAL_INTERP for an H^1 space or (num_comp * dim) for an H(div) or H(curl) space, 782(num_comp * dim) for @ref CEED_EVAL_GRAD, or (num_comp * 1) for @ref CEED_EVAL_DIV, and 783(num_comp * curl_dim) with curl_dim = 1 if dim < 3 else dim for @ref CEED_EVAL_CURL. |
| 774 @param[in] eval_mode \ref CEED_EVAL_NONE to use values directly, 775 \ref CEED_EVAL_INTERP to use interpolated values, | 784 @param[in] eval_mode \ref CEED_EVAL_NONE to use values directly, 785 \ref CEED_EVAL_INTERP to use interpolated values, |
| 776 \ref CEED_EVAL_GRAD to use gradients. | 786 \ref CEED_EVAL_GRAD to use gradients, 787 \ref CEED_EVAL_DIV to use divergence, 788 \ref CEED_EVAL_CURL to use curl. |
| 777 778 @return An error code: 0 - success, otherwise - failure 779 780 @ref User 781**/ 782int CeedQFunctionAddOutput(CeedQFunction qf, const char *field_name, CeedInt size, CeedEvalMode eval_mode) { 783 if (qf->is_immutable) { 784 // LCOV_EXCL_START --- 275 unchanged lines hidden --- | 789 790 @return An error code: 0 - success, otherwise - failure 791 792 @ref User 793**/ 794int CeedQFunctionAddOutput(CeedQFunction qf, const char *field_name, CeedInt size, CeedEvalMode eval_mode) { 795 if (qf->is_immutable) { 796 // LCOV_EXCL_START --- 275 unchanged lines hidden --- |