48 #ifndef __INTREPID2_HVOL_TET_CN_FEM_HPP__
49 #define __INTREPID2_HVOL_TET_CN_FEM_HPP__
54 #include "Teuchos_LAPACK.hpp"
85 template<EOperator opType>
87 template<
typename outputValueViewType,
88 typename inputPointViewType,
89 typename workViewType,
90 typename vinvViewType>
91 KOKKOS_INLINE_FUNCTION
93 getValues( outputValueViewType outputValues,
94 const inputPointViewType inputPoints,
96 const vinvViewType vinv );
99 KOKKOS_INLINE_FUNCTION
101 getWorkSizePerPoint(ordinal_type order) {
102 auto cardinality = getPnCardinality<3>(order);
107 return 7*cardinality;
110 return getDkCardinality<opType,3>()*cardinality;
115 template<
typename ExecSpaceType, ordinal_type numPtsPerEval,
116 typename outputValueValueType,
class ...outputValueProperties,
117 typename inputPointValueType,
class ...inputPointProperties,
118 typename vinvValueType,
class ...vinvProperties>
120 getValues( Kokkos::DynRankView<outputValueValueType,outputValueProperties...> outputValues,
121 const Kokkos::DynRankView<inputPointValueType, inputPointProperties...> inputPoints,
122 const Kokkos::DynRankView<vinvValueType, vinvProperties...> vinv,
128 template<
typename outputValueViewType,
129 typename inputPointViewType,
130 typename vinvViewType,
131 typename workViewType,
133 ordinal_type numPtsEval>
135 outputValueViewType _outputValues;
136 const inputPointViewType _inputPoints;
137 const vinvViewType _vinv;
140 KOKKOS_INLINE_FUNCTION
141 Functor( outputValueViewType outputValues_,
142 inputPointViewType inputPoints_,
145 : _outputValues(outputValues_), _inputPoints(inputPoints_),
146 _vinv(vinv_), _work(work_) {}
148 KOKKOS_INLINE_FUNCTION
149 void operator()(
const size_type iter)
const {
153 const auto ptRange = Kokkos::pair<ordinal_type,ordinal_type>(ptBegin, ptEnd);
154 const auto input = Kokkos::subview( _inputPoints, ptRange, Kokkos::ALL() );
156 typename workViewType::pointer_type ptr = _work.data() + _work.extent(0)*ptBegin*get_dimension_scalar(_work);
158 auto vcprop = Kokkos::common_view_alloc_prop(_work);
159 workViewType work(Kokkos::view_wrap(ptr,vcprop), (ptEnd-ptBegin)*_work.extent(0));
162 case OPERATOR_VALUE : {
163 auto output = Kokkos::subview( _outputValues, Kokkos::ALL(), ptRange );
172 auto output = Kokkos::subview( _outputValues, Kokkos::ALL(), ptRange, Kokkos::ALL() );
177 INTREPID2_TEST_FOR_ABORT(
true,
178 ">>> ERROR: (Intrepid2::Basis_HVOL_TET_Cn_FEM::Functor) operator is not supported");
187 template<
typename ExecSpaceType = void,
188 typename outputValueType = double,
189 typename pointValueType =
double>
191 :
public Basis<ExecSpaceType,outputValueType,pointValueType> {
200 const EPointType pointType = POINTTYPE_EQUISPACED);
214 const EOperator operatorType = OPERATOR_VALUE)
const {
215 #ifdef HAVE_INTREPID2_DEBUG
223 Impl::Basis_HVOL_TET_Cn_FEM::
224 getValues<ExecSpaceType,numPtsPerEval>( outputValues,
233 #ifdef HAVE_INTREPID2_DEBUG
235 INTREPID2_TEST_FOR_EXCEPTION( dofCoords.rank() != 2, std::invalid_argument,
236 ">>> ERROR: (Intrepid2::Basis_HVOL_TET_Cn_FEM::getDofCoords) rank = 2 required for dofCoords array");
238 INTREPID2_TEST_FOR_EXCEPTION( static_cast<ordinal_type>(dofCoords.extent(0)) != this->
getCardinality(), std::invalid_argument,
239 ">>> ERROR: (Intrepid2::Basis_HVOL_TET_Cn_FEM::getDofCoords) mismatch in number of dof and 0th dimension of dofCoords array");
241 INTREPID2_TEST_FOR_EXCEPTION( dofCoords.extent(1) != this->
getBaseCellTopology().getDimension(), std::invalid_argument,
242 ">>> ERROR: (Intrepid2::Basis_HVOL_TET_Cn_FEM::getDofCoords) incorrect reference cell (1st) dimension in dofCoords array");
244 Kokkos::deep_copy(dofCoords, this->
dofCoords_);
250 #ifdef HAVE_INTREPID2_DEBUG
252 INTREPID2_TEST_FOR_EXCEPTION( dofCoeffs.rank() != 1, std::invalid_argument,
253 ">>> ERROR: (Intrepid2::Basis_HVOL_TET_Cn_FEM::getdofCoeffs) rank = 1 required for dofCoeffs array");
255 INTREPID2_TEST_FOR_EXCEPTION( static_cast<ordinal_type>(dofCoeffs.extent(0)) != this->
getCardinality(), std::invalid_argument,
256 ">>> ERROR: (Intrepid2::Basis_HVOL_TET_Cn_FEM::getdofCoeffs) mismatch in number of dof and 0th dimension of dofCoeffs array");
258 Kokkos::deep_copy(dofCoeffs, 1.0);
262 getVandermondeInverse( scalarViewType vinv )
const {
264 Kokkos::deep_copy(vinv, this->
vinv_);
270 return "Intrepid2_HVOL_TET_Cn_FEM";
283 Kokkos::DynRankView<scalarType,ExecSpaceType>
vinv_;