19 namespace SmolyakBasisUtilsUnitTest {
22 template <
typename ordinal_type,
typename value_type>
47 for (
int i=0; i<x.
size(); i++)
55 for (
int i=0; i<x.
size(); i++)
71 *smolyak_basis,
false);
74 Stokhos::SparseGridQuadrature<ordinal_type,value_type> quad(
75 smolyak_basis,
setup.
p, 1e-12, Pecos::SLOW_RESTRICTED_GROWTH);
77 *smolyak_basis, quad);
110 *smolyak_basis,
false);
113 Stokhos::SparseGridQuadrature<ordinal_type,value_type> quad(
114 smolyak_basis,
setup.
p, 1e-12, Pecos::MODERATE_RESTRICTED_GROWTH);
116 *smolyak_basis, quad);
146 *smolyak_basis,
true);
149 Stokhos::SparseGridQuadrature<ordinal_type,value_type> quad(
150 smolyak_basis,
setup.
p, 1e-12, Pecos::SLOW_RESTRICTED_GROWTH);
152 *smolyak_basis, quad);
189 *smolyak_basis,
true);
192 Stokhos::SparseGridQuadrature<ordinal_type,value_type> quad(
193 smolyak_basis,
setup.
p, 1e-12, Pecos::MODERATE_RESTRICTED_GROWTH);
195 *smolyak_basis, quad);
221 #ifdef HAVE_STOKHOS_DAKOTA
234 *smolyak_basis,
false);
237 Stokhos::SparseGridQuadrature<ordinal_type,value_type> quad(
238 smolyak_basis,
setup.
p, 1e-12, Pecos::UNRESTRICTED_GROWTH);
240 *smolyak_basis, quad);
270 *smolyak_basis,
false);
273 Stokhos::SparseGridQuadrature<ordinal_type,value_type> quad(
274 smolyak_basis,
setup.
p, 1e-12, Pecos::UNRESTRICTED_GROWTH);
276 *smolyak_basis, quad);
306 *smolyak_basis,
true);
309 Stokhos::SparseGridQuadrature<ordinal_type,value_type> quad(
310 smolyak_basis,
setup.
p, 1e-12, Pecos::UNRESTRICTED_GROWTH);
312 *smolyak_basis, quad);
349 *smolyak_basis,
true);
352 Stokhos::SparseGridQuadrature<ordinal_type,value_type> quad(
353 smolyak_basis,
setup.
p, 1e-12, Pecos::UNRESTRICTED_GROWTH);
355 *smolyak_basis, quad);
TEUCHOS_UNIT_TEST(Coefficients, IsotropicLinear)
Legendre polynomial basis using Gauss-Patterson quadrature points.
static int runUnitTestsFromMain(int argc, char *argv[])
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
An operator for building pseudo-spectral coefficients using a sparse Smolyak construction.
value_type quad_func2(const Teuchos::ArrayView< const value_type > &x)
Multivariate orthogonal polynomial basis generated from a Smolyak sparse grid.
KOKKOS_INLINE_FUNCTION PCE< Storage > exp(const PCE< Storage > &a)
Legendre polynomial basis.
int main(int argc, char **argv)
An isotropic total order index set.
UnitTestSetup< ordinal_type, value_type > setup_type
bool testPseudoSpectralDiscreteOrthogonality(const basis_type &basis, const operator_type &op, const scalar_type &rel_tol, const scalar_type &abs_tol, Teuchos::FancyOStream &out)
Legendre polynomial basis using Clenshaw-Curtis quadrature points.
KOKKOS_INLINE_FUNCTION PCE< Storage > sin(const PCE< Storage > &a)
An operator for building pseudo-spectral coefficients using an arbitrary quadrature rule...
bool testPseudoSpectralPoints(const operator_type1 &op1, const operator_type2 &op2, const scalar_type &rel_tol, const scalar_type &abs_tol, Teuchos::FancyOStream &out)
bool testPseudoSpectralApply(const operator_type1 &op1, const operator_type2 &op2, const func_type1 &func1, const func_type2 &func2, const scalar_type &rel_tol, const scalar_type &abs_tol, Teuchos::FancyOStream &out)
Defines quadrature for a tensor product basis by tensor products of 1-D quadrature rules...
bool testPseudoSpectralApplyTrans(const operator_type1 &op1, const operator_type2 &op2, const func_type1 &func1, const func_type2 &func2, const scalar_type &rel_tol, const scalar_type &abs_tol, Teuchos::FancyOStream &out)
value_type quad_func1(const Teuchos::ArrayView< const value_type > &x)