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>
62 Teuchos::RCP<const product_basis_type>
basis;
63 Teuchos::RCP<const Stokhos::Quadrature<OrdinalType,ValueType> >
quad;
64 Teuchos::RCP<const Stokhos::PseudoSpectralOperator<OrdinalType,ValueType> >
ps_op;
66 Teuchos::RCP< Stokhos::PseudoSpectralOrthogPolyExpansion<OrdinalType,ValueType> >
exp,
exp_linear;
67 Stokhos::OrthogPolyApprox<OrdinalType,ValueType> x,
y,
u,
u2,
cx,
cu,
cu2,
sx,
su,
su2;
76 const OrdinalType d = 2;
77 const OrdinalType p = 7;
80 Teuchos::Array< Teuchos::RCP<const Stokhos::OneDOrthogPolyBasis<OrdinalType,ValueType> > > bases(d);
81 for (OrdinalType i=0; i<d; i++)
93 Teuchos::Array< Stokhos::EvenGrowthRule<OrdinalType> > point_growth(d);
98 Cijk =
basis->computeTripleProductTensor();
121 for (OrdinalType i=0; i<d; i++) {
126 for (OrdinalType i=0; i<d; i++)
142 Teuchos::GlobalMPISession mpiSession(&argc, &
argv);
143 return Teuchos::UnitTestRepository::runUnitTestsFromMain(argc,
argv);
Stokhos::OrthogPolyApprox< OrdinalType, ValueType > y
Teuchos::RCP< Stokhos::PseudoSpectralOrthogPolyExpansion< OrdinalType, ValueType > > exp_linear
Teuchos::RCP< const product_basis_type > basis
Stokhos::TensorProductBasis< OrdinalType, ValueType > product_basis_type
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
Stokhos::OrthogPolyApprox< OrdinalType, ValueType > cu
Multivariate orthogonal polynomial basis generated from a tensor product of univariate polynomials...
Teuchos::RCP< Stokhos::Sparse3Tensor< int, double > > Cijk_linear
int main(int argc, char *argv[])
Teuchos::RCP< const Stokhos::PseudoSpectralOperator< OrdinalType, ValueType > > ps_op
Stokhos::TotalOrderBasis< OrdinalType, ValueType > product_basis_type
An operator for building pseudo-spectral coefficients using tensor-product quadrature.
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.