17 template <
typename ordinal_type,
typename value_type>
24 sgParams.
sublist(
"Pseudospectral Operator");
26 psopParams.template get< Teuchos::RCP<const psop_type> >(
"Stochastic Galerkin Pseudospectral Operator",
Teuchos::null);
34 basis = basisParams.template get< Teuchos::RCP<const OrthogPolyBasis<ordinal_type,value_type> > >(
"Stochastic Galerkin Basis");
39 std::string type = psopParams.
get(
"Type",
"Tensor Product");
41 if (type ==
"Tensor Product") {
42 bool use_pst = psopParams.
get(
"Use PST",
false);
48 else if (type ==
"Smolyak") {
49 bool use_pst = psopParams.
get(
"Use PST",
true);
50 bool use_smolyak = psopParams.
get(
"Use Smolyak Apply",
true);
54 *smolyak_basis, use_smolyak, use_pst));
57 else if (type ==
"Quadrature") {
61 quad = quadParams.template get<Teuchos::RCP<const Stokhos::Quadrature<ordinal_type,value_type> > >(
"Stochastic Galerkin Quadrature");
65 quadParams.
set(
"Stochastic Galerkin Quadrature", quad);
75 "Invalid pseudospectral operator type " << type << std::endl);
77 psopParams.
set(
"Stochastic Galerkin Pseudospectral Operator", psop);
static Teuchos::RCP< const psop_type > create(Teuchos::ParameterList &sgParams)
Generate pseudospectral operator object.
T & get(ParameterList &l, const std::string &name)
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
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)
Abstract base class for multivariate orthogonal polynomials.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Abstract base class for quadrature methods.
An operator for building pseudo-spectral coefficients using a sparse Smolyak construction.
Abstract base class for multivariate orthogonal polynomials generated from tensor products of univari...
Multivariate orthogonal polynomial basis generated from a Smolyak sparse grid.
Factory for building multivariate orthogonal polynomial bases.
An operator for building pseudo-spectral coefficients using tensor-product quadrature.
static Teuchos::RCP< const Stokhos::Quadrature< ordinal_type, value_type > > create(Teuchos::ParameterList &sgParams)
Generate quadrature object.
An operator for building pseudo-spectral coefficients using an arbitrary quadrature rule...