| ceed-operator.c (37eda346557d6c6a68044736ef6477e646c46425) | ceed-operator.c (198eabcecbd45f5da29cfbf2059782a4bd775fa0) |
|---|---|
| 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> --- 738 unchanged lines hidden (view full) --- 747 if (op->output_size == -1) op->output_size = l_size; 748 CeedCheck(l_size == op->output_size, op->ceed, CEED_ERROR_INCOMPATIBLE, "LVector size %td does not match previous size %td", l_size, 749 op->output_size); 750 } 751 } 752 753 CeedCall(CeedVectorReferenceCopy(v, &(*op_field)->vec)); 754 CeedCall(CeedElemRestrictionReferenceCopy(r, &(*op_field)->elem_rstr)); | 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> --- 738 unchanged lines hidden (view full) --- 747 if (op->output_size == -1) op->output_size = l_size; 748 CeedCheck(l_size == op->output_size, op->ceed, CEED_ERROR_INCOMPATIBLE, "LVector size %td does not match previous size %td", l_size, 749 op->output_size); 750 } 751 } 752 753 CeedCall(CeedVectorReferenceCopy(v, &(*op_field)->vec)); 754 CeedCall(CeedElemRestrictionReferenceCopy(r, &(*op_field)->elem_rstr)); |
| 755 if (r != CEED_ELEMRESTRICTION_NONE) { | 755 if (r != CEED_ELEMRESTRICTION_NONE && !op->has_restriction) { |
| 756 op->num_elem = num_elem; 757 op->has_restriction = true; // Restriction set, but num_elem may be 0 758 } 759 CeedCall(CeedBasisReferenceCopy(b, &(*op_field)->basis)); | 756 op->num_elem = num_elem; 757 op->has_restriction = true; // Restriction set, but num_elem may be 0 758 } 759 CeedCall(CeedBasisReferenceCopy(b, &(*op_field)->basis)); |
| 760 op->num_qpts = num_qpts; | 760 if (op->num_qpts == 0) op->num_qpts = num_qpts; |
| 761 op->num_fields += 1; 762 CeedCall(CeedStringAllocCopy(field_name, (char **)&(*op_field)->field_name)); | 761 op->num_fields += 1; 762 CeedCall(CeedStringAllocCopy(field_name, (char **)&(*op_field)->field_name)); |
| 763 | |
| 764 return CEED_ERROR_SUCCESS; 765} 766 767/** 768 @brief Get the CeedOperatorFields of a CeedOperator 769 770 Note: Calling this function asserts that setup is complete and sets the CeedOperator as immutable. 771 --- 914 unchanged lines hidden --- | 763 return CEED_ERROR_SUCCESS; 764} 765 766/** 767 @brief Get the CeedOperatorFields of a CeedOperator 768 769 Note: Calling this function asserts that setup is complete and sets the CeedOperator as immutable. 770 --- 914 unchanged lines hidden --- |