44 #ifdef HAVE_STOKHOS_DAKOTA
45 #include "sandia_rules.hpp"
49 template <
typename ordinal_type,
typename value_type>
55 #ifdef HAVE_STOKHOS_DAKOTA
60 template <
typename ordinal_type,
typename value_type>
65 isotropic(basis.isotropic)
69 template <
typename ordinal_type,
typename value_type>
75 template <
typename ordinal_type,
typename value_type>
83 #ifdef HAVE_STOKHOS_DAKOTA
86 num_points = quad_order;
88 num_points = quad_order+1;
89 quad_points.
resize(num_points);
90 quad_weights.
resize(num_points);
91 quad_values.resize(num_points);
93 webbur::clenshaw_curtis_compute(
94 num_points, &quad_points[0], &quad_weights[0]);
97 quad_weights[i] *= 0.5;
98 quad_values[i].
resize(this->p+1);
99 this->evaluateBases(quad_points[i], quad_values[i]);
104 true, std::logic_error,
"Clenshaw-Curtis requires TriKota to be enabled!");
108 template <
typename ordinal_type,
typename value_type>
118 template <
typename ordinal_type,
typename value_type>
127 template <
typename ordinal_type,
typename value_type>
137 template <
typename ordinal_type,
typename value_type>
~ClenshawCurtisLegendreBasis()
Destructor.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
virtual ordinal_type quadDegreeOfExactness(ordinal_type n) const
virtual ordinal_type coefficientGrowth(ordinal_type n) const
Evaluate coefficient growth rule for Smolyak-type bases.
virtual Teuchos::RCP< OneDOrthogPolyBasis< ordinal_type, value_type > > cloneWithOrder(ordinal_type p) const
Clone this object with the option of building a higher order basis.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
virtual ordinal_type pointGrowth(ordinal_type n) const
Evaluate point growth rule for Smolyak-type bases.
void resize(size_type new_size, const value_type &x=value_type())
Legendre polynomial basis.
Legendre polynomial basis using Clenshaw-Curtis quadrature points.
virtual void setSparseGridGrowthRule(LevelToOrderFnPtr ptr)
Set sparse grid rule.
ClenshawCurtisLegendreBasis(ordinal_type p, bool normalize=false, bool isotropic=false)
Constructor.
virtual void getQuadPoints(ordinal_type quad_order, Teuchos::Array< value_type > &points, Teuchos::Array< value_type > &weights, Teuchos::Array< Teuchos::Array< value_type > > &values) const
Compute quadrature points, weights, and values of basis polynomials at given set of points points...