28 "hermite",
"legendre",
"clenshaw-curtis",
"gauss-patterson",
"rys",
"jacobi" };
42 "complete",
"tensor",
"total",
"smolyak" };
50 "total",
"lexicographic",
"morton-z" };
59 "This example prints out the dimensionality of various basis choices.\n");
61 CLP.
setOption(
"dimension", &d,
"Stochastic dimension");
63 CLP.
setOption(
"order", &p,
"Polynomial order");
64 double drop = 1.0e-12;
65 CLP.
setOption(
"drop", &drop,
"Drop tolerance");
75 CLP.
setOption(
"product_basis", &prod_basis_type,
78 "Product basis type");
83 "Product basis ordering");
85 CLP.
setOption(
"alpha", &alpha,
"Jacobi alpha index");
87 CLP.
setOption(
"beta", &beta,
"Jacobi beta index");
90 CLP.
parse( argc, argv );
94 for (
int i=0; i<d; i++) {
97 p,
true, growth_type));
100 p,
true, growth_type));
109 else if (basis_type ==
RYS)
111 p, 1.0,
true, growth_type));
112 else if (basis_type ==
JACOBI)
114 p, alpha, beta,
true, growth_type));
124 else if (prod_basis_type ==
TENSOR) {
138 else if (prod_basis_type ==
TOTAL) {
152 else if (prod_basis_type ==
SMOLYAK) {
157 bases, index_set, drop));
161 bases, index_set, drop));
165 bases, index_set, drop));
172 std::cout <<
"order = " << p <<
" dim = " << d
173 <<
" basis size = " << basis->size()
174 <<
" sparse grid size = " << quad->size()
177 catch (std::exception& e) {
178 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[]