Stokhos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Stokhos_ReducedBasisFactoryImp.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 
16 
17 template <typename ordinal_type, typename value_type>
20  const Teuchos::ParameterList& params_) :
21  params(params_),
22  reduction_method(params.get("Reduced Basis Method",
23  "Monomial Proj Gram-Schmidt"))
24 {
25 }
26 
27 template <typename ordinal_type, typename value_type>
31  ordinal_type p,
35 {
36  // Compute reduced basis
38 
39  if (reduction_method == "Monomial Proj Gram-Schmidt")
41 
42  else if (reduction_method == "Monomial Proj Gram-Schmidt2")
44 
45  else if (reduction_method == "Monomial Gram-Schmidt")
47 
48  else if (reduction_method == "Product Lanczos")
49  red_basis = Teuchos::rcp(new Stokhos::ProductLanczosPCEBasis<ordinal_type,value_type>(p, pce, quad, Cijk, params));
50 
51  else if (reduction_method == "Product Lanczos Gram-Schmidt")
52  red_basis = Teuchos::rcp(new Stokhos::ProductLanczosGramSchmidtPCEBasis<ordinal_type,value_type>(p, pce, quad, Cijk, params));
53 
54  else
56  true, std::logic_error,
57  "Invalid reduced basis method " << reduction_method);
58 
59  return red_basis;
60 }
ReducedBasisFactory(const Teuchos::ParameterList &params)
Constructor.
Data structure storing a sparse 3-tensor C(i,j,k) in a a compressed format.
Generate a basis from a given set of PCE expansions that is orthogonal with respect to the product me...
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Generate a basis from a given set of PCE expansions that is orthogonal with respect to the product me...
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Abstract base class for quadrature methods.
Generate a basis from a given set of PCE expansions that is orthogonal with respect to the product me...
virtual Teuchos::RCP< Stokhos::ReducedPCEBasis< ordinal_type, value_type > > createReducedBasis(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
Get reduced quadrature object.
Generate a basis from a given set of PCE expansions that is orthogonal with respect to the product me...
Generate a basis from a given set of PCE expansions that is orthogonal with respect to the product me...