17 template <
typename ordinal_type,
typename value_type>
25 quadParams.template get< Teuchos::RCP<const Stokhos::Quadrature<ordinal_type,value_type> > >(
"Stochastic Galerkin Quadrature",
Teuchos::null);
33 basis = basisParams.template get< Teuchos::RCP<const Stokhos::OrthogPolyBasis<ordinal_type,value_type> > >(
"Stochastic Galerkin Basis");
39 std::string quad_type = quadParams.
get(
"Type",
"Tensor Product");
40 if (quad_type ==
"Tensor Product") {
51 else if (quad_type ==
"Sparse Grid") {
52 #ifdef HAVE_STOKHOS_DAKOTA
54 value_type dup_tol = quadParams.
get(
"Duplicate Tolerance", 1e-12);
56 "Growth Rule", Pecos::SLOW_RESTRICTED_GROWTH);
58 Teuchos::rcp(
new Stokhos::SparseGridQuadrature<ordinal_type,value_type>(
59 product_basis, level, dup_tol, growth));
63 "Error! Stokhos::QuadratureFactory::create(): " <<
64 "Sparse Grid Quadrature requires Dakota!" << std::endl);
70 "Error! Stokhos::QuadratureFactory::create(): " <<
71 "Invalid quadrature type " << quad_type << std::endl);
73 quadParams.
set(
"Stochastic Galerkin Quadrature", quad);
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 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...