53 namespace SmolyakBasisUtilsUnitTest {
56 template <
typename ordinal_type,
typename value_type>
81 for (
int i=0; i<x.
size(); i++)
89 for (
int i=0; i<x.
size(); i++)
105 *smolyak_basis,
false);
108 Stokhos::SparseGridQuadrature<ordinal_type,value_type> quad(
109 smolyak_basis,
setup.
p, 1e-12, Pecos::SLOW_RESTRICTED_GROWTH);
111 *smolyak_basis, quad);
144 *smolyak_basis,
false);
147 Stokhos::SparseGridQuadrature<ordinal_type,value_type> quad(
148 smolyak_basis,
setup.
p, 1e-12, Pecos::MODERATE_RESTRICTED_GROWTH);
150 *smolyak_basis, quad);
180 *smolyak_basis,
true);
183 Stokhos::SparseGridQuadrature<ordinal_type,value_type> quad(
184 smolyak_basis,
setup.
p, 1e-12, Pecos::SLOW_RESTRICTED_GROWTH);
186 *smolyak_basis, quad);
223 *smolyak_basis,
true);
226 Stokhos::SparseGridQuadrature<ordinal_type,value_type> quad(
227 smolyak_basis,
setup.
p, 1e-12, Pecos::MODERATE_RESTRICTED_GROWTH);
229 *smolyak_basis, quad);
255 #ifdef HAVE_STOKHOS_DAKOTA
268 *smolyak_basis,
false);
271 Stokhos::SparseGridQuadrature<ordinal_type,value_type> quad(
272 smolyak_basis,
setup.
p, 1e-12, Pecos::UNRESTRICTED_GROWTH);
274 *smolyak_basis, quad);
304 *smolyak_basis,
false);
307 Stokhos::SparseGridQuadrature<ordinal_type,value_type> quad(
308 smolyak_basis,
setup.
p, 1e-12, Pecos::UNRESTRICTED_GROWTH);
310 *smolyak_basis, quad);
340 *smolyak_basis,
true);
343 Stokhos::SparseGridQuadrature<ordinal_type,value_type> quad(
344 smolyak_basis,
setup.
p, 1e-12, Pecos::UNRESTRICTED_GROWTH);
346 *smolyak_basis, quad);
383 *smolyak_basis,
true);
386 Stokhos::SparseGridQuadrature<ordinal_type,value_type> quad(
387 smolyak_basis,
setup.
p, 1e-12, Pecos::UNRESTRICTED_GROWTH);
389 *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)