51 template<
class Scalar,
class ArrayScalar>
54 this -> basisCardinality_ = 6;
55 this -> basisDegree_ = 1;
56 this -> basisCellTopology_ = shards::CellTopology(shards::getCellTopologyData<shards::Hexahedron<8> >() );
57 this -> basisType_ = BASIS_FEM_DEFAULT;
58 this -> basisCoordinates_ = COORDINATES_CARTESIAN;
59 this -> basisTagsAreSet_ =
false;
62 template<
class Scalar,
class ArrayScalar>
82 Intrepid::setOrdinalTagData(
this -> tagToOrdinal_,
83 this -> ordinalToTag_,
85 this -> basisCardinality_,
94 template<
class Scalar,
class ArrayScalar>
96 const ArrayScalar & inputPoints,
97 const EOperator operatorType)
const {
100 #ifdef HAVE_INTREPID_DEBUG
101 Intrepid::getValues_HDIV_Args<Scalar, ArrayScalar>(outputValues,
104 this -> getBaseCellTopology(),
105 this -> getCardinality() );
109 int dim0 = inputPoints.dimension(0);
116 switch (operatorType) {
118 for (
int i0 = 0; i0 < dim0; i0++) {
119 x = inputPoints(i0, 0);
120 y = inputPoints(i0, 1);
121 z = inputPoints(i0, 2);
124 outputValues(0, i0, 0) = 0.0;
125 outputValues(0, i0, 1) = (y - 1.0)/8.0;
126 outputValues(0, i0, 2) = 0.0;
128 outputValues(1, i0, 0) = (1.0 + x)/8.0;
129 outputValues(1, i0, 1) = 0.0;
130 outputValues(1, i0, 2) = 0.0;
132 outputValues(2, i0, 0) = 0.0;
133 outputValues(2, i0, 1) = (1.0 + y)/8.0;
134 outputValues(2, i0, 2) = 0.0;
136 outputValues(3, i0, 0) = (x - 1.0)/8.0;
137 outputValues(3, i0, 1) = 0.0;
138 outputValues(3, i0, 2) = 0.0;
140 outputValues(4, i0, 0) = 0.0;
141 outputValues(4, i0, 1) = 0.0;
142 outputValues(4, i0, 2) = (z - 1.0)/8.0;
144 outputValues(5, i0, 0) = 0.0;
145 outputValues(5, i0, 1) = 0.0;
146 outputValues(5, i0, 2) = (1.0 + z)/8.0;
152 for (
int i0 = 0; i0 < dim0; i0++) {
153 outputValues(0, i0) = 0.125;
154 outputValues(1, i0) = 0.125;
155 outputValues(2, i0) = 0.125;
156 outputValues(3, i0) = 0.125;
157 outputValues(4, i0) = 0.125;
158 outputValues(5, i0) = 0.125;
163 TEUCHOS_TEST_FOR_EXCEPTION( (operatorType == OPERATOR_CURL), std::invalid_argument,
164 ">>> ERROR (Basis_HDIV_HEX_I1_FEM): CURL is invalid operator for HDIV Basis Functions");
168 TEUCHOS_TEST_FOR_EXCEPTION( (operatorType == OPERATOR_GRAD), std::invalid_argument,
169 ">>> ERROR (Basis_HDIV_HEX_I1_FEM): GRAD is invalid operator for HDIV Basis Functions");
182 TEUCHOS_TEST_FOR_EXCEPTION( ( (operatorType == OPERATOR_D1) ||
183 (operatorType == OPERATOR_D2) ||
184 (operatorType == OPERATOR_D3) ||
185 (operatorType == OPERATOR_D4) ||
186 (operatorType == OPERATOR_D5) ||
187 (operatorType == OPERATOR_D6) ||
188 (operatorType == OPERATOR_D7) ||
189 (operatorType == OPERATOR_D8) ||
190 (operatorType == OPERATOR_D9) ||
191 (operatorType == OPERATOR_D10) ),
192 std::invalid_argument,
193 ">>> ERROR (Basis_HDIV_HEX_I1_FEM): Invalid operator type");
197 TEUCHOS_TEST_FOR_EXCEPTION( ( (operatorType != OPERATOR_VALUE) &&
198 (operatorType != OPERATOR_GRAD) &&
199 (operatorType != OPERATOR_CURL) &&
200 (operatorType != OPERATOR_DIV) &&
201 (operatorType != OPERATOR_D1) &&
202 (operatorType != OPERATOR_D2) &&
203 (operatorType != OPERATOR_D3) &&
204 (operatorType != OPERATOR_D4) &&
205 (operatorType != OPERATOR_D5) &&
206 (operatorType != OPERATOR_D6) &&
207 (operatorType != OPERATOR_D7) &&
208 (operatorType != OPERATOR_D8) &&
209 (operatorType != OPERATOR_D9) &&
210 (operatorType != OPERATOR_D10) ),
211 std::invalid_argument,
212 ">>> ERROR (Basis_HDIV_HEX_I1_FEM): Invalid operator type");
218 template<
class Scalar,
class ArrayScalar>
220 const ArrayScalar & inputPoints,
221 const ArrayScalar & cellVertices,
222 const EOperator operatorType)
const {
223 TEUCHOS_TEST_FOR_EXCEPTION( (
true), std::logic_error,
224 ">>> ERROR (Basis_HDIV_HEX_I1_FEM): FEM Basis calling an FVD member function");
227 template<
class Scalar,
class ArrayScalar>
229 #ifdef HAVE_INTREPID_DEBUG
231 TEUCHOS_TEST_FOR_EXCEPTION( !(DofCoords.rank() == 2), std::invalid_argument,
232 ">>> ERROR: (Intrepid::Basis_HDIV_HEX_I1_FEM::getDofCoords) rank = 2 required for DofCoords array");
234 TEUCHOS_TEST_FOR_EXCEPTION( !( DofCoords.dimension(0) ==
this -> basisCardinality_ ), std::invalid_argument,
235 ">>> ERROR: (Intrepid::Basis_HDIV_HEX_I1_FEM::getDofCoords) mismatch in number of DoF and 0th dimension of DofCoords array");
237 TEUCHOS_TEST_FOR_EXCEPTION( !( DofCoords.dimension(1) == (int)(
this -> basisCellTopology_.getDimension()) ), std::invalid_argument,
238 ">>> ERROR: (Intrepid::Basis_HDIV_HEX_I1_FEM::getDofCoords) incorrect reference cell (1st) dimension in DofCoords array");
241 DofCoords(0,0) = 0.0; DofCoords(0,1) = -1.0; DofCoords(0,2) = 0.0;
242 DofCoords(1,0) = 1.0; DofCoords(1,1) = 0.0; DofCoords(1,2) = 0.0;
243 DofCoords(2,0) = 0.0; DofCoords(2,1) = 1.0; DofCoords(2,2) = 0.0;
244 DofCoords(3,0) = -1.0; DofCoords(3,1) = 0.0; DofCoords(3,2) = 0.0;
245 DofCoords(4,0) = 0.0; DofCoords(4,1) = 0.0; DofCoords(4,2) = -1.0;
246 DofCoords(5,0) = 0.0; DofCoords(5,1) = 0.0; DofCoords(5,2) = 1.0;
251 #if defined(Intrepid_SHOW_DEPRECATED_WARNINGS)
253 #warning "The Intrepid package is deprecated"
void getValues(ArrayScalar &outputValues, const ArrayScalar &inputPoints, const EOperator operatorType) const
Evaluation of a FEM basis on a reference Hexahedron cell.
void getDofCoords(ArrayScalar &DofCoords) const
Returns spatial locations (coordinates) of degrees of freedom on a reference Quadrilateral.
void initializeTags()
Initializes tagToOrdinal_ and ordinalToTag_ lookup arrays.
Basis_HDIV_HEX_I1_FEM()
Constructor.