Stokhos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Stokhos_PecosOneDOrthogPolyBasis.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_PECOS_ONED_ORTHOG_POLY_BASIS_HPP
11 #define STOKHOS_PECOS_ONED_ORTHOG_POLY_BASIS_HPP
12 
13 #include "Stokhos_ConfigDefs.h"
14 #ifdef HAVE_STOKHOS_DAKOTA
15 
17 #include "TriKota_ConfigDefs.hpp"
18 #include "OrthogonalPolynomial.hpp"
19 
20 namespace Stokhos {
21 
25  template <typename ordinal_type, typename value_type>
26  class PecosOneDOrthogPolyBasis :
27  public OneDOrthogPolyBasis<ordinal_type, value_type> {
28  public:
29 
31 
35  PecosOneDOrthogPolyBasis(
37  const std::string& name, ordinal_type p);
38 
40  virtual ~PecosOneDOrthogPolyBasis();
41 
43 
44 
46  virtual ordinal_type order() const;
47 
49  virtual ordinal_type size() const;
50 
52 
56  virtual const Teuchos::Array<value_type>& norm_squared() const;
57 
59  virtual const value_type& norm_squared(ordinal_type i) const;
60 
62 
73  computeTripleProductTensor() const;
74 
75  virtual
77  computeSparseTripleProductTensor(ordinal_type order) const;
78 
80 
89  virtual Teuchos::RCP< Teuchos::SerialDenseMatrix<ordinal_type, value_type> > computeDerivDoubleProductTensor() const;
90 
92 
96  virtual void evaluateBases(const value_type& point,
97  Teuchos::Array<value_type>& basis_pts) const;
98 
103  virtual value_type evaluate(const value_type& point,
104  ordinal_type order) const;
105 
107  virtual void print(std::ostream& os) const;
108 
110  virtual const std::string& getName() const;
111 
129  virtual void
130  getQuadPoints(ordinal_type quad_order,
133  Teuchos::Array< Teuchos::Array<value_type> >& values) const;
134 
139  virtual ordinal_type quadDegreeOfExactness(ordinal_type n) const;
140 
142  virtual ordinal_type coefficientGrowth(ordinal_type n) const;
143 
145  virtual ordinal_type pointGrowth(ordinal_type n) const;
146 
148  typedef typename OneDOrthogPolyBasis<ordinal_type,value_type>::LevelToOrderFnPtr LevelToOrderFnPtr;
149 
151 
160  virtual LevelToOrderFnPtr getSparseGridGrowthRule() const {
161  return sparse_grid_growth_rule; }
162 
164  virtual void setSparseGridGrowthRule(LevelToOrderFnPtr ptr) {
165  sparse_grid_growth_rule = ptr; }
166 
178 
180 
182  virtual void evaluateBasesAndDerivatives(const value_type& point,
184  Teuchos::Array<value_type>& derivs) const;
185 
186  protected:
187 
189  PecosOneDOrthogPolyBasis(ordinal_type p,
190  const PecosOneDOrthogPolyBasis& basis);
191 
192  private:
193 
194  // Prohibit copying
195  PecosOneDOrthogPolyBasis(const PecosOneDOrthogPolyBasis&);
196 
197  // Prohibit Assignment
198  PecosOneDOrthogPolyBasis& operator=(const PecosOneDOrthogPolyBasis& b);
199 
200  protected:
201 
204 
206  std::string name;
207 
209  ordinal_type p;
210 
212  LevelToOrderFnPtr sparse_grid_growth_rule;
213 
216 
217  }; // class PecosOneDOrthogPolyBasis
218 
219 } // Namespace Stokhos
220 
221 // Include template definitions
223 
224 #endif // HAVE_STOKHOS_DAKOTA
225 
226 #endif // STOKHOS_PECOS_ONED_ORTHOG_POLY_BASIS_HPP