44 #ifndef STOKHOS_AdaptivityManager_HPP
45 #define STOKHOS_AdaptivityManager_HPP
47 #include "Stokhos_config.h"
63 #ifdef HAVE_STOKHOS_BOOST
64 #include <boost/unordered_map.hpp>
77 bool onlyUseLinear,
int kExpOrder,
130 bool onlyUseLinear=
false,
bool includeMean=
true)
const;
191 double getValue(
int i,
int j,
int k)
const;
194 #ifdef HAVE_STOKHOS_BOOST
197 IJK(
int i,
int j,
int k) : i_(i), j_(j), k_(k) {}
200 {
return i_==ijk.i_ && j_==ijk.j_ && k_==ijk.k_; }
204 std::size_t operator()(
const IJK & ijk)
const;
207 boost::unordered_map<IJK,double,IJKHash> hashMap_;
233 #endif // STOKHOS_AdaptivityUtils_HPP
Teuchos::RCP< const Stokhos::ProductBasis< int, double > > getColStochasticBasis(int determLid) const
A container class storing an orthogonal polynomial whose coefficients are vectors, operators, or in general any type that would have an expensive copy constructor.
std::vector< Teuchos::RCP< const Stokhos::ProductBasis< int, double > > > sg_basis_col_dof_
std::vector< Teuchos::RCP< const Stokhos::ProductBasis< int, double > > > sg_basis_row_dof_
bool operator==(const aligned_allocator< T > &, const aligned_allocator< U > &)
const Stokhos::Sparse3Tensor< int, double > & Cijk_
Teuchos::RCP< const Stokhos::ProductBasis< int, double > > getRowStochasticBasis(int determLid) const
void setupOperator(Epetra_CrsMatrix &A, const Sparse3Tensor< int, double > &Cijk, Stokhos::EpetraOperatorOrthogPoly &poly, bool onlyUseLinear=false, bool includeMean=true) const
Teuchos::RCP< const Epetra_Map > getAdaptedMap() const
void copyFromAdaptiveVector(const Epetra_Vector &x, Stokhos::EpetraVectorOrthogPoly &x_sg) const
void copyToAdaptiveVector(const Stokhos::EpetraVectorOrthogPoly &x_sg, Epetra_Vector &x) const
int getGlobalColId(int determLid, int basisIndex) const
std::vector< int > myRowGidOffsets_
A container class storing an orthogonal polynomial whose coefficients are vectors, operators, or in general any type that would have an expensive copy constructor.
int getColStochasticBasisSize(int determLid) const
Sparse3TensorHash(const Stokhos::Sparse3Tensor< int, double > &Cijk)
void setupWithGraph(const Epetra_CrsGraph &graph, bool onlyUseLinear, int kExpOrder)
std::vector< int > myColGidOffsets_
int getRowStochasticBasisSize(int determLid) const
Teuchos::RCP< Epetra_CrsMatrix > buildMatrixFromGraph() const
Teuchos::RCP< const Stokhos::ProductBasis< int, double > > sg_master_basis_
double getValue(int i, int j, int k) const
Teuchos::RCP< Epetra_CrsGraph > graph_
Teuchos::RCP< const Stokhos::ProductBasis< int, double > > getMasterStochasticBasis() const
void sumInOperator(Epetra_CrsMatrix &A, const Stokhos::Sparse3Tensor< int, double > &Cijk, int k, const Epetra_CrsMatrix &J_k) const
Teuchos::RCP< Epetra_Map > rowMap_
int getGlobalRowId(int determLid, int basisIndex) const
AdaptivityManager(const Teuchos::RCP< const Stokhos::ProductBasis< int, double > > &sg_master_basis, const std::vector< Teuchos::RCP< const Stokhos::ProductBasis< int, double > > > &sg_basis_row_dof, const Epetra_CrsGraph &determ_graph, bool onlyUseLinear, int kExpOrder, bool scaleOp=true)
const std::vector< Teuchos::RCP< const Stokhos::ProductBasis< int, double > > > & getRowStochasticBasis() const