51 template<
class Scalar,
class ArrayScalar>
54 this -> basisCardinality_ = 4;
55 this -> basisDegree_ = 1;
56 this -> basisCellTopology_ = shards::CellTopology(shards::getCellTopologyData<shards::Tetrahedron<4> >() );
57 this -> basisType_ = BASIS_FEM_DEFAULT;
58 this -> basisCoordinates_ = COORDINATES_CARTESIAN;
59 this -> basisTagsAreSet_ =
false;
62 template<
class Scalar,
class ArrayScalar>
80 Intrepid::setOrdinalTagData(
this -> tagToOrdinal_,
81 this -> ordinalToTag_,
83 this -> basisCardinality_,
92 template<
class Scalar,
class ArrayScalar>
94 const ArrayScalar & inputPoints,
95 const EOperator operatorType)
const {
98 #ifdef HAVE_INTREPID_DEBUG
99 Intrepid::getValues_HDIV_Args<Scalar, ArrayScalar>(outputValues,
102 this -> getBaseCellTopology(),
103 this -> getCardinality() );
107 int dim0 = inputPoints.dimension(0);
114 switch (operatorType) {
116 for (
int i0 = 0; i0 < dim0; i0++) {
117 x = inputPoints(i0, 0);
118 y = inputPoints(i0, 1);
119 z = inputPoints(i0, 2);
122 outputValues(0, i0, 0) = 2.0*x;
123 outputValues(0, i0, 1) = 2.0*(y - 1.0);
124 outputValues(0, i0, 2) = 2.0*z;
126 outputValues(1, i0, 0) = 2.0*x;
127 outputValues(1, i0, 1) = 2.0*y;
128 outputValues(1, i0, 2) = 2.0*z;
130 outputValues(2, i0, 0) = 2.0*(x - 1.0);
131 outputValues(2, i0, 1) = 2.0*y;
132 outputValues(2, i0, 2) = 2.0*z;
134 outputValues(3, i0, 0) = 2.0*x;
135 outputValues(3, i0, 1) = 2.0*y;
136 outputValues(3, i0, 2) = 2.0*(z - 1.0);
142 for (
int i0 = 0; i0 < dim0; i0++) {
143 outputValues(0, i0) = 6.0;
144 outputValues(1, i0) = 6.0;
145 outputValues(2, i0) = 6.0;
146 outputValues(3, i0) = 6.0;
151 TEUCHOS_TEST_FOR_EXCEPTION( (operatorType == OPERATOR_CURL), std::invalid_argument,
152 ">>> ERROR (Basis_HDIV_TET_I1_FEM): CURL is invalid operator for HDIV Basis Functions");
156 TEUCHOS_TEST_FOR_EXCEPTION( (operatorType == OPERATOR_GRAD), std::invalid_argument,
157 ">>> ERROR (Basis_HDIV_TET_I1_FEM): GRAD is invalid operator for HDIV Basis Functions");
170 TEUCHOS_TEST_FOR_EXCEPTION( ( (operatorType == OPERATOR_D1) ||
171 (operatorType == OPERATOR_D2) ||
172 (operatorType == OPERATOR_D3) ||
173 (operatorType == OPERATOR_D4) ||
174 (operatorType == OPERATOR_D5) ||
175 (operatorType == OPERATOR_D6) ||
176 (operatorType == OPERATOR_D7) ||
177 (operatorType == OPERATOR_D8) ||
178 (operatorType == OPERATOR_D9) ||
179 (operatorType == OPERATOR_D10) ),
180 std::invalid_argument,
181 ">>> ERROR (Basis_HDIV_TET_I1_FEM): Invalid operator type");
185 TEUCHOS_TEST_FOR_EXCEPTION( ( (operatorType != OPERATOR_VALUE) &&
186 (operatorType != OPERATOR_GRAD) &&
187 (operatorType != OPERATOR_CURL) &&
188 (operatorType != OPERATOR_DIV) &&
189 (operatorType != OPERATOR_D1) &&
190 (operatorType != OPERATOR_D2) &&
191 (operatorType != OPERATOR_D3) &&
192 (operatorType != OPERATOR_D4) &&
193 (operatorType != OPERATOR_D5) &&
194 (operatorType != OPERATOR_D6) &&
195 (operatorType != OPERATOR_D7) &&
196 (operatorType != OPERATOR_D8) &&
197 (operatorType != OPERATOR_D9) &&
198 (operatorType != OPERATOR_D10) ),
199 std::invalid_argument,
200 ">>> ERROR (Basis_HDIV_TET_I1_FEM): Invalid operator type");
206 template<
class Scalar,
class ArrayScalar>
208 const ArrayScalar & inputPoints,
209 const ArrayScalar & cellVertices,
210 const EOperator operatorType)
const {
211 TEUCHOS_TEST_FOR_EXCEPTION( (
true), std::logic_error,
212 ">>> ERROR (Basis_HDIV_TET_I1_FEM): FEM Basis calling an FVD member function");
215 template<
class Scalar,
class ArrayScalar>
217 #ifdef HAVE_INTREPID_DEBUG
219 TEUCHOS_TEST_FOR_EXCEPTION( !(DofCoords.rank() == 2), std::invalid_argument,
220 ">>> ERROR: (Intrepid::Basis_HDIV_TET_I1_FEM::getDofCoords) rank = 2 required for DofCoords array");
222 TEUCHOS_TEST_FOR_EXCEPTION( !( DofCoords.dimension(0) ==
this -> basisCardinality_ ), std::invalid_argument,
223 ">>> ERROR: (Intrepid::Basis_HDIV_TET_I1_FEM::getDofCoords) mismatch in number of DoF and 0th dimension of DofCoords array");
225 TEUCHOS_TEST_FOR_EXCEPTION( !( DofCoords.dimension(1) == (int)(
this -> basisCellTopology_.getDimension()) ), std::invalid_argument,
226 ">>> ERROR: (Intrepid::Basis_HDIV_TET_I1_FEM::getDofCoords) incorrect reference cell (1st) dimension in DofCoords array");
229 DofCoords(0,0) = 1.0/3.0; DofCoords(0,1) = 0.0; DofCoords(0,2) = 1.0/3.0;
230 DofCoords(1,0) = 1.0/3.0; DofCoords(1,1) = 1.0/3.0; DofCoords(1,2) = 1.0/3.0;
231 DofCoords(2,0) = 0.0; DofCoords(2,1) = 1.0/3.0; DofCoords(2,2) = 1.0/3.0;
232 DofCoords(3,0) = 1.0/3.0; DofCoords(3,1) = 1.0/3.0; DofCoords(3,2) = 0.0;
void getValues(ArrayScalar &outputValues, const ArrayScalar &inputPoints, const EOperator operatorType) const
Evaluation of a FEM basis on a reference Tetrahedron cell.
void initializeTags()
Initializes tagToOrdinal_ and ordinalToTag_ lookup arrays.
void getDofCoords(ArrayScalar &DofCoords) const
Returns spatial locations (coordinates) of degrees of freedom on a reference Tetrahedron.
Basis_HDIV_TET_I1_FEM()
Constructor.