25 template <
typename ordinal_type,
typename value_type>
34 = basisParams.template get< Teuchos::RCP< const OrthogPolyBasis<ordinal_type,value_type> > >(
"Stochastic Galerkin Basis",
Teuchos::null);
39 bool isotropic = basisParams.
get(
"Isotropic",
false);
44 bases[i] = create1DBasis(basisParams);
46 std::ostringstream ss;
49 bases[i] = create1DBasis(bp);
53 std::string type = basisParams.
get(
"Multivariate Type",
"Complete");
54 value_type drop = basisParams.
get(
"Cijk Drop Tolerance", 1e-12);
55 std::string ordering = basisParams.
get(
"Coefficient Ordering",
"Total");
57 if (type ==
"Complete") {
58 bool use_old = basisParams.
get(
"Use Old Cijk Algorithm",
false);
61 bases, drop, use_old));
64 else if (type ==
"Tensor Product") {
65 if (ordering ==
"Total")
68 else if (ordering ==
"Lexicographical")
74 std::endl <<
"Invalid coefficient ordering " << ordering << std::endl);
77 else if (type ==
"Total Order") {
78 if (ordering ==
"Total")
81 else if (ordering ==
"Lexicographical")
87 std::endl <<
"Invalid coefficient ordering " << ordering << std::endl);
90 else if (type ==
"Smolyak") {
91 ordinal_type order = basisParams.template get<ordinal_type>(
"Order");
93 if (ordering ==
"Total")
96 else if (ordering ==
"Lexicographical")
102 std::endl <<
"Invalid coefficient ordering " << ordering << std::endl);
108 std::endl <<
"Invalid multivariate basis type " << type << std::endl);
111 basisParams.
set(
"Stochastic Galerkin Basis", basis);
116 template <
typename ordinal_type,
typename value_type>
123 std::string type = bp.
get(
"Type",
"Legendre");
125 bool normalize = bp.
get(
"Normalize",
false);
126 bool isotropic = bp.
get(
"Isotropic",
false);
128 std::string growth_string = bp.
get(
"Growth Policy",
"Slow");
130 if (growth_string ==
"Slow")
132 else if (growth_string ==
"Moderate")
137 std::endl <<
"Invalid growth policy " << growth_string << std::endl);
139 if (type ==
"Legendre")
141 else if (type ==
"Clenshaw-Curtis") {
144 else if (type ==
"Gauss-Patterson") {
147 else if (type ==
"Hermite")
149 else if (type ==
"Jacobi") {
154 else if (type ==
"Rys") {
161 std::endl <<
"Invalid basis type " << type << std::endl);
Hermite polynomial basis.
Multivariate orthogonal polynomial basis generated from a total order tensor product of univariate po...
T & get(ParameterList &l, const std::string &name)
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
GrowthPolicy
Enumerated type for determining Smolyak growth policies.
RCP< ParameterList > sublist(const RCP< ParameterList > ¶mList, const std::string &name, bool mustAlreadyExist=false, const std::string &docString="")
ParameterList & set(std::string const &name, T &&value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
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)
Multivariate orthogonal polynomial basis generated from a total-order complete-polynomial tensor prod...
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.
An isotropic total order index set.
Legendre polynomial basis using Clenshaw-Curtis quadrature points.
static Teuchos::RCP< const Stokhos::OneDOrthogPolyBasis< ordinal_type, value_type > > create1DBasis(Teuchos::ParameterList ¶ms)
Generate 1-D basis.
A comparison functor implementing a strict weak ordering based lexographic ordering.
static Teuchos::RCP< const Stokhos::OrthogPolyBasis< ordinal_type, value_type > > create(Teuchos::ParameterList &sgParams)
Generate multivariate basis.