17 #ifndef Intrepid2_HierarchicalBasis_HDIV_TRI_h
18 #define Intrepid2_HierarchicalBasis_HDIV_TRI_h
20 #include <Kokkos_DynRankView.hpp>
22 #include <Intrepid2_config.h>
40 template<
typename DeviceType,
41 typename OutputScalar = double,
42 typename PointScalar = double,
43 bool useCGBasis =
true>
80 return "Intrepid2_HierarchicalBasis_HDIV_TRI";
113 const EOperator operatorType = OPERATOR_VALUE )
const override
116 if (operatorType == OPERATOR_DIV)
120 else if (operatorType == OPERATOR_VALUE)
124 const ordinal_type numFields = outputValues.extent_int(0);
125 const ordinal_type numPoints = outputValues.extent_int(1);
127 auto policy = Kokkos::MDRangePolicy<ExecutionSpace,Kokkos::Rank<2>>(Kokkos::Array<int,2>{0,0},Kokkos::Array<int,2>{numFields,numPoints});
130 Kokkos::parallel_for(
"apply rotation to H(curl) values", policy,
131 KOKKOS_LAMBDA (
const int &fieldOrdinal,
const int &pointOrdinal) {
132 const auto tempValue = outputValues(fieldOrdinal,pointOrdinal,0);
133 outputValues(fieldOrdinal,pointOrdinal,0) = outputValues(fieldOrdinal,pointOrdinal,1);
134 outputValues(fieldOrdinal,pointOrdinal,1) = -tempValue;
143 virtual BasisPtr<typename Kokkos::HostSpace::device_type, OutputScalar, PointScalar>
145 using HostDeviceType =
typename Kokkos::HostSpace::device_type;
147 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.
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.
virtual KOKKOS_INLINE_FUNCTION void getValues(OutputViewType, const PointViewType, const EOperator, const typename Kokkos::TeamPolicy< ExecutionSpace >::member_type &teamMember, const typename ExecutionSpace::scratch_memory_space &scratchStorage, const ordinal_type subcellDim=-1, const ordinal_type subcellOrdinal=-1) const
Team-level evaluation of basis functions on a reference cell.
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...