44 #include "Teuchos_UnitTestHarness.hpp" 45 #include "Teuchos_TestingHelpers.hpp" 46 #include "Teuchos_UnitTestRepository.hpp" 47 #include "Teuchos_GlobalMPISession.hpp" 56 template <
typename OrdinalType,
typename ValueType>
63 Teuchos::RCP<const product_basis_type>
basis;
64 Teuchos::RCP<const Stokhos::Quadrature<OrdinalType,ValueType> >
quad;
65 Teuchos::RCP<const Stokhos::PseudoSpectralOperator<OrdinalType,ValueType> >
ps_op;
67 Teuchos::RCP< Stokhos::PseudoSpectralOrthogPolyExpansion<OrdinalType,ValueType> >
exp,
exp_linear;
68 Stokhos::OrthogPolyApprox<OrdinalType,ValueType> x,
y,
u,
u2,
cx,
cu,
cu2,
sx,
su,
su2;
77 const OrdinalType d = 2;
78 const OrdinalType p = 7;
81 Teuchos::Array< Teuchos::RCP<const Stokhos::OneDOrthogPolyBasis<OrdinalType,ValueType> > > bases(d);
82 for (OrdinalType i=0; i<d; i++)
99 Cijk =
basis->computeTripleProductTensor();
122 for (OrdinalType i=0; i<d; i++) {
127 for (OrdinalType i=0; i<d; i++)
143 Teuchos::GlobalMPISession mpiSession(&argc, &
argv);
144 return Teuchos::UnitTestRepository::runUnitTestsFromMain(argc,
argv);
Stokhos::OrthogPolyApprox< OrdinalType, ValueType > y
Teuchos::RCP< Stokhos::PseudoSpectralOrthogPolyExpansion< OrdinalType, ValueType > > exp_linear
int main(int argc, char *argv[])
Teuchos::RCP< const product_basis_type > basis
Stokhos::OrthogPolyApprox< OrdinalType, ValueType > u
Stokhos::OrthogPolyApprox< OrdinalType, ValueType > u2
Teuchos::RCP< const Stokhos::Quadrature< OrdinalType, ValueType > > quad
UnitTestSetup< int, double > setup
Teuchos::RCP< Stokhos::Sparse3Tensor< int, double > > Cijk
Stokhos::OrthogPolyApprox< OrdinalType, ValueType > sx
Stokhos::OrthogPolyApprox< OrdinalType, ValueType > su
void reset(const Teuchos::RCP< const Stokhos::OrthogPolyBasis< ordinal_type, value_type > > &new_basis, ordinal_type sz=0)
Reset to a new basis.
Stokhos::OrthogPolyApprox< OrdinalType, ValueType > cx
An operator for building pseudo-spectral coefficients using a sparse Smolyak construction.
Stokhos::OrthogPolyApprox< OrdinalType, ValueType > cu
Multivariate orthogonal polynomial basis generated from a Smolyak sparse grid.
An isotropic total order index set.
Teuchos::RCP< Stokhos::Sparse3Tensor< int, double > > Cijk_linear
Teuchos::RCP< const Stokhos::PseudoSpectralOperator< OrdinalType, ValueType > > ps_op
Stokhos::SmolyakBasis< OrdinalType, ValueType > product_basis_type
Stokhos::TotalOrderBasis< OrdinalType, ValueType > product_basis_type
Teuchos::RCP< Stokhos::PseudoSpectralOrthogPolyExpansion< OrdinalType, ValueType > > exp
Orthogonal polynomial expansions based on numerical quadrature.
Stokhos::OrthogPolyApprox< OrdinalType, ValueType > su2
Defines quadrature for a tensor product basis by tensor products of 1-D quadrature rules...
Stokhos::OrthogPolyApprox< OrdinalType, ValueType > cu2
Stokhos::OrthogPolyApprox< OrdinalType, ValueType > x
reference term(ordinal_type dimension, ordinal_type order)
Get coefficient term for given dimension and order.