51 template <
typename ordinal_type,
typename value_type>
58 sgParams.
sublist(
"Pseudospectral Operator");
60 psopParams.template get< Teuchos::RCP<const psop_type> >(
"Stochastic Galerkin Pseudospectral Operator",
Teuchos::null);
68 basis = basisParams.template get< Teuchos::RCP<const OrthogPolyBasis<ordinal_type,value_type> > >(
"Stochastic Galerkin Basis");
73 std::string type = psopParams.
get(
"Type",
"Tensor Product");
75 if (type ==
"Tensor Product") {
76 bool use_pst = psopParams.
get(
"Use PST",
false);
82 else if (type ==
"Smolyak") {
83 bool use_pst = psopParams.
get(
"Use PST",
true);
84 bool use_smolyak = psopParams.
get(
"Use Smolyak Apply",
true);
88 *smolyak_basis, use_smolyak, use_pst));
91 else if (type ==
"Quadrature") {
95 quad = quadParams.template get<Teuchos::RCP<const Stokhos::Quadrature<ordinal_type,value_type> > >(
"Stochastic Galerkin Quadrature");
99 quadParams.
set(
"Stochastic Galerkin Quadrature", quad);
109 "Invalid pseudospectral operator type " << type << std::endl);
111 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)
ParameterList & set(std::string const &name, T const &value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
#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="")
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...