Stokhos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Stokhos_VectorOrthogPoly.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Stokhos Package
4 //
5 // Copyright 2009 NTESS and the Stokhos contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef STOKHOS_VECTORORTHOGPOLY_HPP
11 #define STOKHOS_VECTORORTHOGPOLY_HPP
12 
15 
16 namespace Stokhos {
17 
23  template <typename coeff_type>
24  class VectorOrthogPoly : public virtual ProductContainer<coeff_type> {
25  public:
26 
29 
32 
35 
37 
42 
50 
59  const typename traits_type::cloner_type& cloner);
60 
62 
66 
68  virtual ~VectorOrthogPoly();
69 
71 
75 
77 
80  void reset(
83  const typename traits_type::cloner_type& cloner);
84 
87  basis() const;
88 
90  coeff_type& term(ordinal_type dimension, ordinal_type order);
91 
93  const coeff_type& term(ordinal_type dimension, ordinal_type order) const;
94 
96 
99  void evaluate(const Teuchos::Array<value_type>& basis_values,
100  coeff_type& result) const;
101 
103  void sumIntoAllTerms(const value_type& weight,
104  const Teuchos::Array<value_type>& basis_values,
105  const Teuchos::Array<value_type>& basis_norms,
106  const coeff_type& vec);
107 
109  std::ostream& print(std::ostream& os) const;
110 
111  protected:
112 
115 
116  }; // class VectorOrthogPoly
117 
118  template <typename coeff_type>
119  std::ostream& operator << (std::ostream& os,
120  const VectorOrthogPoly<coeff_type>& vec) {
121  return vec.print(os);
122  }
123 
124 } // end namespace Stokhos
125 
126 // include template definitions
128 
129 #endif // STOKHOS_VECTORORTHOGPOLY_HPP
ProductContainer< coeff_type >::ordinal_type ordinal_type
Typename of ordinals.
void sumIntoAllTerms(const value_type &weight, const Teuchos::Array< value_type > &basis_values, const Teuchos::Array< value_type > &basis_norms, const coeff_type &vec)
Evaluate polynomial at supplied basis values.
Cloner for Epetra_Vector coefficients.
VectorOrthogPoly()
Constructor with no basis.
std::ostream & print(std::ostream &os) const
Print polynomial.
VectorOrthogPoly & operator=(const VectorOrthogPoly &)
Assignment.
Base traits definition for ProductContainer.
Abstract base class for multivariate orthogonal polynomials.
std::ostream & operator<<(std::ostream &os, const ProductContainer< coeff_type > &vec)
Teuchos::RCP< const Stokhos::OrthogPolyBasis< ordinal_type, value_type > > basis_
Basis.
A product (in the mathematical sense) container class whose coefficients are vectors, operators, or in general any type that would have an expensive copy constructor.
traits_type::ordinal_type ordinal_type
Typename of ordinals.
A container class storing an orthogonal polynomial whose coefficients are vectors, operators, or in general any type that would have an expensive copy constructor.
void evaluate(const Teuchos::Array< value_type > &basis_values, coeff_type &result) const
Evaluate polynomial at supplied basis values.
ProductContainer< coeff_type >::traits_type traits_type
Typename of traits.
Teuchos::RCP< const Stokhos::OrthogPolyBasis< ordinal_type, value_type > > basis() const
Get basis.
void reset(const Teuchos::RCP< const Stokhos::OrthogPolyBasis< ordinal_type, value_type > > &new_basis, const Teuchos::RCP< const Epetra_BlockMap > &new_map, const typename traits_type::cloner_type &cloner)
Reset to a new basis.
traits_type::value_type value_type
Typename of values.
coeff_type & term(ordinal_type dimension, ordinal_type order)
Get term for dimension dimension and order order.
ProductContainer< coeff_type >::value_type value_type
Typename of values.