Stokhos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Stokhos_ProductLanczosGramSchmidtPCEBasis.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_PRODUCT_LANCZOS_GRAM_SCHMIDT_PCE_BASIS_HPP
11 #define STOKHOS_PRODUCT_LANCZOS_GRAM_SCHMIDT_PCE_BASIS_HPP
12 
13 #include "Teuchos_RCP.hpp"
14 #include "Teuchos_Array.hpp"
18 
21 #include "Stokhos_Quadrature.hpp"
24 
25 namespace Stokhos {
26 
37  template <typename ordinal_type, typename value_type>
39  public ReducedPCEBasis<ordinal_type,value_type> {
40  public:
41 
43 
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 void print(std::ostream& os) const;
110 
112  virtual const std::string& getName() 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 
141  // Determine if a pce is linear, in that it has a total degree of at
142  // most 1. If the pce is nonlinear, return -2, or if it is constant,
143  // return -1, otherwise return the index of the variable the pce is
144  // linear in, ie, if return value is i, the pce = a_{i+1}*\xi_i
147 
148  private:
149 
150  // Prohibit copying
152 
153  // Prohibit Assignment
155 
156  protected:
157 
160 
162  std::string name;
163 
166 
169 
172 
175 
178 
181 
184 
187 
190 
193 
196 
197  }; // class ProductLanczosGramSchmidtPCEBasis
198 
199 } // Namespace Stokhos
200 
201 // Include template definitions
203 
204 #endif
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.
virtual value_type evaluateZero(ordinal_type i) const
Evaluate basis polynomial i at zero.
Teuchos::RCP< const Stokhos::Quadrature< ordinal_type, value_type > > reduced_quad
Reduced quadrature object.
Data structure storing a sparse 3-tensor C(i,j,k) in a a compressed format.
SDM Qp
Coefficients of transformed basis in original basis.
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 Teuchos::RCP< Stokhos::Sparse3Tensor< ordinal_type, value_type > > computeLinearTripleProductTensor() const
Compute linear triple product tensor where k = 0,1,..,d.
ordinal_type dimension() const
Return dimension of basis.
SDM Q
Values of transformed basis at quadrature points.
virtual Teuchos::RCP< Stokhos::Sparse3Tensor< ordinal_type, value_type > > computeTripleProductTensor() const
Compute triple product tensor.
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 ordinal_type size() const
Return total size of basis.
Generate a basis from a given set of PCE expansions that is orthogonal with respect to the product me...
Abstract base class for quadrature methods.
Abstract base class for reduced basis strategies built from polynomial chaos expansions in some other...
virtual void print(std::ostream &os) const
Print basis to stream os.
virtual Teuchos::RCP< const Stokhos::Quadrature< ordinal_type, value_type > > getReducedQuadrature() const
Get reduced quadrature object.
Stokhos::OrthogPolyApprox< ordinal_type, value_type > tmp_pce
Temporary pce used in invariant subspace calculations.
ProductLanczosGramSchmidtPCEBasis & operator=(const ProductLanczosGramSchmidtPCEBasis &)
virtual const std::string & getName() const
Return string name of basis.
virtual const Teuchos::Array< value_type > & norm_squared() const
Return array storing norm-squared of each basis polynomial.
Teuchos::SerialDenseMatrix< ordinal_type, value_type > SDM
Teuchos::RCP< Stokhos::CompletePolynomialBasis< ordinal_type, value_type > > tensor_lanczos_basis
Product Lanczos basis.
ProductLanczosGramSchmidtPCEBasis(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::RCP< const Stokhos::Sparse3Tensor< ordinal_type, value_type > > &Cijk, const Teuchos::ParameterList &params=Teuchos::ParameterList())
Constructor.
ordinal_type isInvariant(const Stokhos::OrthogPolyApprox< ordinal_type, value_type > &pce) const
Teuchos::SerialDenseVector< ordinal_type, value_type > SDV