51 template<
class Scalar,
class ArrayScalar>
54 this -> basisCardinality_ = 3;
55 this -> basisDegree_ = 1;
56 this -> basisCellTopology_ = shards::CellTopology(shards::getCellTopologyData<shards::Triangle<3> >() );
57 this -> basisType_ = BASIS_FEM_DEFAULT;
58 this -> basisCoordinates_ = COORDINATES_CARTESIAN;
59 this -> basisTagsAreSet_ =
false;
62 template<
class Scalar,
class ArrayScalar>
78 Intrepid::setOrdinalTagData(
this -> tagToOrdinal_,
79 this -> ordinalToTag_,
81 this -> basisCardinality_,
90 template<
class Scalar,
class ArrayScalar>
92 const ArrayScalar & inputPoints,
93 const EOperator operatorType)
const {
96 #ifdef HAVE_INTREPID_DEBUG
97 Intrepid::getValues_HCURL_Args<Scalar, ArrayScalar>(outputValues,
100 this -> getBaseCellTopology(),
101 this -> getCardinality() );
105 int dim0 = inputPoints.dimension(0);
111 switch (operatorType) {
113 for (
int i0 = 0; i0 < dim0; i0++) {
114 x = inputPoints(i0, 0);
115 y = inputPoints(i0, 1);
118 outputValues(0, i0, 0) = 1.0 - y;
119 outputValues(0, i0, 1) = x;
121 outputValues(1, i0, 0) = -y;
122 outputValues(1, i0, 1) = x;
124 outputValues(2, i0, 0) = -y;
125 outputValues(2, i0, 1) = -1.0 + x;
130 for (
int i0 = 0; i0 < dim0; i0++) {
131 x = inputPoints(i0, 0);
132 y = inputPoints(i0, 1);
135 outputValues(0, i0) = 2.0;
136 outputValues(1, i0) = 2.0;
137 outputValues(2, i0) = 2.0;
142 TEUCHOS_TEST_FOR_EXCEPTION( (operatorType == OPERATOR_DIV), std::invalid_argument,
143 ">>> ERROR (Basis_HCURL_TRI_I1_FEM): DIV is invalid operator for HCURL Basis Functions");
147 TEUCHOS_TEST_FOR_EXCEPTION( (operatorType == OPERATOR_GRAD), std::invalid_argument,
148 ">>> ERROR (Basis_HCURL_TRI_I1_FEM): GRAD is invalid operator for HCURL Basis Functions");
161 TEUCHOS_TEST_FOR_EXCEPTION( ( (operatorType == OPERATOR_D1) ||
162 (operatorType == OPERATOR_D2) ||
163 (operatorType == OPERATOR_D3) ||
164 (operatorType == OPERATOR_D4) ||
165 (operatorType == OPERATOR_D5) ||
166 (operatorType == OPERATOR_D6) ||
167 (operatorType == OPERATOR_D7) ||
168 (operatorType == OPERATOR_D8) ||
169 (operatorType == OPERATOR_D9) ||
170 (operatorType == OPERATOR_D10) ),
171 std::invalid_argument,
172 ">>> ERROR (Basis_HCURL_TRI_I1_FEM): Invalid operator type");
176 TEUCHOS_TEST_FOR_EXCEPTION( ( (operatorType != OPERATOR_VALUE) &&
177 (operatorType != OPERATOR_GRAD) &&
178 (operatorType != OPERATOR_CURL) &&
179 (operatorType != OPERATOR_DIV) &&
180 (operatorType != OPERATOR_D1) &&
181 (operatorType != OPERATOR_D2) &&
182 (operatorType != OPERATOR_D3) &&
183 (operatorType != OPERATOR_D4) &&
184 (operatorType != OPERATOR_D5) &&
185 (operatorType != OPERATOR_D6) &&
186 (operatorType != OPERATOR_D7) &&
187 (operatorType != OPERATOR_D8) &&
188 (operatorType != OPERATOR_D9) &&
189 (operatorType != OPERATOR_D10) ),
190 std::invalid_argument,
191 ">>> ERROR (Basis_HCURL_TRI_I1_FEM): Invalid operator type");
197 template<
class Scalar,
class ArrayScalar>
199 const ArrayScalar & inputPoints,
200 const ArrayScalar & cellVertices,
201 const EOperator operatorType)
const {
202 TEUCHOS_TEST_FOR_EXCEPTION( (
true), std::logic_error,
203 ">>> ERROR (Basis_HCURL_TRI_I1_FEM): FEM Basis calling an FVD member function");
206 template<
class Scalar,
class ArrayScalar>
208 #ifdef HAVE_INTREPID_DEBUG
210 TEUCHOS_TEST_FOR_EXCEPTION( !(DofCoords.rank() == 2), std::invalid_argument,
211 ">>> ERROR: (Intrepid::Basis_HCURL_TRI_I1_FEM::getDofCoords) rank = 2 required for DofCoords array");
213 TEUCHOS_TEST_FOR_EXCEPTION( !( DofCoords.dimension(0) ==
this -> basisCardinality_ ), std::invalid_argument,
214 ">>> ERROR: (Intrepid::Basis_HCURL_TRI_I1_FEM::getDofCoords) mismatch in number of DoF and 0th dimension of DofCoords array");
216 TEUCHOS_TEST_FOR_EXCEPTION( !( DofCoords.dimension(1) == (int)(
this -> basisCellTopology_.getDimension()) ), std::invalid_argument,
217 ">>> ERROR: (Intrepid::Basis_HCURL_TRI_I1_FEM::getDofCoords) incorrect reference cell (1st) dimension in DofCoords array");
220 DofCoords(0,0) = 0.5; DofCoords(0,1) = 0.0;
221 DofCoords(1,0) = 0.5; DofCoords(1,1) = 0.5;
222 DofCoords(2,0) = 0.0; DofCoords(2,1) = 0.5;
228 #if defined(Intrepid_SHOW_DEPRECATED_WARNINGS)
230 #warning "The Intrepid package is deprecated"
void initializeTags()
Initializes tagToOrdinal_ and ordinalToTag_ lookup arrays.
void getValues(ArrayScalar &outputValues, const ArrayScalar &inputPoints, const EOperator operatorType) const
Evaluation of a FEM basis on a reference Triangle cell.
Basis_HCURL_TRI_I1_FEM()
Constructor.
void getDofCoords(ArrayScalar &DofCoords) const
Returns spatial locations (coordinates) of degrees of freedom on a reference Triangle.