Stokhos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Stokhos_ReducedQuadratureFactory.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_REDUCED_QUADRATURE_FACTORY_HPP
11 #define STOKHOS_REDUCED_QUADRATURE_FACTORY_HPP
12 
13 #include "Teuchos_RCP.hpp"
14 #include "Teuchos_Array.hpp"
15 #include "Teuchos_BLAS.hpp"
16 #include "Teuchos_LAPACK.hpp"
20 
21 namespace Stokhos {
22 
32  template <typename ordinal_type, typename value_type>
34  public:
35 
37 
41 
44 
51  const Teuchos::Array<value_type>& weights) const;
52 
53  protected:
54 
58  const Teuchos::Array<value_type>& weights,
62  ) const;
63 
67  const Teuchos::Array<value_type>& weights,
71  ) const;
72 
76  const Teuchos::Array<value_type>& weights,
80  ) const;
81 
86  const Teuchos::Array<value_type>& weights,
90  ) const;
91 
96  const Teuchos::Array<value_type>& weights,
100  ) const;
101 
106  Teuchos::ETransp transa, Teuchos::EUplo uplo) const;
107 
108  void solver_TRSM(
112  Teuchos::ETransp transa, Teuchos::EUplo uplo) const;
113 
114  void solver_GLPK(
118  Teuchos::ETransp transa, Teuchos::EUplo uplo) const;
119 
120  void solver_CLP(
124  Teuchos::ETransp transa, Teuchos::EUplo uplo) const;
125 
126  void solver_CLP_IP(
130  Teuchos::ETransp transa, Teuchos::EUplo uplo) const;
131 
132  void solver_qpOASES(
136  Teuchos::ETransp transa, Teuchos::EUplo uplo) const;
137 
142  Teuchos::ETransp transa, Teuchos::EUplo uplo) const;
143 
146  const value_type tol) const;
147 
151  ordinal_type n_choose_k(const ordinal_type& n, const ordinal_type& k) const;
152 
153  private:
154 
155  // Prohibit copying
157 
158  // Prohibit Assignment
160 
161  protected:
162 
165 
167  std::string reduction_method;
168 
170  std::string solver_method;
171 
174 
176  bool verbose;
177 
180 
183 
186 
187  }; // class ReducedQuadratureFactory
188 
189 } // Namespace Stokhos
190 
191 // Include template definitions
193 
194 #endif
void underdetermined_solver(const Teuchos::SerialDenseMatrix< ordinal_type, value_type > &A, const Teuchos::SerialDenseVector< ordinal_type, value_type > &b, Teuchos::SerialDenseVector< ordinal_type, value_type > &x, Teuchos::ETransp transa, Teuchos::EUplo uplo) const
ordinal_type n_choose_k(const ordinal_type &n, const ordinal_type &k) const
Compute bionomial coefficient (n ; k) = n!/( k! (n-k)! )
value_type reduction_tol
Dimension reduction tolerance.
value_type objective_value
Value used in LP-based objective function.
virtual Teuchos::RCP< const Stokhos::UserDefinedQuadrature< ordinal_type, value_type > > createReducedQuadrature(const Teuchos::SerialDenseMatrix< ordinal_type, value_type > &Q, const Teuchos::SerialDenseMatrix< ordinal_type, value_type > &Q2, const Teuchos::SerialDenseMatrix< ordinal_type, value_type > &F, const Teuchos::Array< value_type > &weights) const
Get reduced quadrature object.
ordinal_type computeRank(const Teuchos::SerialDenseMatrix< ordinal_type, value_type > &R, const value_type tol) const
void solver_TRSM(const Teuchos::SerialDenseMatrix< ordinal_type, value_type > &A, const Teuchos::SerialDenseVector< ordinal_type, value_type > &b, Teuchos::SerialDenseVector< ordinal_type, value_type > &x, Teuchos::ETransp transa, Teuchos::EUplo uplo) const
bool eliminate_dependent_rows
Whether to eliminate dependent rows in constraints.
bool verbose
Whether to print a bunch of stuff out.
Teuchos::ParameterList params
Algorithm parameters.
void solver_CLP_IP(const Teuchos::SerialDenseMatrix< ordinal_type, value_type > &A, const Teuchos::SerialDenseVector< ordinal_type, value_type > &b, Teuchos::SerialDenseVector< ordinal_type, value_type > &x, Teuchos::ETransp transa, Teuchos::EUplo uplo) const
std::string solver_method
Underdetermined solver method.
Teuchos::LAPACK< ordinal_type, value_type > lapack
void reducedQuadrature_Q_Squared_CPQR(const Teuchos::SerialDenseMatrix< ordinal_type, value_type > &Q, const Teuchos::SerialDenseMatrix< ordinal_type, value_type > &F, const Teuchos::Array< value_type > &weights, Teuchos::RCP< Teuchos::Array< value_type > > &red_weights, Teuchos::RCP< Teuchos::Array< Teuchos::Array< value_type > > > &red_points, Teuchos::RCP< Teuchos::Array< Teuchos::Array< value_type > > > &red_values) const
ReducedQuadratureFactory(const Teuchos::ParameterList &params)
Constructor.
void reducedQuadrature_Q2_CPQR(const Teuchos::SerialDenseMatrix< ordinal_type, value_type > &Q, const Teuchos::SerialDenseMatrix< ordinal_type, value_type > &Q2, const Teuchos::SerialDenseMatrix< ordinal_type, value_type > &F, const Teuchos::Array< value_type > &weights, Teuchos::RCP< Teuchos::Array< value_type > > &red_weights, Teuchos::RCP< Teuchos::Array< Teuchos::Array< value_type > > > &red_points, Teuchos::RCP< Teuchos::Array< Teuchos::Array< value_type > > > &red_values) const
void solver_qpOASES(const Teuchos::SerialDenseMatrix< ordinal_type, value_type > &A, const Teuchos::SerialDenseVector< ordinal_type, value_type > &b, Teuchos::SerialDenseVector< ordinal_type, value_type > &x, Teuchos::ETransp transa, Teuchos::EUplo uplo) const
void reducedQuadrature_Q2(const Teuchos::SerialDenseMatrix< ordinal_type, value_type > &Q, const Teuchos::SerialDenseMatrix< ordinal_type, value_type > &Q2, const Teuchos::SerialDenseMatrix< ordinal_type, value_type > &F, const Teuchos::Array< value_type > &weights, Teuchos::RCP< Teuchos::Array< value_type > > &red_weights, Teuchos::RCP< Teuchos::Array< Teuchos::Array< value_type > > > &red_points, Teuchos::RCP< Teuchos::Array< Teuchos::Array< value_type > > > &red_values) const
void solver_CompressedSensing(const Teuchos::SerialDenseMatrix< ordinal_type, value_type > &A, const Teuchos::SerialDenseVector< ordinal_type, value_type > &b, Teuchos::SerialDenseVector< ordinal_type, value_type > &x, Teuchos::ETransp transa, Teuchos::EUplo uplo) const
void solver_CLP(const Teuchos::SerialDenseMatrix< ordinal_type, value_type > &A, const Teuchos::SerialDenseVector< ordinal_type, value_type > &b, Teuchos::SerialDenseVector< ordinal_type, value_type > &x, Teuchos::ETransp transa, Teuchos::EUplo uplo) const
Generate a basis from a given set of PCE expansions that is orthogonal with respect to the product me...
void solver_GLPK(const Teuchos::SerialDenseMatrix< ordinal_type, value_type > &A, const Teuchos::SerialDenseVector< ordinal_type, value_type > &b, Teuchos::SerialDenseVector< ordinal_type, value_type > &x, Teuchos::ETransp transa, Teuchos::EUplo uplo) const
void reducedQuadrature_Q_Squared(const Teuchos::SerialDenseMatrix< ordinal_type, value_type > &Q, const Teuchos::SerialDenseMatrix< ordinal_type, value_type > &F, const Teuchos::Array< value_type > &weights, Teuchos::RCP< Teuchos::Array< value_type > > &red_weights, Teuchos::RCP< Teuchos::Array< Teuchos::Array< value_type > > > &red_points, Teuchos::RCP< Teuchos::Array< Teuchos::Array< value_type > > > &red_values) const
void reducedQuadrature_Q_Squared_CPQR2(const Teuchos::SerialDenseMatrix< ordinal_type, value_type > &Q, const Teuchos::SerialDenseMatrix< ordinal_type, value_type > &F, const Teuchos::Array< value_type > &weights, Teuchos::RCP< Teuchos::Array< value_type > > &red_weights, Teuchos::RCP< Teuchos::Array< Teuchos::Array< value_type > > > &red_points, Teuchos::RCP< Teuchos::Array< Teuchos::Array< value_type > > > &red_values) const
ReducedQuadratureFactory & operator=(const ReducedQuadratureFactory &)
Teuchos::BLAS< ordinal_type, value_type > blas