Stokhos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Stokhos_ProductLanczosPCEBasis.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_PCE_BASIS_HPP
11 #define STOKHOS_PRODUCT_LANCZOS_PCE_BASIS_HPP
12 
13 #include "Teuchos_RCP.hpp"
14 #include "Teuchos_Array.hpp"
18 
19 #include "Stokhos_ProductBasis.hpp"
22 #include "Stokhos_Quadrature.hpp"
25 
26 namespace Stokhos {
27 
38  template <typename ordinal_type, typename value_type>
40  public ProductBasis<ordinal_type,value_type>,
41  public ReducedPCEBasis<ordinal_type,value_type> {
42  public:
43 
45 
51  ordinal_type p,
56 
58  virtual ~ProductLanczosPCEBasis();
59 
61 
62 
64  ordinal_type order() const;
65 
67  ordinal_type dimension() const;
68 
70  virtual ordinal_type size() const;
71 
73 
77  virtual const Teuchos::Array<value_type>& norm_squared() const;
78 
80  virtual const value_type& norm_squared(ordinal_type i) const;
81 
83 
89  virtual
92 
94  virtual
97 
99  virtual value_type evaluateZero(ordinal_type i) const;
100 
102 
106  virtual void evaluateBases(
108  Teuchos::Array<value_type>& basis_vals) const;
109 
111  virtual void print(std::ostream& os) const;
112 
114  virtual const std::string& getName() const;
115 
117 
119 
120 
122 
127  virtual const MultiIndex<ordinal_type>& term(ordinal_type i) const;
128 
130 
134  virtual ordinal_type index(const MultiIndex<ordinal_type>& term) const;
135 
137 
141  value_type> > >
142  getCoordinateBases() const;
143 
145  virtual MultiIndex<ordinal_type> getMaxOrders() const;
146 
148 
150 
151 
153  virtual void
155  value_type *out,
156  ordinal_type ncol = 1,
157  bool transpose = false) const;
158 
160  virtual void
162  value_type *out,
163  ordinal_type ncol = 1,
164  bool transpose = false) const;
165 
168  getReducedQuadrature() const;
169 
171 
172  protected:
173 
174  // Determine if a pce is linear, in that it has a total degree of at
175  // most 1. If the pce is nonlinear, return -2, or if it is constant,
176  // return -1, otherwise return the index of the variable the pce is
177  // linear in, ie, if return value is i, the pce = a_{i+1}*\xi_i
180 
181  private:
182 
183  // Prohibit copying
185 
186  // Prohibit Assignment
188 
189  protected:
190 
193 
195  std::string name;
196 
199 
202 
205 
208 
211 
214 
217 
218  }; // class ProductLanczosPCEBasis
219 
220 } // Namespace Stokhos
221 
222 // Include template definitions
224 
225 #endif
Teuchos::SerialDenseMatrix< ordinal_type, value_type > SDM
virtual void print(std::ostream &os) const
Print basis to stream os.
Data structure storing a sparse 3-tensor C(i,j,k) in a a compressed format.
virtual Teuchos::RCP< Stokhos::Sparse3Tensor< ordinal_type, value_type > > computeTripleProductTensor() const
Compute triple product tensor.
SDM Phi
Values of transformed basis at quadrature points.
Generate a basis from a given set of PCE expansions that is orthogonal with respect to the product me...
SDM A
Transition matrix from reduced basis to original.
SDM Ainv
Projection matrix from original matrix to reduced.
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.
ProductLanczosPCEBasis(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.
virtual const std::string & getName() const
Return string name of basis.
virtual ordinal_type index(const MultiIndex< ordinal_type > &term) const
Get index of the multivariate polynomial given orders of each coordinate.
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.
ordinal_type dimension() const
Return dimension of basis.
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.
ordinal_type isInvariant(const Stokhos::OrthogPolyApprox< ordinal_type, value_type > &pce) const
Teuchos::ParameterList params
Algorithm parameters.
Abstract base class for multivariate orthogonal polynomials generated from tensor products of univari...
Teuchos::RCP< Stokhos::CompletePolynomialBasis< ordinal_type, value_type > > tensor_lanczos_basis
Product Lanczos basis.
virtual MultiIndex< ordinal_type > getMaxOrders() const
Return maximum order allowable for each coordinate basis.
Teuchos::RCP< const Stokhos::Quadrature< ordinal_type, value_type > > reduced_quad
Reduced quadrature object.
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 ordinal_type size() const
Return total size of basis.
Abstract base class for 1-D orthogonal polynomials.
virtual const MultiIndex< ordinal_type > & term(ordinal_type i) const
Get orders of each coordinate polynomial given an index i.
virtual const Teuchos::Array< value_type > & norm_squared() const
Return array storing norm-squared of each basis polynomial.
Teuchos::SerialDenseVector< ordinal_type, value_type > SDV
ordinal_type order() const
Return order of basis.
ProductLanczosPCEBasis & operator=(const ProductLanczosPCEBasis &)
virtual Teuchos::RCP< Stokhos::Sparse3Tensor< ordinal_type, value_type > > computeLinearTripleProductTensor() const
Compute linear triple product tensor where k = 0,1,..,d.
Teuchos::Array< Teuchos::RCP< const OneDOrthogPolyBasis< ordinal_type, value_type > > > getCoordinateBases() const
Return coordinate bases.
virtual value_type evaluateZero(ordinal_type i) const
Evaluate basis polynomial i at zero.