54 #ifndef Intrepid2_DerivedBasis_HCURL_HEX_h
55 #define Intrepid2_DerivedBasis_HCURL_HEX_h
57 #include <Kokkos_View.hpp>
58 #include <Kokkos_DynRankView.hpp>
67 template<
class HGRAD_LINE,
class HVOL_LINE>
74 using OutputViewType =
typename HGRAD_LINE::OutputViewType;
75 using PointViewType =
typename HGRAD_LINE::PointViewType ;
76 using ScalarViewType =
typename HGRAD_LINE::ScalarViewType;
78 using LineGradBasis = HGRAD_LINE;
79 using LineVolBasis = HVOL_LINE;
91 LineGradBasis(polyOrder_y ),
92 LineGradBasis(polyOrder_z ))
107 virtual void getValues(OutputViewType outputValues,
const EOperator operatorType,
108 const PointViewType inputPoints1,
const PointViewType inputPoints2,
const PointViewType inputPoints3,
109 bool tensorPoints)
const
111 Intrepid2::EOperator op1, op2, op3;
112 if (operatorType == Intrepid2::OPERATOR_VALUE)
114 op1 = Intrepid2::OPERATOR_VALUE;
115 op2 = Intrepid2::OPERATOR_VALUE;
116 op3 = Intrepid2::OPERATOR_VALUE;
119 auto outputValuesComponent1 = Kokkos::subview(outputValues,Kokkos::ALL(),Kokkos::ALL(),0);
120 auto outputValuesComponent23 = Kokkos::subview(outputValues,Kokkos::ALL(),Kokkos::ALL(),std::make_pair(1,3));
125 inputPoints3, op3, tensorPoints);
127 Kokkos::deep_copy(outputValuesComponent23,0.0);
129 else if (operatorType == Intrepid2::OPERATOR_CURL)
132 auto outputValuesComponent_x = Kokkos::subview(outputValues,Kokkos::ALL(),Kokkos::ALL(),0);
133 auto outputValuesComponent_y = Kokkos::subview(outputValues,Kokkos::ALL(),Kokkos::ALL(),1);
134 auto outputValuesComponent_z = Kokkos::subview(outputValues,Kokkos::ALL(),Kokkos::ALL(),2);
137 Kokkos::deep_copy(outputValuesComponent_x, 0.0);
140 op1 = Intrepid2::OPERATOR_VALUE;
141 op2 = Intrepid2::OPERATOR_VALUE;
142 op3 = Intrepid2::OPERATOR_GRAD;
148 inputPoints3, op3, tensorPoints, weight);
151 op1 = Intrepid2::OPERATOR_VALUE;
152 op2 = Intrepid2::OPERATOR_GRAD;
153 op3 = Intrepid2::OPERATOR_VALUE;
158 inputPoints3, op3, tensorPoints, weight);
162 INTREPID2_TEST_FOR_EXCEPTION(
true,std::invalid_argument,
"operator not yet supported");
167 template<
class HGRAD_LINE,
class HVOL_LINE>
174 using OutputViewType =
typename HGRAD_LINE::OutputViewType;
175 using PointViewType =
typename HGRAD_LINE::PointViewType ;
176 using ScalarViewType =
typename HGRAD_LINE::ScalarViewType;
178 using LineGradBasis = HGRAD_LINE;
179 using LineVolBasis = HVOL_LINE;
191 LineVolBasis (polyOrder_y-1),
192 LineGradBasis(polyOrder_z))
207 virtual void getValues(OutputViewType outputValues,
const EOperator operatorType,
208 const PointViewType inputPoints1,
const PointViewType inputPoints2,
const PointViewType inputPoints3,
209 bool tensorPoints)
const
211 Intrepid2::EOperator op1, op2, op3;
212 if (operatorType == Intrepid2::OPERATOR_VALUE)
214 op1 = Intrepid2::OPERATOR_VALUE;
215 op2 = Intrepid2::OPERATOR_VALUE;
216 op3 = Intrepid2::OPERATOR_VALUE;
219 auto outputValuesComponent_x = Kokkos::subview(outputValues,Kokkos::ALL(),Kokkos::ALL(),0);
220 auto outputValuesComponent_y = Kokkos::subview(outputValues,Kokkos::ALL(),Kokkos::ALL(),1);
221 auto outputValuesComponent_z = Kokkos::subview(outputValues,Kokkos::ALL(),Kokkos::ALL(),2);
224 Kokkos::deep_copy(outputValuesComponent_x,0.0);
229 inputPoints3, op3, tensorPoints);
231 Kokkos::deep_copy(outputValuesComponent_z,0.0);
233 else if (operatorType == Intrepid2::OPERATOR_CURL)
236 auto outputValuesComponent_x = Kokkos::subview(outputValues,Kokkos::ALL(),Kokkos::ALL(),0);
237 auto outputValuesComponent_y = Kokkos::subview(outputValues,Kokkos::ALL(),Kokkos::ALL(),1);
238 auto outputValuesComponent_z = Kokkos::subview(outputValues,Kokkos::ALL(),Kokkos::ALL(),2);
241 op1 = Intrepid2::OPERATOR_VALUE;
242 op2 = Intrepid2::OPERATOR_VALUE;
243 op3 = Intrepid2::OPERATOR_GRAD;
245 double weight = -1.0;
249 inputPoints3, op3, tensorPoints, weight);
252 Kokkos::deep_copy(outputValuesComponent_y, 0.0);
255 op1 = Intrepid2::OPERATOR_GRAD;
256 op2 = Intrepid2::OPERATOR_VALUE;
257 op3 = Intrepid2::OPERATOR_VALUE;
262 inputPoints3, op3, tensorPoints, weight);
266 INTREPID2_TEST_FOR_EXCEPTION(
true,std::invalid_argument,
"operator not yet supported");
271 template<
class HGRAD_LINE,
class HVOL_LINE>
277 using OutputViewType =
typename HGRAD_LINE::OutputViewType;
278 using PointViewType =
typename HGRAD_LINE::PointViewType ;
279 using ScalarViewType =
typename HGRAD_LINE::ScalarViewType;
281 using LineGradBasis = HGRAD_LINE;
282 using LineVolBasis = HVOL_LINE;
294 LineGradBasis(polyOrder_y ),
295 LineVolBasis (polyOrder_z-1))
308 virtual void getValues(OutputViewType outputValues,
const EOperator operatorType,
309 const PointViewType inputPoints1,
const PointViewType inputPoints2,
const PointViewType inputPoints3,
310 bool tensorPoints)
const
312 Intrepid2::EOperator op1, op2, op3;
313 if (operatorType == Intrepid2::OPERATOR_VALUE)
315 op1 = Intrepid2::OPERATOR_VALUE;
316 op2 = Intrepid2::OPERATOR_VALUE;
317 op3 = Intrepid2::OPERATOR_VALUE;
320 auto outputValuesComponent_xy = Kokkos::subview(outputValues,Kokkos::ALL(),Kokkos::ALL(),std::make_pair(0,2));
321 auto outputValuesComponent_z = Kokkos::subview(outputValues,Kokkos::ALL(),Kokkos::ALL(),2);
324 Kokkos::deep_copy(outputValuesComponent_xy,0.0);
329 inputPoints3, op3, tensorPoints);
331 else if (operatorType == Intrepid2::OPERATOR_CURL)
334 auto outputValuesComponent_x = Kokkos::subview(outputValues,Kokkos::ALL(),Kokkos::ALL(),0);
335 auto outputValuesComponent_y = Kokkos::subview(outputValues,Kokkos::ALL(),Kokkos::ALL(),1);
336 auto outputValuesComponent_z = Kokkos::subview(outputValues,Kokkos::ALL(),Kokkos::ALL(),2);
339 op1 = Intrepid2::OPERATOR_VALUE;
340 op2 = Intrepid2::OPERATOR_GRAD;
341 op3 = Intrepid2::OPERATOR_VALUE;
347 inputPoints3, op3, tensorPoints, weight);
349 op1 = Intrepid2::OPERATOR_GRAD;
350 op2 = Intrepid2::OPERATOR_VALUE;
351 op3 = Intrepid2::OPERATOR_VALUE;
356 inputPoints3, op3, tensorPoints, weight);
359 Kokkos::deep_copy(outputValuesComponent_z, 0.0);
363 INTREPID2_TEST_FOR_EXCEPTION(
true,std::invalid_argument,
"operator not yet supported");
368 template<
class HGRAD_LINE,
class HVOL_LINE>
371 Basis_Derived_HCURL_Family2_HEX<HGRAD_LINE, HVOL_LINE> >
385 Family2(polyOrder_x, polyOrder_y, polyOrder_z)) {}
388 template<
class HGRAD_LINE,
class HVOL_LINE>
391 Basis_Derived_HCURL_Family3_HEX<HGRAD_LINE, HVOL_LINE> >
405 Family3 (polyOrder_x, polyOrder_y, polyOrder_z)) {
virtual void getValues(OutputViewType outputValues, const EOperator operatorType, const PointViewType inputPoints12, const PointViewType inputPoints3, bool tensorPoints) const override
Evaluation of a tensor FEM basis on a reference cell.
Basis_Derived_HCURL_Family3_HEX(int polyOrder_x, int polyOrder_y, int polyOrder_z)
Constructor.
virtual void getValues(OutputViewType outputValues, const EOperator operatorType, const PointViewType inputPoints1, const PointViewType inputPoints2, const PointViewType inputPoints3, bool tensorPoints) const
multi-component getValues() method (required/called by TensorBasis3)
Implementation of bases that are tensor products of two or three component bases. ...
Basis_Derived_HCURL_HEX(int polyOrder_x, int polyOrder_y, int polyOrder_z)
Constructor.
Basis_Derived_HCURL_Family2_HEX(int polyOrder_x, int polyOrder_y, int polyOrder_z)
Constructor.
Basis_Derived_HCURL_Family1_Family2_HEX(int polyOrder_x, int polyOrder_y, int polyOrder_z)
Constructor.
EFunctionSpace functionSpace_
The function space in which the basis is defined.
virtual void getValues(OutputViewType outputValues, const EOperator operatorType, const PointViewType inputPoints1, const PointViewType inputPoints2, const PointViewType inputPoints3, bool tensorPoints) const
multi-component getValues() method (required/called by TensorBasis3)
Free functions, callable from device code, that implement various polynomials useful in basis definit...
Implementation of a basis that is the direct sum of two other bases.
A basis that is the direct sum of two other bases.
Basis_Derived_HCURL_Family1_HEX(int polyOrder_x, int polyOrder_y, int polyOrder_z)
Constructor.
ordinal_type getDofCount(const ordinal_type subcDim, const ordinal_type subcOrd) const
DoF count for specified subcell.
virtual void getValues(OutputViewType outputValues, const EOperator operatorType, const PointViewType inputPoints1, const PointViewType inputPoints2, const PointViewType inputPoints3, bool tensorPoints) const
multi-component getValues() method (required/called by TensorBasis3)
Basis_Derived_HCURL_HEX(int polyOrder)
Constructor.
virtual bool requireOrientation() const
True if orientation is required.