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++)
134 UnitTestSetup<int,double>
setup;
142 Teuchos::GlobalMPISession mpiSession(&argc, &
argv);
143 return Teuchos::UnitTestRepository::runUnitTestsFromMain(argc,
argv);
int main(int argc, char *argv[])
Legendre polynomial basis.
Class to store coefficients of a projection onto an orthogonal polynomial basis.
void reset(const Teuchos::RCP< const Stokhos::OrthogPolyBasis< ordinal_type, value_type > > &new_basis, ordinal_type sz=0)
Reset to a new basis.
reference term(ordinal_type dimension, ordinal_type order)
Get coefficient term for given dimension and order.
Orthogonal polynomial expansions based on numerical quadrature.
Multivariate orthogonal polynomial basis generated from a tensor product of univariate polynomials.
An operator for building pseudo-spectral coefficients using tensor-product quadrature.
Defines quadrature for a tensor product basis by tensor products of 1-D quadrature rules.
UnitTestSetup< int, double > setup
Stokhos::OrthogPolyApprox< OrdinalType, ValueType > cu2
Teuchos::RCP< Stokhos::PseudoSpectralOrthogPolyExpansion< OrdinalType, ValueType > > exp
Teuchos::RCP< Stokhos::PseudoSpectralOrthogPolyExpansion< OrdinalType, ValueType > > exp_linear
Teuchos::RCP< const Stokhos::Quadrature< OrdinalType, ValueType > > quad
Stokhos::OrthogPolyApprox< OrdinalType, ValueType > u
Stokhos::OrthogPolyApprox< OrdinalType, ValueType > x
Stokhos::OrthogPolyApprox< OrdinalType, ValueType > su
Teuchos::RCP< Stokhos::Sparse3Tensor< int, double > > Cijk
Stokhos::OrthogPolyApprox< OrdinalType, ValueType > cx
Teuchos::RCP< const Stokhos::PseudoSpectralOperator< OrdinalType, ValueType > > ps_op
Stokhos::TensorProductBasis< OrdinalType, ValueType > product_basis_type
Stokhos::OrthogPolyApprox< OrdinalType, ValueType > cu
Teuchos::RCP< Stokhos::Sparse3Tensor< int, double > > Cijk_linear
Stokhos::TotalOrderBasis< OrdinalType, ValueType > product_basis_type
Stokhos::OrthogPolyApprox< OrdinalType, ValueType > u2
Stokhos::OrthogPolyApprox< OrdinalType, ValueType > y
Teuchos::RCP< const product_basis_type > basis
Stokhos::OrthogPolyApprox< OrdinalType, ValueType > su2
Stokhos::OrthogPolyApprox< OrdinalType, ValueType > sx