19 namespace SmolyakBasisUtilsUnitTest {
22 template <
typename ordinal_type,
typename value_type>
41 template <
typename ordinal_type,
typename value_type>
57 out <<
"coeff " << basis1.
term(i) <<
" == " << basis2.
term(i) <<
" : ";
58 bool is_equal = basis1.
term(i) == basis2.
term(i);
60 out <<
"passed" << std::endl;
62 out <<
"failed" << std::endl;
79 bases, coeff_index_set);
101 bases, coeff_index_set);
125 bases, coeff_index_set);
136 *Cijk2,
"Total Order Cijk",
147 *Cijk2_lin,
"Total Order linear Cijk",
218 #ifdef HAVE_STOKHOS_DAKOTA
237 smolyak_basis.computeTripleProductTensor();
244 smolyak_basis.computeLinearTripleProductTensor();
270 smolyak_basis.computeTripleProductTensor();
277 smolyak_basis.computeLinearTripleProductTensor();
virtual Teuchos::RCP< Stokhos::Sparse3Tensor< ordinal_type, value_type > > computeTripleProductTensor() const
Compute triple product tensor.
bool testCoefficients(const Stokhos::ProductBasis< ordinal_type, value_type > &basis1, const Stokhos::ProductBasis< ordinal_type, value_type > &basis2, Teuchos::FancyOStream &out)
Multivariate orthogonal polynomial basis generated from a total order tensor product of univariate po...
virtual Teuchos::RCP< Stokhos::Sparse3Tensor< ordinal_type, value_type > > computeTripleProductTensor() const
Compute triple product tensor.
TEUCHOS_UNIT_TEST(Coefficients, IsotropicLinear)
virtual Teuchos::RCP< Stokhos::Sparse3Tensor< ordinal_type, value_type > > computeLinearTripleProductTensor() const
Compute linear triple product tensor where k = 0,1,..,d.
bool compareSparse3Tensor(const Stokhos::Sparse3Tensor< ordinal_type, scalar_type > &Cijk1, const std::string &cijk1_name, const Stokhos::Sparse3Tensor< ordinal_type, scalar_type > &Cijk2, const std::string &cijk2_name, const scalar_type &rel_tol, const scalar_type &abs_tol, Teuchos::FancyOStream &out)
bool testSparse3Tensor(const Stokhos::Sparse3Tensor< ordinal_type, scalar_type > &Cijk, const Stokhos::ProductBasis< ordinal_type, scalar_type > &basis, const scalar_type &sparse_tol, const scalar_type &rel_tol, const scalar_type &abs_tol, Teuchos::FancyOStream &out, bool linear=false)
Legendre polynomial basis using Gauss-Patterson quadrature points.
virtual Teuchos::RCP< Stokhos::Sparse3Tensor< ordinal_type, value_type > > computeLinearTripleProductTensor() const
Compute linear triple product tensor where k = 0,1,..,d.
static int runUnitTestsFromMain(int argc, char *argv[])
virtual const MultiIndex< ordinal_type > & term(ordinal_type i) const =0
Get orders of each coordinate polynomial given an index i.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Abstract base class for multivariate orthogonal polynomials generated from tensor products of univari...
An anisotropic total order index set.
Multivariate orthogonal polynomial basis generated from a Smolyak sparse grid.
Legendre polynomial basis.
int main(int argc, char **argv)
#define TEUCHOS_TEST_EQUALITY(v1, v2, out, success)
An isotropic total order index set.
UnitTestSetup< ordinal_type, value_type > setup_type
Legendre polynomial basis using Clenshaw-Curtis quadrature points.
virtual ordinal_type size() const =0
Return total size of basis.