49 #ifndef __INTREPID2_HGRAD_LINE_CN_FEM_HPP__
50 #define __INTREPID2_HGRAD_LINE_CN_FEM_HPP__
56 #include "Teuchos_LAPACK.hpp"
87 template<EOperator opType>
89 template<
typename outputValueViewType,
90 typename inputPointViewType,
91 typename workViewType,
92 typename vinvViewType>
93 KOKKOS_INLINE_FUNCTION
95 getValues( outputValueViewType outputValues,
96 const inputPointViewType inputPoints,
98 const vinvViewType vinv,
99 const ordinal_type operatorDn = 0 );
102 template<
typename ExecSpaceType, ordinal_type numPtsPerEval,
103 typename outputValueValueType,
class ...outputValueProperties,
104 typename inputPointValueType,
class ...inputPointProperties,
105 typename vinvValueType,
class ...vinvProperties>
107 getValues( Kokkos::DynRankView<outputValueValueType,outputValueProperties...> outputValues,
108 const Kokkos::DynRankView<inputPointValueType, inputPointProperties...> inputPoints,
109 const Kokkos::DynRankView<vinvValueType, vinvProperties...> vinv,
115 template<
typename outputValueViewType,
116 typename inputPointViewType,
117 typename vinvViewType,
118 typename workViewType,
120 ordinal_type numPtsEval>
122 outputValueViewType _outputValues;
123 const inputPointViewType _inputPoints;
124 const vinvViewType _vinv;
126 const ordinal_type _opDn;
128 KOKKOS_INLINE_FUNCTION
129 Functor( outputValueViewType outputValues_,
130 inputPointViewType inputPoints_,
133 const ordinal_type opDn_ = 0 )
134 : _outputValues(outputValues_), _inputPoints(inputPoints_),
135 _vinv(vinv_), _work(work_), _opDn(opDn_) {}
137 KOKKOS_INLINE_FUNCTION
138 void operator()(
const size_type iter)
const {
142 const auto ptRange = Kokkos::pair<ordinal_type,ordinal_type>(ptBegin, ptEnd);
143 const auto input = Kokkos::subview( _inputPoints, ptRange, Kokkos::ALL() );
145 typename workViewType::pointer_type ptr = _work.data() + _work.extent(0)*ptBegin*get_dimension_scalar(_work);
147 auto vcprop = Kokkos::common_view_alloc_prop(_work);
148 workViewType work(Kokkos::view_wrap(ptr,vcprop), (ptEnd-ptBegin)*_work.extent(0));
151 case OPERATOR_VALUE : {
152 auto output = Kokkos::subview( _outputValues, Kokkos::ALL(), ptRange );
157 auto output = Kokkos::subview( _outputValues, Kokkos::ALL(), ptRange, Kokkos::ALL() );
162 INTREPID2_TEST_FOR_ABORT(
true,
163 ">>> ERROR: (Intrepid2::Basis_HGRAD_LINE_Cn_FEM::Functor) operator is not supported");
172 template<
typename ExecSpaceType = void,
173 typename outputValueType = double,
174 typename pointValueType =
double>
176 :
public Basis<ExecSpaceType,outputValueType,pointValueType> {
182 using ordinal_type_array_1d_host INTREPID2_DEPRECATED_TYPENAME_REPLACEMENT(
"use OrdinalTypeArray1DHost instead",
"OrdinalTypeArray1DHost") = OrdinalTypeArray1DHost INTREPID2_DEPRECATED_TYPENAME_TRAILING_ATTRIBUTE(
"use OrdinalTypeArray1DHost instead");
183 using ordinal_type_array_2d_host INTREPID2_DEPRECATED_TYPENAME_REPLACEMENT(
"use OrdinalTypeArray2DHost instead",
"OrdinalTypeArray2DHost") = OrdinalTypeArray2DHost INTREPID2_DEPRECATED_TYPENAME_TRAILING_ATTRIBUTE(
"use OrdinalTypeArray2DHost instead");
184 using ordinal_type_array_3d_host INTREPID2_DEPRECATED_TYPENAME_REPLACEMENT(
"use OrdinalTypeArray3DHost instead",
"OrdinalTypeArray3DHost") = OrdinalTypeArray3DHost INTREPID2_DEPRECATED_TYPENAME_TRAILING_ATTRIBUTE(
"use OrdinalTypeArray3DHost instead");
190 using outputViewType INTREPID2_DEPRECATED_TYPENAME_REPLACEMENT(
"use OutputViewType instead",
"OutputViewType") = OutputViewType INTREPID2_DEPRECATED_TYPENAME_TRAILING_ATTRIBUTE(
"use OutputViewType instead");
191 using pointViewType INTREPID2_DEPRECATED_TYPENAME_REPLACEMENT(
"use PointViewType instead",
"PointViewType") = PointViewType INTREPID2_DEPRECATED_TYPENAME_TRAILING_ATTRIBUTE(
"use PointViewType instead");
192 using scalarViewType INTREPID2_DEPRECATED_TYPENAME_REPLACEMENT(
"use ScalarViewType instead",
"ScalarViewType") = ScalarViewType INTREPID2_DEPRECATED_TYPENAME_TRAILING_ATTRIBUTE(
"use ScalarViewType instead");
198 Kokkos::DynRankView<typename ScalarViewType::value_type,ExecSpaceType>
vinv_;
204 const EPointType pointType = POINTTYPE_EQUISPACED);
210 getValues( OutputViewType outputValues,
211 const PointViewType inputPoints,
212 const EOperator operatorType = OPERATOR_VALUE )
const {
213 #ifdef HAVE_INTREPID2_DEBUG
220 constexpr ordinal_type numPtsPerEval = 1;
221 Impl::Basis_HGRAD_LINE_Cn_FEM::
222 getValues<ExecSpaceType,numPtsPerEval>( outputValues,
230 getDofCoords( ScalarViewType dofCoords )
const {
231 #ifdef HAVE_INTREPID2_DEBUG
233 INTREPID2_TEST_FOR_EXCEPTION( dofCoords.rank() != 2, std::invalid_argument,
234 ">>> ERROR: (Intrepid2::Basis_HGRAD_LINE_Cn_FEM::getDofCoords) rank = 2 required for dofCoords array");
236 INTREPID2_TEST_FOR_EXCEPTION(
static_cast<ordinal_type
>(dofCoords.extent(0)) != this->getCardinality(), std::invalid_argument,
237 ">>> ERROR: (Intrepid2::Basis_HGRAD_LINE_Cn_FEM::getDofCoords) mismatch in number of dof and 0th dimension of dofCoords array");
239 INTREPID2_TEST_FOR_EXCEPTION( dofCoords.extent(1) != this->getBaseCellTopology().getDimension(), std::invalid_argument,
240 ">>> ERROR: (Intrepid2::Basis_HGRAD_LINE_Cn_FEM::getDofCoords) incorrect reference cell (1st) dimension in dofCoords array");
242 Kokkos::deep_copy(dofCoords, this->
dofCoords_);
247 getDofCoeffs( ScalarViewType dofCoeffs )
const {
248 #ifdef HAVE_INTREPID2_DEBUG
250 INTREPID2_TEST_FOR_EXCEPTION( dofCoeffs.rank() != 1, std::invalid_argument,
251 ">>> ERROR: (Intrepid2::Basis_HGRAD_LINE_Cn_FEM::getdofCoeffs) rank = 1 required for dofCoeffs array");
253 INTREPID2_TEST_FOR_EXCEPTION(
static_cast<ordinal_type
>(dofCoeffs.extent(0)) != this->getCardinality(), std::invalid_argument,
254 ">>> ERROR: (Intrepid2::Basis_HGRAD_LINE_Cn_FEM::getdofCoeffs) mismatch in number of dof and 0th dimension of dofCoeffs array");
256 Kokkos::deep_copy(dofCoeffs, 1.0);
262 return "Intrepid2_HGRAD_LINE_Cn_FEM";
266 getVandermondeInverse( ScalarViewType vinv )
const {
268 Kokkos::deep_copy(vinv, this->vinv_);
271 Kokkos::DynRankView<typename ScalarViewType::const_value_type,ExecSpaceType>
272 getVandermondeInverse()
const {
277 getWorkSizePerPoint(
const EOperator operatorType)
const {