42#ifndef STOKHOS_IFPACK2_UQ_PCE_HPP
43#define STOKHOS_IFPACK2_UQ_PCE_HPP
56template <
typename XV,
class SizeType>
60template <
typename S,
typename ... P,
class SizeType>
65 typedef Kokkos::View< Sacado::UQ::PCE<S>*,P... >
XVector;
70 typedef typename array_type::non_const_value_type
value_type;
71 typedef Kokkos::Details::ArithTraits<value_type>
KAT;
81 const typename XVector::non_const_value_type& min_val) :
84 m_min_val_mag(
KAT::abs(m_min_val)),
85 m_n_pce(
Kokkos::dimension_scalar(x)) {}
88 KOKKOS_INLINE_FUNCTION
92 if (KAT::abs(z) < m_min_val_mag)
100template<
class XV,
class SizeType>
103template<
class S,
class ...P,
class SizeType>
105 Kokkos::
View< Sacado::UQ::PCE<S>*,P... >, SizeType > {
106 typedef Kokkos::View< Sacado::UQ::PCE<S>*,P... >
XV;
110 const typename XV::non_const_value_type& minVal)
114 "LocalReciprocalThreshold not implemented for non-constant minVal");
124 V_ReciprocalThresholdSelfFunctor<XV, SizeType> op (X, minVal);
125 Kokkos::parallel_for( X.extent(0), op );
expr1 expr1 expr1 expr2 expr1 expr1 c expr2 expr1 c fastAccessCoeff(j) - expr2.val(j)
KOKKOS_INLINE_FUNCTION void raise_error(const char *msg)
KOKKOS_INLINE_FUNCTION constexpr std::enable_if< is_view_uq_pce< View< T, P... > >::value, unsigned >::type dimension_scalar(const View< T, P... > &view)
KOKKOS_INLINE_FUNCTION bool is_constant(const T &x)
static void compute(const XV &X, const typename XV::non_const_value_type &minVal)
Kokkos::View< Sacado::UQ::PCE< S > *, P... > XV
array_type::non_const_value_type value_type
const value_type m_min_val
KOKKOS_INLINE_FUNCTION void operator()(const size_type i) const
XVector::array_type array_type
Kokkos::View< Sacado::UQ::PCE< S > *, P... > XVector
Kokkos::Details::ArithTraits< value_type > KAT
array_type::execution_space execution_space
V_ReciprocalThresholdSelfFunctor(const XVector &x, const typename XVector::non_const_value_type &min_val)
const value_type m_min_val_mag