51 template<
class Scalar,
class ArrayScalar>
54 this -> basisCardinality_ = 4;
55 this -> basisDegree_ = 1;
56 this -> basisCellTopology_ = shards::CellTopology(shards::getCellTopologyData<shards::Quadrilateral<4> >() );
57 this -> basisType_ = BASIS_FEM_DEFAULT;
58 this -> basisCoordinates_ = COORDINATES_CARTESIAN;
59 this -> basisTagsAreSet_ =
false;
62 template<
class Scalar,
class ArrayScalar>
79 Intrepid::setOrdinalTagData(
this -> tagToOrdinal_,
80 this -> ordinalToTag_,
82 this -> basisCardinality_,
91 template<
class Scalar,
class ArrayScalar>
93 const ArrayScalar & inputPoints,
94 const EOperator operatorType)
const {
97 #ifdef HAVE_INTREPID_DEBUG
98 Intrepid::getValues_HCURL_Args<Scalar, ArrayScalar>(outputValues,
101 this -> getBaseCellTopology(),
102 this -> getCardinality() );
106 int dim0 = inputPoints.dimension(0);
112 switch (operatorType) {
114 for (
int i0 = 0; i0 < dim0; i0++) {
115 x = inputPoints(i0, 0);
116 y = inputPoints(i0, 1);
119 outputValues(0, i0, 0) = (1.0 - y)/4.0;
120 outputValues(0, i0, 1) = 0.0;
122 outputValues(1, i0, 0) = 0.0;
123 outputValues(1, i0, 1) = (1.0 + x)/4.0;
125 outputValues(2, i0, 0) =-(1.0 + y)/4.0;
126 outputValues(2, i0, 1) = 0.0;
128 outputValues(3, i0, 0) = 0.0;
129 outputValues(3, i0, 1) =-(1.0 - x)/4.0;
134 for (
int i0 = 0; i0 < dim0; i0++) {
137 outputValues(0, i0) = 0.25;
138 outputValues(1, i0) = 0.25;
139 outputValues(2, i0) = 0.25;
140 outputValues(3, i0) = 0.25;
145 TEUCHOS_TEST_FOR_EXCEPTION( (operatorType == OPERATOR_DIV), std::invalid_argument,
146 ">>> ERROR (Basis_HCURL_QUAD_I1_FEM): DIV is invalid operator for HCURL Basis Functions");
150 TEUCHOS_TEST_FOR_EXCEPTION( (operatorType == OPERATOR_GRAD), std::invalid_argument,
151 ">>> ERROR (Basis_HCURL_QUAD_I1_FEM): GRAD is invalid operator for HCURL Basis Functions");
164 TEUCHOS_TEST_FOR_EXCEPTION( ( (operatorType == OPERATOR_D1) ||
165 (operatorType == OPERATOR_D2) ||
166 (operatorType == OPERATOR_D3) ||
167 (operatorType == OPERATOR_D4) ||
168 (operatorType == OPERATOR_D5) ||
169 (operatorType == OPERATOR_D6) ||
170 (operatorType == OPERATOR_D7) ||
171 (operatorType == OPERATOR_D8) ||
172 (operatorType == OPERATOR_D9) ||
173 (operatorType == OPERATOR_D10) ),
174 std::invalid_argument,
175 ">>> ERROR (Basis_HCURL_QUAD_I1_FEM): Invalid operator type");
179 TEUCHOS_TEST_FOR_EXCEPTION( ( (operatorType != OPERATOR_VALUE) &&
180 (operatorType != OPERATOR_GRAD) &&
181 (operatorType != OPERATOR_CURL) &&
182 (operatorType != OPERATOR_DIV) &&
183 (operatorType != OPERATOR_D1) &&
184 (operatorType != OPERATOR_D2) &&
185 (operatorType != OPERATOR_D3) &&
186 (operatorType != OPERATOR_D4) &&
187 (operatorType != OPERATOR_D5) &&
188 (operatorType != OPERATOR_D6) &&
189 (operatorType != OPERATOR_D7) &&
190 (operatorType != OPERATOR_D8) &&
191 (operatorType != OPERATOR_D9) &&
192 (operatorType != OPERATOR_D10) ),
193 std::invalid_argument,
194 ">>> ERROR (Basis_HCURL_QUAD_I1_FEM): Invalid operator type");
200 template<
class Scalar,
class ArrayScalar>
202 const ArrayScalar & inputPoints,
203 const ArrayScalar & cellVertices,
204 const EOperator operatorType)
const {
205 TEUCHOS_TEST_FOR_EXCEPTION( (
true), std::logic_error,
206 ">>> ERROR (Basis_HCURL_QUAD_I1_FEM): FEM Basis calling an FVD member function");
209 template<
class Scalar,
class ArrayScalar>
211 #ifdef HAVE_INTREPID_DEBUG
213 TEUCHOS_TEST_FOR_EXCEPTION( !(DofCoords.rank() == 2), std::invalid_argument,
214 ">>> ERROR: (Intrepid::Basis_HCURL_QUAD_I1_FEM::getDofCoords) rank = 2 required for DofCoords array");
216 TEUCHOS_TEST_FOR_EXCEPTION( !( DofCoords.dimension(0) ==
this -> basisCardinality_ ), std::invalid_argument,
217 ">>> ERROR: (Intrepid::Basis_HCURL_QUAD_I1_FEM::getDofCoords) mismatch in number of DoF and 0th dimension of DofCoords array");
219 TEUCHOS_TEST_FOR_EXCEPTION( !( DofCoords.dimension(1) == (int)(
this -> basisCellTopology_.getDimension()) ), std::invalid_argument,
220 ">>> ERROR: (Intrepid::Basis_HCURL_QUAD_I1_FEM::getDofCoords) incorrect reference cell (1st) dimension in DofCoords array");
223 DofCoords(0,0) = 0.0; DofCoords(0,1) = -1.0;
224 DofCoords(1,0) = 1.0; DofCoords(1,1) = 0.0;
225 DofCoords(2,0) = 0.0; DofCoords(2,1) = 1.0;
226 DofCoords(3,0) = -1.0; DofCoords(3,1) = 0.0;
231 #if defined(Intrepid_SHOW_DEPRECATED_WARNINGS)
233 #warning "The Intrepid package is deprecated"
void initializeTags()
Initializes tagToOrdinal_ and ordinalToTag_ lookup arrays.
void getDofCoords(ArrayScalar &DofCoords) const
Returns spatial locations (coordinates) of degrees of freedom on a reference Quadrilateral.
void getValues(ArrayScalar &outputValues, const ArrayScalar &inputPoints, const EOperator operatorType) const
Evaluation of a FEM basis on a reference Quadrilateral cell.
Basis_HCURL_QUAD_I1_FEM()
Constructor.