51 #ifndef Intrepid2_HierarchicalBasis_HDIV_TRI_h
52 #define Intrepid2_HierarchicalBasis_HDIV_TRI_h
54 #include <Kokkos_DynRankView.hpp>
56 #include <Intrepid2_config.h>
74 template<
typename DeviceType,
75 typename OutputScalar = double,
76 typename PointScalar = double,
77 bool useCGBasis =
true>
114 return "Intrepid2_HierarchicalBasis_HDIV_TRI";
147 const EOperator operatorType = OPERATOR_VALUE )
const override
150 if (operatorType == OPERATOR_DIV)
154 else if (operatorType == OPERATOR_VALUE)
158 const ordinal_type numFields = outputValues.extent_int(0);
159 const ordinal_type numPoints = outputValues.extent_int(1);
161 auto policy = Kokkos::MDRangePolicy<ExecutionSpace,Kokkos::Rank<2>>(Kokkos::Array<int,2>{0,0},Kokkos::Array<int,2>{numFields,numPoints});
164 Kokkos::parallel_for(
"apply rotation to H(curl) values", policy,
165 KOKKOS_LAMBDA (
const int &fieldOrdinal,
const int &pointOrdinal) {
166 const auto tempValue = outputValues(fieldOrdinal,pointOrdinal,0);
167 outputValues(fieldOrdinal,pointOrdinal,0) = outputValues(fieldOrdinal,pointOrdinal,1);
168 outputValues(fieldOrdinal,pointOrdinal,1) = -tempValue;
177 virtual BasisPtr<typename Kokkos::HostSpace::device_type, OutputScalar, PointScalar>
179 using HostDeviceType =
typename Kokkos::HostSpace::device_type;
181 return Teuchos::rcp(
new HostBasisType(this->CurlBasis::polyOrder_) );
Kokkos::View< ordinal_type *, typename ExecutionSpace::array_layout, Kokkos::HostSpace > OrdinalTypeArray1DHost
View type for 1d host array.
virtual void getValues(const ExecutionSpace &, OutputViewType, const PointViewType, const EOperator=OPERATOR_VALUE) const
Evaluation of a FEM basis on a reference cell.
const char * getName() const override
Returns basis name.
Kokkos::DynRankView< scalarType, Kokkos::LayoutStride, DeviceType > ScalarViewType
View type for scalars.
virtual bool requireOrientation() const override
True if orientation is required.
Free functions, callable from device code, that implement various polynomials useful in basis definit...
H(curl) basis on the triangle using a construction involving Legendre and integrated Jacobi polynomia...
EFunctionSpace functionSpace_
The function space in which the basis is defined.
Header function for Intrepid2::Util class and other utility functions.
For mathematical details of the construction, see:
Kokkos::View< ordinal_type **, typename ExecutionSpace::array_layout, Kokkos::HostSpace > OrdinalTypeArray2DHost
View type for 2d host array.
Kokkos::DynRankView< PointValueType, Kokkos::LayoutStride, DeviceType > PointViewType
View type for input points.
HierarchicalBasis_HDIV_TRI(int polyOrder, const EPointType pointType=POINTTYPE_DEFAULT)
Constructor.
virtual void getValues(OutputViewType outputValues, const PointViewType inputPoints, const EOperator operatorType=OPERATOR_VALUE) const override
Evaluation of a FEM basis on a reference cell.
Kokkos::DynRankView< OutputValueType, Kokkos::LayoutStride, DeviceType > OutputViewType
View type for basis value output.
virtual void getValues(OutputViewType outputValues, const PointViewType inputPoints, const EOperator operatorType=OPERATOR_VALUE) const override
Evaluation of a FEM basis on a reference cell.
ordinal_type getDegree() const
Returns the degree of the basis.
Kokkos::DynRankView< OutputValueType, Kokkos::LayoutStride, DeviceType > OutputViewType
View type for basis value output.
Kokkos::DynRankView< PointValueType, Kokkos::LayoutStride, DeviceType > PointViewType
View type for input points.
Header file for the abstract base class Intrepid2::Basis.
typename DeviceType::execution_space ExecutionSpace
(Kokkos) Execution space for basis.
For mathematical details of the construction, see:
virtual BasisPtr< typename Kokkos::HostSpace::device_type, OutputScalar, PointScalar > getHostBasis() const override
Creates and returns a Basis object whose DeviceType template argument is Kokkos::HostSpace::device_ty...