51 template <
typename ordinal_type,
typename value_type>
59 quadParams.template get< Teuchos::RCP<const Stokhos::Quadrature<ordinal_type,value_type> > >(
"Stochastic Galerkin Quadrature",
Teuchos::null);
67 basis = basisParams.template get< Teuchos::RCP<const Stokhos::OrthogPolyBasis<ordinal_type,value_type> > >(
"Stochastic Galerkin Basis");
73 std::string quad_type = quadParams.
get(
"Type",
"Tensor Product");
74 if (quad_type ==
"Tensor Product") {
85 else if (quad_type ==
"Sparse Grid") {
86 #ifdef HAVE_STOKHOS_DAKOTA
88 value_type dup_tol = quadParams.
get(
"Duplicate Tolerance", 1e-12);
90 "Growth Rule", Pecos::SLOW_RESTRICTED_GROWTH);
92 Teuchos::rcp(
new Stokhos::SparseGridQuadrature<ordinal_type,value_type>(
93 product_basis, level, dup_tol, growth));
97 "Error! Stokhos::QuadratureFactory::create(): " <<
98 "Sparse Grid Quadrature requires Dakota!" << std::endl);
104 "Error! Stokhos::QuadratureFactory::create(): " <<
105 "Invalid quadrature type " << quad_type << std::endl);
107 quadParams.
set(
"Stochastic Galerkin Quadrature", quad);
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 multivariate orthogonal polynomials generated from tensor products of univari...
bool isType(const std::string &name) const
static Teuchos::RCP< const Stokhos::OrthogPolyBasis< ordinal_type, value_type > > create(Teuchos::ParameterList &sgParams)
Generate multivariate basis.
static Teuchos::RCP< const Stokhos::Quadrature< ordinal_type, value_type > > create(Teuchos::ParameterList &sgParams)
Generate quadrature object.
Defines quadrature for a tensor product basis by tensor products of 1-D quadrature rules...