18 namespace SparseGridQuadratureUnitTest {
21 template <
typename OrdinalType,
typename ValueType>
31 for (OrdinalType i=0; i<
d; i++)
43 #ifdef HAVE_STOKHOS_DAKOTA
46 const Stokhos::SparseGridQuadrature<int,double> quad(
47 setup.basis,
setup.p, 1e-12, Pecos::MODERATE_RESTRICTED_GROWTH);
49 int nqp = weights.
size();
58 <<
"Check: quad_weight.size() = " << nqp <<
" == " << nqp_gold
60 if (success) out <<
"Passed.";
71 setup.basis, index_set, 1e-12);
73 int nqp = weights.
size();
82 <<
"Check: quad_weight.size() = " << nqp <<
" == " << nqp_gold
84 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