44#include "Teuchos_UnitTestHarness.hpp"
45#include "Teuchos_TestingHelpers.hpp"
46#include "Teuchos_UnitTestRepository.hpp"
47#include "Teuchos_GlobalMPISession.hpp"
55 template <
typename OrdinalType,
typename ValueType>
60 Teuchos::RCP<const Stokhos::CompletePolynomialBasis<OrdinalType,ValueType> >
basis;
61 Teuchos::RCP< Stokhos::ConstantOrthogPolyExpansion<OrdinalType,ValueType> >
exp;
71 const OrdinalType d = 2;
72 const OrdinalType p = 7;
75 Teuchos::Array< Teuchos::RCP<const Stokhos::OneDOrthogPolyBasis<OrdinalType,ValueType> > > bases(d);
76 for (OrdinalType i=0; i<d; i++)
95 UnitTestSetup<int,double>
setup;
99 return std::log(a+std::sqrt(a*a+1.0));
104 return std::log(a+std::sqrt(a*a-1.0));
109 return 0.5*std::log((1.0+a)/(1.0-a));
374 Teuchos::GlobalMPISession mpiSession(&argc, &
argv);
375 return Teuchos::UnitTestRepository::runUnitTestsFromMain(argc,
argv);
int main(int argc, char *argv[])
Multivariate orthogonal polynomial basis generated from a total-order complete-polynomial tensor prod...
Orthogonal polynomial expansion class for constant (size 1) expansions.
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.
ScalarType f(const Teuchos::Array< ScalarType > &x, double a, double b)
TEUCHOS_UNIT_TEST(Stokhos_ConstantExpansion, UMinus)
UnitTestSetup< int, double > setup
bool comparePCEs(const PCEType &a1, const std::string &a1_name, const Stokhos::OrthogPolyApprox< OrdinalType, ValueType > &a2, const std::string &a2_name, const ValueType &rel_tol, const ValueType &abs_tol, Teuchos::FancyOStream &out)
double operator()(double a) const
double operator()(double a) const
double operator()(double a) const
Teuchos::RCP< Stokhos::ConstantOrthogPolyExpansion< OrdinalType, ValueType > > exp
Teuchos::RCP< const Stokhos::CompletePolynomialBasis< OrdinalType, ValueType > > basis
Stokhos::OrthogPolyApprox< OrdinalType, ValueType > cu2
Stokhos::OrthogPolyApprox< OrdinalType, ValueType > cu
Stokhos::OrthogPolyApprox< OrdinalType, ValueType > cx