53 namespace SmolyakBasisUtilsUnitTest {
56 template <
typename ordinal_type,
typename value_type>
75 template <
typename ordinal_type,
typename value_type>
91 out <<
"coeff " << basis1.
term(i) <<
" == " << basis2.
term(i) <<
" : ";
92 bool is_equal = basis1.
term(i) == basis2.
term(i);
94 out <<
"passed" << std::endl;
96 out <<
"failed" << std::endl;
113 bases, coeff_index_set);
135 bases, coeff_index_set);
159 bases, coeff_index_set);
170 *Cijk2,
"Total Order Cijk",
181 *Cijk2_lin,
"Total Order linear Cijk",
252 #ifdef HAVE_STOKHOS_DAKOTA
271 smolyak_basis.computeTripleProductTensor();
278 smolyak_basis.computeLinearTripleProductTensor();
304 smolyak_basis.computeTripleProductTensor();
311 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.