Stokhos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Stokhos_OrthogPolyBasis.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_ORTHOGPOLYBASIS_HPP
11 #define STOKHOS_ORTHOGPOLYBASIS_HPP
12 
13 #include <ostream>
14 #include <string>
16 #include "Stokhos_Dense3Tensor.hpp"
18 #include "Teuchos_Array.hpp"
19 #include "Teuchos_ArrayView.hpp"
21 
22 namespace Stokhos {
23 
25 
39  template <typename ordinal_type, typename value_type>
41  public:
42 
45 
47  virtual ~OrthogPolyBasis() {};
48 
50  virtual ordinal_type order() const = 0;
51 
53  virtual ordinal_type dimension() const = 0;
54 
56  virtual ordinal_type size() const = 0;
57 
59 
63  virtual const Teuchos::Array<value_type>& norm_squared() const = 0;
64 
66  virtual const value_type& norm_squared(ordinal_type i) const = 0;
67 
69 
75  virtual
77  computeTripleProductTensor() const = 0;
78 
80  virtual
83 
85  virtual value_type evaluateZero(ordinal_type i) const = 0;
86 
88 
92  virtual void evaluateBases(
94  Teuchos::Array<value_type>& basis_vals) const = 0;
95 
97  virtual void print(std::ostream& os) const = 0;
98 
100  virtual const std::string& getName() const = 0;
101 
102  private:
103 
104  // Prohibit copying
106 
107  // Prohibit Assignment
109 
110  }; // class OrthogPolyBasis
111 
113  template <typename ordinal_type, typename value_type>
114  std::ostream& operator << (std::ostream& os,
116  {
117  b.print(os);
118  return os;
119  }
120 
121 } // Namespace Stokhos
122 
123 #endif // STOKHOS_ORTHOGPOLYBASIS
virtual Teuchos::RCP< Stokhos::Sparse3Tensor< ordinal_type, value_type > > computeTripleProductTensor() const =0
Compute triple product tensor.
virtual ordinal_type order() const =0
Return order of basis.
virtual void evaluateBases(const Teuchos::ArrayView< const value_type > &point, Teuchos::Array< value_type > &basis_vals) const =0
Evaluate basis polynomials at given point point.
OrthogPolyBasis & operator=(const OrthogPolyBasis &b)
virtual ordinal_type dimension() const =0
Return dimension of basis.
virtual ~OrthogPolyBasis()
Destructor.
Abstract base class for multivariate orthogonal polynomials.
std::ostream & operator<<(std::ostream &os, const ProductContainer< coeff_type > &vec)
virtual value_type evaluateZero(ordinal_type i) const =0
Evaluate basis polynomial i at zero.
virtual const Teuchos::Array< value_type > & norm_squared() const =0
Return array storing norm-squared of each basis polynomial.
virtual void print(std::ostream &os) const =0
Print basis to stream os.
virtual Teuchos::RCP< Stokhos::Sparse3Tensor< ordinal_type, value_type > > computeLinearTripleProductTensor() const =0
Compute linear triple product tensor where k = 0,1.
virtual ordinal_type size() const =0
Return total size of basis.
virtual const std::string & getName() const =0
Return string name of basis.