Stokhos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Stokhos_MonomialProjGramSchmidtPCEBasis2.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_MONOMIAL_PROJ_GRAM_SCHMIDT_PCE_BASIS2_HPP
11 #define STOKHOS_MONOMIAL_PROJ_GRAM_SCHMIDT_PCE_BASIS2_HPP
12 
13 #include "Teuchos_RCP.hpp"
14 #include "Teuchos_Array.hpp"
15 #include "Teuchos_BLAS.hpp"
19 
22 #include "Stokhos_Quadrature.hpp"
24 
25 namespace Stokhos {
26 
36  template <typename ordinal_type, typename value_type>
38  public ReducedPCEBasis<ordinal_type,value_type> {
39  public:
40 
42 
54 
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 const std::string& getName() const;
110 
112  virtual void print(std::ostream& os) const;
113 
115 
117 
118 
120  virtual void
122  value_type *out,
123  ordinal_type ncol = 1,
124  bool transpose = false) const;
125 
127  virtual void
129  value_type *out,
130  ordinal_type ncol = 1,
131  bool transpose = false) const;
132 
135  getReducedQuadrature() const;
136 
138 
139  protected:
140 
142 
145  ordinal_type
146  buildQ(
147  ordinal_type max_p,
148  value_type threshold,
152  Teuchos::Array<ordinal_type>& num_terms_,
156 
157  private:
158 
159  // Prohibit copying
161 
162  // Prohibit Assignment
164 
165  protected:
166 
170 
172  std::string name;
173 
176 
179 
182 
185 
188 
191 
194 
197 
200 
203 
206 
209 
211  bool verbose;
212 
215 
218 
220 
221  }; // class MonomialProjGramSchmidtPCEBasis2
222 
223 } // Namespace Stokhos
224 
225 // Include template definitions
227 
228 #endif
virtual void evaluateBases(const Teuchos::ArrayView< const value_type > &point, Teuchos::Array< value_type > &basis_vals) const
Evaluate basis polynomials at given point point.
virtual const std::string & getName() const
Return string name of basis.
Teuchos::RCP< const Stokhos::Quadrature< ordinal_type, value_type > > reduced_quad
Reduced quadrature object.
virtual Teuchos::RCP< const Stokhos::Quadrature< ordinal_type, value_type > > getReducedQuadrature() const
Get reduced quadrature object.
Utilities for indexing a multi-variate complete polynomial basis.
MonomialProjGramSchmidtPCEBasis2(ordinal_type p, const Teuchos::Array< Stokhos::OrthogPolyApprox< ordinal_type, value_type > > &pce, const Teuchos::RCP< const Stokhos::Quadrature< ordinal_type, value_type > > &quad, const Teuchos::ParameterList &params=Teuchos::ParameterList())
Constructor.
Teuchos::SerialDenseVector< ordinal_type, value_type > SDV
ordinal_type buildQ(ordinal_type max_p, value_type threshold, const Teuchos::Array< Stokhos::OrthogPolyApprox< ordinal_type, value_type > > &pce, const Teuchos::RCP< const Stokhos::Quadrature< ordinal_type, value_type > > &quad, Teuchos::Array< Stokhos::MultiIndex< ordinal_type > > &terms_, Teuchos::Array< ordinal_type > &num_terms_, Teuchos::SerialDenseMatrix< ordinal_type, value_type > &Qp_, Teuchos::SerialDenseMatrix< ordinal_type, value_type > &A_, Teuchos::SerialDenseMatrix< ordinal_type, value_type > &F_)
Build the reduced basis, parameterized by total order max_p.
MonomialProjGramSchmidtPCEBasis2 & operator=(const MonomialProjGramSchmidtPCEBasis2 &b)
virtual Teuchos::RCP< Stokhos::Sparse3Tensor< ordinal_type, value_type > > computeTripleProductTensor() const
Compute triple product tensor.
SDM Q
Values of transformed basis at quadrature points.
virtual value_type evaluateZero(ordinal_type i) const
Evaluate basis polynomial i at zero.
Abstract base class for quadrature methods.
Abstract base class for reduced basis strategies built from polynomial chaos expansions in some other...
virtual void transformToOriginalBasis(const value_type *in, value_type *out, ordinal_type ncol=1, bool transpose=false) const
Transform coefficients to original basis from this basis.
Generate a basis from a given set of PCE expansions that is orthogonal with respect to the product me...
Teuchos::SerialDenseMatrix< ordinal_type, value_type > SDM
virtual const Teuchos::Array< value_type > & norm_squared() const
Return array storing norm-squared of each basis polynomial.
Stokhos::CompletePolynomialBasisUtils< ordinal_type, value_type > CPBUtils
ordinal_type dimension() const
Return dimension of basis.
SDM Qp
Coefficients of transformed basis in original basis.
virtual ordinal_type size() const
Return total size of basis.
Teuchos::Array< Stokhos::MultiIndex< ordinal_type > > terms
2-D array of basis terms
virtual void transformFromOriginalBasis(const value_type *in, value_type *out, ordinal_type ncol=1, bool transpose=false) const
Transform coefficients from original basis to this basis.
virtual Teuchos::RCP< Stokhos::Sparse3Tensor< ordinal_type, value_type > > computeLinearTripleProductTensor() const
Compute linear triple product tensor where k = 0,1,..,d.
Teuchos::RCP< const Stokhos::OrthogPolyBasis< ordinal_type, value_type > > pce_basis
Original pce basis.
virtual void print(std::ostream &os) const
Print basis to stream os.
Teuchos::Array< ordinal_type > num_terms
Number of terms up to each order.