49 #ifndef __INTREPID2_HGRAD_QUAD_CN_FEM_HPP__
50 #define __INTREPID2_HGRAD_QUAD_CN_FEM_HPP__
71 template<EOperator opType>
73 template<
typename outputValueViewType,
74 typename inputPointViewType,
75 typename workViewType,
76 typename vinvViewType>
77 KOKKOS_INLINE_FUNCTION
79 getValues( outputValueViewType outputValues,
80 const inputPointViewType inputPoints,
82 const vinvViewType vinv,
83 const ordinal_type operatorDn = 0 );
86 template<
typename ExecSpaceType, ordinal_type numPtsPerEval,
87 typename outputValueValueType,
class ...outputValueProperties,
88 typename inputPointValueType,
class ...inputPointProperties,
89 typename vinvValueType,
class ...vinvProperties>
91 getValues( Kokkos::DynRankView<outputValueValueType,outputValueProperties...> outputValues,
92 const Kokkos::DynRankView<inputPointValueType, inputPointProperties...> inputPoints,
93 const Kokkos::DynRankView<vinvValueType, vinvProperties...> vinv,
100 template<
typename outputValueViewType,
101 typename inputPointViewType,
102 typename vinvViewType,
103 typename workViewType,
105 ordinal_type numPtsEval>
107 outputValueViewType _outputValues;
108 const inputPointViewType _inputPoints;
109 const vinvViewType _vinv;
111 const ordinal_type _opDn;
113 KOKKOS_INLINE_FUNCTION
114 Functor( outputValueViewType outputValues_,
115 inputPointViewType inputPoints_,
118 const ordinal_type opDn_ = 0 )
119 : _outputValues(outputValues_), _inputPoints(inputPoints_),
120 _vinv(vinv_), _work(work_), _opDn(opDn_) {}
122 KOKKOS_INLINE_FUNCTION
123 void operator()(
const size_type iter)
const {
127 const auto ptRange = Kokkos::pair<ordinal_type,ordinal_type>(ptBegin, ptEnd);
128 const auto input = Kokkos::subview( _inputPoints, ptRange, Kokkos::ALL() );
130 typename workViewType::pointer_type ptr = _work.data() + _work.extent(0)*ptBegin*get_dimension_scalar(_work);
132 auto vcprop = Kokkos::common_view_alloc_prop(_work);
133 workViewType work(Kokkos::view_wrap(ptr,vcprop), (ptEnd-ptBegin)*_work.extent(0));
136 case OPERATOR_VALUE : {
137 auto output = Kokkos::subview( _outputValues, Kokkos::ALL(), ptRange );
143 auto output = Kokkos::subview( _outputValues, Kokkos::ALL(), ptRange, Kokkos::ALL() );
148 INTREPID2_TEST_FOR_ABORT(
true,
149 ">>> ERROR: (Intrepid2::Basis_HGRAD_QUAD_Cn_FEM::Functor) operator is not supported");
163 template<
typename ExecSpaceType = void,
164 typename outputValueType = double,
165 typename pointValueType =
double>
167 :
public Basis<ExecSpaceType,outputValueType,pointValueType> {
173 using ordinal_type_array_1d_host INTREPID2_DEPRECATED_TYPENAME_REPLACEMENT(
"use OrdinalTypeArray1DHost instead",
"OrdinalTypeArray1DHost") = OrdinalTypeArray1DHost INTREPID2_DEPRECATED_TYPENAME_TRAILING_ATTRIBUTE(
"use OrdinalTypeArray1DHost instead");
174 using ordinal_type_array_2d_host INTREPID2_DEPRECATED_TYPENAME_REPLACEMENT(
"use OrdinalTypeArray2DHost instead",
"OrdinalTypeArray2DHost") = OrdinalTypeArray2DHost INTREPID2_DEPRECATED_TYPENAME_TRAILING_ATTRIBUTE(
"use OrdinalTypeArray2DHost instead");
175 using ordinal_type_array_3d_host INTREPID2_DEPRECATED_TYPENAME_REPLACEMENT(
"use OrdinalTypeArray3DHost instead",
"OrdinalTypeArray3DHost") = OrdinalTypeArray3DHost INTREPID2_DEPRECATED_TYPENAME_TRAILING_ATTRIBUTE(
"use OrdinalTypeArray3DHost instead");
181 using outputViewType INTREPID2_DEPRECATED_TYPENAME_REPLACEMENT(
"use OutputViewType instead",
"OutputViewType") = OutputViewType INTREPID2_DEPRECATED_TYPENAME_TRAILING_ATTRIBUTE(
"use OutputViewType instead");
182 using pointViewType INTREPID2_DEPRECATED_TYPENAME_REPLACEMENT(
"use PointViewType instead",
"PointViewType") = PointViewType INTREPID2_DEPRECATED_TYPENAME_TRAILING_ATTRIBUTE(
"use PointViewType instead");
183 using scalarViewType INTREPID2_DEPRECATED_TYPENAME_REPLACEMENT(
"use ScalarViewType instead",
"ScalarViewType") = ScalarViewType INTREPID2_DEPRECATED_TYPENAME_TRAILING_ATTRIBUTE(
"use ScalarViewType instead");
187 Kokkos::DynRankView<typename ScalarViewType::value_type,ExecSpaceType>
vinv_;
193 const EPointType pointType = POINTTYPE_EQUISPACED);
199 getValues( OutputViewType outputValues,
200 const PointViewType inputPoints,
201 const EOperator operatorType = OPERATOR_VALUE )
const {
202 #ifdef HAVE_INTREPID2_DEBUG
210 Impl::Basis_HGRAD_QUAD_Cn_FEM::
211 getValues<ExecSpaceType,numPtsPerEval>( outputValues,
219 getDofCoords( ScalarViewType dofCoords )
const {
220 #ifdef HAVE_INTREPID2_DEBUG
222 INTREPID2_TEST_FOR_EXCEPTION( dofCoords.rank() != 2, std::invalid_argument,
223 ">>> ERROR: (Intrepid2::Basis_HGRAD_QUAD_Cn_FEM::getDofCoords) rank = 2 required for dofCoords array");
225 INTREPID2_TEST_FOR_EXCEPTION(
static_cast<ordinal_type
>(dofCoords.extent(0)) != this->getCardinality(), std::invalid_argument,
226 ">>> ERROR: (Intrepid2::Basis_HGRAD_QUAD_Cn_FEM::getDofCoords) mismatch in number of dof and 0th dimension of dofCoords array");
228 INTREPID2_TEST_FOR_EXCEPTION( dofCoords.extent(1) != this->getBaseCellTopology().getDimension(), std::invalid_argument,
229 ">>> ERROR: (Intrepid2::Basis_HGRAD_QUAD_Cn_FEM::getDofCoords) incorrect reference cell (1st) dimension in dofCoords array");
231 Kokkos::deep_copy(dofCoords, this->
dofCoords_);
236 getDofCoeffs( ScalarViewType dofCoeffs )
const {
237 #ifdef HAVE_INTREPID2_DEBUG
239 INTREPID2_TEST_FOR_EXCEPTION( dofCoeffs.rank() != 1, std::invalid_argument,
240 ">>> ERROR: (Intrepid2::Basis_HGRAD_QUAD_Cn_FEM::getdofCoeffs) rank = 1 required for dofCoeffs array");
242 INTREPID2_TEST_FOR_EXCEPTION(
static_cast<ordinal_type
>(dofCoeffs.extent(0)) != this->getCardinality(), std::invalid_argument,
243 ">>> ERROR: (Intrepid2::Basis_HGRAD_QUAD_Cn_FEM::getdofCoeffs) mismatch in number of dof and 0th dimension of dofCoeffs array");
245 Kokkos::deep_copy(dofCoeffs, 1.0);
251 return "Intrepid2_HGRAD_QUAD_Cn_FEM";
256 requireOrientation()
const {
260 Kokkos::DynRankView<typename ScalarViewType::const_value_type,ExecSpaceType>
261 getVandermondeInverse()
const {
266 getWorkSizePerPoint(
const EOperator operatorType)
const {