57 #ifndef Intrepid2_DerivedBasis_HGRAD_HEX_h 58 #define Intrepid2_DerivedBasis_HGRAD_HEX_h 67 template<
class HGRAD_LINE>
72 using ExecutionSpace =
typename HGRAD_LINE::ExecutionSpace;
73 using OutputValueType =
typename HGRAD_LINE::OutputValueType;
74 using PointValueType =
typename HGRAD_LINE::PointValueType;
76 using OutputViewType =
typename HGRAD_LINE::OutputViewType;
77 using PointViewType =
typename HGRAD_LINE::PointViewType ;
78 using ScalarViewType =
typename HGRAD_LINE::ScalarViewType;
80 using LineBasis = HGRAD_LINE;
82 using BasisBase =
typename HGRAD_LINE::BasisBase;
86 ordinal_type order_x_;
87 ordinal_type order_y_;
88 ordinal_type order_z_;
100 Teuchos::rcp( new LineBasis(polyOrder_z, pointType)))
102 this->functionSpace_ = FUNCTION_SPACE_HGRAD;
104 std::ostringstream basisName;
106 name_ = basisName.str();
108 order_x_ = polyOrder_x;
109 order_y_ = polyOrder_y;
110 order_z_ = polyOrder_z;
111 pointType_ = pointType;
126 return (this->getDofCount(1,0) > 1);
133 const EOperator VALUE = Intrepid2::OPERATOR_VALUE;
134 const EOperator GRAD = Intrepid2::OPERATOR_GRAD;
136 if (operatorType == VALUE)
140 else if (operatorType == GRAD)
145 std::vector< std::vector<EOperator> > ops;
146 ops.push_back(std::vector<EOperator>{GRAD, VALUE});
147 ops.push_back(std::vector<EOperator>{VALUE, GRAD});
149 std::vector<double> weights(ops.size(), 1.0);
155 INTREPID2_TEST_FOR_EXCEPTION(
true,std::invalid_argument,
"operator not yet supported");
159 using BasisBase::getValues;
169 const PointViewType inputPoints1,
const PointViewType inputPoints2,
170 bool tensorPoints)
const override 173 if (operatorType == Intrepid2::OPERATOR_VALUE)
175 op1 = Intrepid2::OPERATOR_VALUE;
176 op2 = Intrepid2::OPERATOR_VALUE;
180 inputPoints2, op2, tensorPoints);
182 else if (operatorType == Intrepid2::OPERATOR_GRAD)
191 auto outputValuesComponent1 = Kokkos::subview(outputValues,Kokkos::ALL(),Kokkos::ALL(),std::make_pair(0,2));
192 auto outputValuesComponent2 = Kokkos::subview(outputValues,Kokkos::ALL(),Kokkos::ALL(),2);
195 op1 = Intrepid2::OPERATOR_GRAD;
196 op2 = Intrepid2::OPERATOR_VALUE;
200 inputPoints2, op2, tensorPoints);
203 op1 = Intrepid2::OPERATOR_VALUE;
204 op2 = Intrepid2::OPERATOR_GRAD;
208 inputPoints2, op2, tensorPoints);
212 INTREPID2_TEST_FOR_EXCEPTION(
true,std::invalid_argument,
"operator not yet supported");
223 return name_.c_str();
235 Teuchos::RCP<BasisBase>
237 if(subCellDim == 1) {
243 return Teuchos::rcp(
new LineBasis(order_x_, pointType_) );
248 return Teuchos::rcp(
new LineBasis(order_y_, pointType_) );
253 return Teuchos::rcp(
new LineBasis(order_z_, pointType_) );
255 }
else if(subCellDim == 2) {
258 return Teuchos::rcp(
new QuadBasis(order_x_, order_z_, pointType_) );
260 return Teuchos::rcp(
new QuadBasis(order_y_,order_z_, pointType_) );
262 return Teuchos::rcp(
new QuadBasis(order_x_, order_z_, pointType_) );
264 return Teuchos::rcp(
new QuadBasis(order_z_, order_y_, pointType_) );
266 return Teuchos::rcp(
new QuadBasis(order_y_, order_x_, pointType_) );
268 return Teuchos::rcp(
new QuadBasis(order_x_, order_y_, pointType_) );
272 INTREPID2_TEST_FOR_EXCEPTION(
true,std::invalid_argument,
"Input parameters out of bounds");
283 auto hostBasis = Teuchos::rcp(
new HostBasis(order_x_, order_y_, order_z_, pointType_));
Implementation of bases that are tensor products of two or three component bases. ...
Teuchos::RCP< BasisBase > getSubCellRefBasis(const ordinal_type subCellDim, const ordinal_type subCellOrd) const override
returns the basis associated to a subCell.
For a multi-component tensor basis, specifies the operators to be applied to the components to produc...
BasisPtr< typename Kokkos::HostSpace::device_type, OutputType, PointType > HostBasisPtr
Pointer to a Basis whose device type is on the host (Kokkos::HostSpace::device_type), allowing host access to input and output views, and ensuring host execution of basis evaluation.
Implementation of H(grad) basis on the quadrilateral that is templated on H(grad) on the line...
virtual bool requireOrientation() const override
True if orientation is required.
EOperator
Enumeration of primitive operators available in Intrepid. Primitive operators act on reconstructed fu...
virtual const char * getName() const override
Returns basis name.
EPointType
Enumeration of types of point distributions in Intrepid.
virtual void getValues(OutputViewType outputValues, const EOperator operatorType, const PointViewType inputPoints1, const PointViewType inputPoints2, bool tensorPoints) const override
multi-component getValues() method (required/called by TensorBasis)
virtual OperatorTensorDecomposition getSimpleOperatorDecomposition(const EOperator operatorType) const override
Returns a simple decomposition of the specified operator: what operator(s) should be applied to basis...
virtual void getValues(BasisValues< OutputValueType, DeviceType > outputValues, const TensorPoints< PointValueType, DeviceType > inputPoints, const EOperator operatorType=OPERATOR_VALUE) const override
Evaluation of a FEM basis on a reference cell, using point and output value containers that allow pre...
virtual const char * getName() const override
Returns basis name.
Basis_Derived_HGRAD_HEX(int polyOrder, const EPointType pointType=POINTTYPE_DEFAULT)
Constructor.
Basis defined as the tensor product of two component bases.
virtual HostBasisPtr< OutputValueType, PointValueType > getHostBasis() const override
Creates and returns a Basis object whose DeviceType template argument is Kokkos::HostSpace::device_ty...
Basis_Derived_HGRAD_HEX(int polyOrder_x, int polyOrder_y, int polyOrder_z, const EPointType pointType=POINTTYPE_DEFAULT)
Constructor.