15 #ifndef __INTREPID2_HDIV_WEDGE_I1_FEM_HPP__
16 #define __INTREPID2_HDIV_WEDGE_I1_FEM_HPP__
60 typedef struct Wedge<6> cell_topology_type;
64 template<EOperator opType>
66 template<
typename OutputViewType,
67 typename inputViewType>
68 KOKKOS_INLINE_FUNCTION
70 getValues( OutputViewType output,
71 const inputViewType input );
75 template<
typename DeviceType,
76 typename outputValueValueType,
class ...outputValueProperties,
77 typename inputPointValueType,
class ...inputPointProperties>
79 getValues( Kokkos::DynRankView<outputValueValueType,outputValueProperties...> outputValues,
80 const Kokkos::DynRankView<inputPointValueType, inputPointProperties...> inputPoints,
81 const EOperator operatorType);
86 template<
typename outputValueViewType,
87 typename inputPointViewType,
90 outputValueViewType _outputValues;
91 const inputPointViewType _inputPoints;
93 KOKKOS_INLINE_FUNCTION
94 Functor( outputValueViewType outputValues_,
95 inputPointViewType inputPoints_ )
96 : _outputValues(outputValues_), _inputPoints(inputPoints_) {}
98 KOKKOS_INLINE_FUNCTION
99 void operator()(
const ordinal_type pt)
const {
101 case OPERATOR_VALUE : {
102 auto output = Kokkos::subview( _outputValues, Kokkos::ALL(), pt, Kokkos::ALL() );
103 const auto input = Kokkos::subview( _inputPoints, pt, Kokkos::ALL() );
107 case OPERATOR_DIV : {
108 auto output = Kokkos::subview( _outputValues, Kokkos::ALL(), pt );
109 const auto input = Kokkos::subview( _inputPoints, pt, Kokkos::ALL() );
114 INTREPID2_TEST_FOR_ABORT( opType != OPERATOR_VALUE &&
115 opType != OPERATOR_DIV ,
116 ">>> ERROR: (Intrepid2::Basis_HDIV_WEDGE_I1_FEM::Serial::getValues) operator is not supported");
124 template<
typename DeviceType = void,
125 typename outputValueType = double,
126 typename pointValueType =
double>
145 getValues( OutputViewType outputValues,
146 const PointViewType inputPoints,
147 const EOperator operatorType = OPERATOR_VALUE )
const override {
148 #ifdef HAVE_INTREPID2_DEBUG
150 Intrepid2::getValues_HDIV_Args(outputValues,
156 Impl::Basis_HDIV_WEDGE_I1_FEM::
157 getValues<DeviceType>( outputValues,
163 getScratchSpaceSize( ordinal_type& perTeamSpaceSize,
164 ordinal_type& perThreadSpaceSize,
165 const PointViewType inputPointsconst,
166 const EOperator operatorType = OPERATOR_VALUE)
const override;
168 KOKKOS_INLINE_FUNCTION
171 OutputViewType outputValues,
172 const PointViewType inputPoints,
173 const EOperator operatorType,
174 const typename Kokkos::TeamPolicy<typename DeviceType::execution_space>::member_type& team_member,
175 const typename DeviceType::execution_space::scratch_memory_space & scratchStorage,
176 const ordinal_type subcellDim = -1,
177 const ordinal_type subcellOrdinal = -1)
const override;
181 getDofCoords( ScalarViewType dofCoords )
const override {
182 #ifdef HAVE_INTREPID2_DEBUG
184 INTREPID2_TEST_FOR_EXCEPTION( dofCoords.rank() != 2, std::invalid_argument,
185 ">>> ERROR: (Intrepid2::Basis_HDIV_WEDGE_I1_FEM::getDofCoords) rank = 2 required for dofCoords array");
187 INTREPID2_TEST_FOR_EXCEPTION( static_cast<ordinal_type>(dofCoords.extent(0)) != this->
basisCardinality_, std::invalid_argument,
188 ">>> ERROR: (Intrepid2::Basis_HDIV_WEDGE_I1_FEM::getDofCoords) mismatch in number of dof and 0th dimension of dofCoords array");
190 INTREPID2_TEST_FOR_EXCEPTION( dofCoords.extent(1) != this->
getBaseCellTopology().getDimension(), std::invalid_argument,
191 ">>> ERROR: (Intrepid2::Basis_HDIV_WEDGE_I1_FEM::getDofCoords) incorrect reference cell (1st) dimension in dofCoords array");
193 Kokkos::deep_copy(dofCoords, this->
dofCoords_);
199 getDofCoeffs( ScalarViewType dofCoeffs )
const override {
200 #ifdef HAVE_INTREPID2_DEBUG
202 INTREPID2_TEST_FOR_EXCEPTION( dofCoeffs.rank() != 2, std::invalid_argument,
203 ">>> ERROR: (Intrepid2::Basis_HDIV_WEDGE_I1_FEM::getDofCoeffs) rank = 2 required for dofCoeffs array");
205 INTREPID2_TEST_FOR_EXCEPTION( static_cast<ordinal_type>(dofCoeffs.extent(0)) != this->
getCardinality(), std::invalid_argument,
206 ">>> ERROR: (Intrepid2::Basis_HDIV_WEDGE_I1_FEM::getDofCoeffs) mismatch in number of dof and 0th dimension of dofCoeffs array");
208 INTREPID2_TEST_FOR_EXCEPTION( dofCoeffs.extent(1) != this->
getBaseCellTopology().getDimension(), std::invalid_argument,
209 ">>> ERROR: (Intrepid2::Basis_HDIV_WEDGE_I1_FEM::getDofCoeffs) incorrect reference cell (1st) dimension in dofCoeffs array");
211 Kokkos::deep_copy(dofCoeffs, this->
dofCoeffs_);
217 return "Intrepid2_HDIV_WEDGE_I1_FEM";
235 BasisPtr<DeviceType,outputValueType,pointValueType>
238 if(subCellDim == 2) {
239 if((subCellOrd >=0) && (subCellOrd<3))
240 return Teuchos::rcp(
new
242 if((subCellOrd==3)||(subCellOrd==4))
243 return Teuchos::rcp(
new
246 INTREPID2_TEST_FOR_EXCEPTION(
true,std::invalid_argument,
"Input parameters out of bounds");
250 BasisPtr<typename Kokkos::HostSpace::device_type,outputValueType,pointValueType>
See Intrepid2::Basis_HDIV_WEDGE_I1_FEM.
ordinal_type getCardinality() const
Returns cardinality of the basis.
See Intrepid2::Basis_HDIV_WEDGE_I1_FEM.
Basis_HDIV_WEDGE_I1_FEM()
Constructor.
See Intrepid2::Basis_HDIV_WEDGE_I1_FEM.
An abstract base class that defines interface for concrete basis implementations for Finite Element (...
shards::CellTopology getBaseCellTopology() const
Returns the base cell topology for which the basis is defined. See Shards documentation https://trili...
BasisPtr< DeviceType, outputValueType, pointValueType > getSubCellRefBasis(const ordinal_type subCellDim, const ordinal_type subCellOrd) const override
returns the basis associated to a subCell.
Header file for the Intrepid2::Basis_HVOL_C0_FEM class.
Implementation of the default HVOL-compatible FEM contstant basis on triangle, quadrilateral, hexahedron and tetrahedron cells.
ordinal_type basisCardinality_
Cardinality of the basis, i.e., the number of basis functions/degrees-of-freedom. ...
BasisPtr< typename Kokkos::HostSpace::device_type, outputValueType, pointValueType > getHostBasis() const override
Creates and returns a Basis object whose DeviceType template argument is Kokkos::HostSpace::device_ty...
Kokkos::DynRankView< scalarType, DeviceType > dofCoeffs_
Coefficients for computing degrees of freedom for Lagrangian basis If P is an element of the space sp...
Definition file for FEM basis functions of degree 1 for H(div) functions on WEDGE cells...
virtual bool requireOrientation() const override
True if orientation is required.
Implementation of the default H(grad)-compatible FEM basis of degree 1 on Wedge cell.
Kokkos::DynRankView< scalarType, DeviceType > dofCoords_
Coordinates of degrees-of-freedom for basis functions defined in physical space.
virtual const char * getName() const override
Returns basis name.
Header file for the abstract base class Intrepid2::Basis.