50 namespace SparseGridQuadratureUnitTest {
53 template <
typename OrdinalType,
typename ValueType>
63 for (OrdinalType i=0; i<
d; i++)
75 #ifdef HAVE_STOKHOS_DAKOTA
78 const Stokhos::SparseGridQuadrature<int,double> quad(
79 setup.basis,
setup.p, 1e-12, Pecos::MODERATE_RESTRICTED_GROWTH);
81 int nqp = weights.
size();
90 <<
"Check: quad_weight.size() = " << nqp <<
" == " << nqp_gold
92 if (success) out <<
"Passed.";
103 setup.basis, index_set, 1e-12);
105 int nqp = weights.
size();
114 <<
"Check: quad_weight.size() = " << nqp <<
" == " << nqp_gold
116 if (success) out <<
"Passed.";
Teuchos::RCP< const Stokhos::CompletePolynomialBasis< OrdinalType, ValueType > > basis
Defines quadrature for a tensor product basis by Smolyak sparse grids.
virtual const Teuchos::Array< value_type > & getQuadWeights() const
Get quadrature weights.
static int runUnitTestsFromMain(int argc, char *argv[])
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
int main(int argc, char **argv)
An isotropic total order index set.
TEUCHOS_UNIT_TEST(Stokhos_SmolyakSparseGridQuadrature, NumPoints)
UnitTestSetup< int, double > setup