Stokhos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Stokhos_GramSchmidtBasis.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_GRAMSCHMIDTBASIS_HPP
11 #define STOKHOS_GRAMSCHMIDTBASIS_HPP
12 
13 #include "Teuchos_RCP.hpp"
15 
17 
18 namespace Stokhos {
19 
37  template <typename ordinal_type, typename value_type>
39  public OrthogPolyBasis<ordinal_type,value_type> {
40  public:
41 
43 
52  const Teuchos::Array<value_type>& weights,
53  const value_type& sparse_tol = 1.0e-15);
54 
56  virtual ~GramSchmidtBasis();
57 
59 
60 
62  ordinal_type order() const;
63 
65  ordinal_type dimension() const;
66 
68  virtual ordinal_type size() const;
69 
71 
75  virtual const Teuchos::Array<value_type>& norm_squared() const;
76 
78  virtual const value_type& norm_squared(ordinal_type i) const;
79 
81 
87  virtual
90 
92  virtual
95 
97  virtual value_type evaluateZero(ordinal_type i) const;
98 
100 
104  virtual void evaluateBases(
106  Teuchos::Array<value_type>& basis_vals) const;
107 
109  virtual void print(std::ostream& os) const;
110 
112  virtual const std::string& getName() const;
113 
115 
117  void transformCoeffs(const value_type *in, value_type *out) const;
118 
119  private:
120 
121  // Prohibit copying
123 
124  // Prohibit Assignment
126 
127  protected:
128 
130  std::string name;
131 
134 
137 
140 
142  value_type sparse_tol;
143 
145  ordinal_type p;
146 
148  ordinal_type d;
149 
151  ordinal_type sz;
152 
155 
158 
160  mutable Teuchos::Array<value_type> basis_vals_tmp;
161 
162  }; // class GramSchmidtBasis
163 
164 } // Namespace Stokhos
165 
166 // Include template definitions
168 
169 #endif
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.
Abstract base class for multivariate orthogonal polynomials.
virtual value_type evaluateZero(ordinal_type i) const =0
Evaluate basis polynomial i at zero.
Transforms a non-orthogonal multivariate basis to an orthogonal one using the Gram-Schmit procedure...
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.