60 "hermite",
"legendre",
"clenshaw-curtis",
"gauss-patterson",
"rys",
"jacobi" };
74 "complete",
"tensor",
"total",
"smolyak" };
82 "total",
"lexicographic",
"morton-z" };
91 "This example prints out the dimensionality of various basis choices.\n");
93 CLP.
setOption(
"dimension", &d,
"Stochastic dimension");
95 CLP.
setOption(
"order", &p,
"Polynomial order");
96 double drop = 1.0e-12;
97 CLP.
setOption(
"drop", &drop,
"Drop tolerance");
107 CLP.
setOption(
"product_basis", &prod_basis_type,
110 "Product basis type");
112 CLP.
setOption(
"ordering", &ordering_type,
115 "Product basis ordering");
117 CLP.
setOption(
"alpha", &alpha,
"Jacobi alpha index");
119 CLP.
setOption(
"beta", &beta,
"Jacobi beta index");
122 CLP.
parse( argc, argv );
126 for (
int i=0; i<d; i++) {
129 p,
true, growth_type));
132 p,
true, growth_type));
141 else if (basis_type ==
RYS)
143 p, 1.0,
true, growth_type));
144 else if (basis_type ==
JACOBI)
146 p, alpha, beta,
true, growth_type));
156 else if (prod_basis_type ==
TENSOR) {
170 else if (prod_basis_type ==
TOTAL) {
184 else if (prod_basis_type ==
SMOLYAK) {
189 bases, index_set, drop));
193 bases, index_set, drop));
197 bases, index_set, drop));
204 std::cout <<
"order = " << p <<
" dim = " << d
205 <<
" basis size = " << basis->size()
206 <<
" sparse grid size = " << quad->size()
209 catch (std::exception& e) {
210 std::cout << e.what() << std::endl;
const ProductBasisType prod_basis_type_values[]
Hermite polynomial basis.
Multivariate orthogonal polynomial basis generated from a total order tensor product of univariate po...
const char * basis_type_names[]
const BasisType basis_type_values[]
const int num_prod_basis_types
GrowthPolicy
Enumerated type for determining Smolyak growth policies.
const char * growth_type_names[]
const OrderingType ordering_type_values[]
const int num_ordering_types
Defines quadrature for a tensor product basis by Smolyak sparse grids.
A comparison functor implementing a strict weak ordering based total-order ordering, recursive on the dimension.
Legendre polynomial basis using Gauss-Patterson quadrature points.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
void setOption(const char option_true[], const char option_false[], bool *option_val, const char documentation[]=NULL)
const int num_growth_types
EParseCommandLineReturn parse(int argc, char *argv[], std::ostream *errout=&std::cerr) const
const Stokhos::GrowthPolicy growth_type_values[]
Multivariate orthogonal polynomial basis generated from a Smolyak sparse grid.
Multivariate orthogonal polynomial basis generated from a tensor product of univariate polynomials...
Legendre polynomial basis.
int main(int argc, char **argv)
An isotropic total order index set.
A comparison functor implementing a strict weak ordering based Morton Z-ordering. ...
Legendre polynomial basis using Clenshaw-Curtis quadrature points.
void setDocString(const char doc_string[])
A comparison functor implementing a strict weak ordering based lexographic ordering.
const int num_basis_types
const char * ordering_type_names[]
const char * prod_basis_type_names[]