Stokhos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
Stokhos::AdaptivityManager Class Reference

#include <Stokhos_AdaptivityManager.hpp>

Classes

class  Sparse3TensorHash
 

Public Member Functions

 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)
 
 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_Comm &comm, bool scaleOp=true)
 
int getGlobalColId (int determLid, int basisIndex) const
 
int getGlobalRowId (int determLid, int basisIndex) const
 
Teuchos::RCP< Epetra_CrsMatrixbuildMatrixFromGraph () const
 
void setupWithGraph (const Epetra_CrsGraph &graph, bool onlyUseLinear, int kExpOrder)
 
Teuchos::RCP< const Epetra_MapgetAdaptedMap () const
 
void setupOperator (Epetra_CrsMatrix &A, const Sparse3Tensor< int, double > &Cijk, Stokhos::EpetraOperatorOrthogPoly &poly, bool onlyUseLinear=false, bool includeMean=true) const
 
void sumInOperator (Epetra_CrsMatrix &A, const Stokhos::Sparse3Tensor< int, double > &Cijk, int k, const Epetra_CrsMatrix &J_k) const
 
void copyToAdaptiveVector (const Stokhos::EpetraVectorOrthogPoly &x_sg, Epetra_Vector &x) const
 
void copyFromAdaptiveVector (const Epetra_Vector &x, Stokhos::EpetraVectorOrthogPoly &x_sg) const
 
int getRowStochasticBasisSize (int determLid) const
 
int getColStochasticBasisSize (int determLid) const
 
Teuchos::RCP< const
Stokhos::ProductBasis< int,
double > > 
getMasterStochasticBasis () const
 
Teuchos::RCP< const
Stokhos::ProductBasis< int,
double > > 
getRowStochasticBasis (int determLid) const
 
const std::vector
< Teuchos::RCP< const
Stokhos::ProductBasis< int,
double > > > & 
getRowStochasticBasis () const
 
Teuchos::RCP< const
Stokhos::ProductBasis< int,
double > > 
getColStochasticBasis (int determLid) const
 
bool isScaled ()
 

Private Member Functions

void sumInOperator (Epetra_CrsMatrix &A, const Sparse3TensorHash &Cijk, int k, const Epetra_CrsMatrix &J_k) const
 

Private Attributes

Teuchos::RCP< const
Stokhos::ProductBasis< int,
double > > 
sg_master_basis_
 
std::vector< Teuchos::RCP
< const Stokhos::ProductBasis
< int, double > > > 
sg_basis_row_dof_
 
std::vector< Teuchos::RCP
< const Stokhos::ProductBasis
< int, double > > > 
sg_basis_col_dof_
 
std::vector< int > myRowGidOffsets_
 
std::vector< int > myColGidOffsets_
 
Teuchos::RCP< Epetra_CrsGraphgraph_
 
Teuchos::RCP< Epetra_MaprowMap_
 
bool scaleOp_
 

Detailed Description

Describes and constructs all things needed for adaptivity.

Definition at line 37 of file Stokhos_AdaptivityManager.hpp.

Constructor & Destructor Documentation

Stokhos::AdaptivityManager::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 
)

Definition at line 70 of file Stokhos_AdaptivityManager.cpp.

Stokhos::AdaptivityManager::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_Comm comm,
bool  scaleOp = true 
)

Definition at line 83 of file Stokhos_AdaptivityManager.cpp.

Member Function Documentation

int Stokhos::AdaptivityManager::getGlobalColId ( int  determLid,
int  basisIndex 
) const
inline

Given a deterministic local column ID and a basis index determine the global column ID in the fully assembled system.

Parameters
[in]determLidDeterministic local column ID
[in]basisIndexIndex into the stochastic basis associated with this column ID.
Returns
Associated index in the global system.
Note
basisIndex must be less than getRowStochasticBasisSize(determLid)

Definition at line 63 of file Stokhos_AdaptivityManager.hpp.

int Stokhos::AdaptivityManager::getGlobalRowId ( int  determLid,
int  basisIndex 
) const
inline

Given a deterministic local row ID and a basis index determine the global row ID in the fully assembled system.

Parameters
[in]determLidDeterministic local row ID
[in]basisIndexIndex into the stochastic basis associated with this row ID.
Returns
Associated index in the global system.
Note
basisIndex must be less than getRowStochasticBasisSize(determLid)

Definition at line 77 of file Stokhos_AdaptivityManager.hpp.

Teuchos::RCP< Epetra_CrsMatrix > Stokhos::AdaptivityManager::buildMatrixFromGraph ( ) const

Build a CRS matrix from the internally constructed graph

Definition at line 94 of file Stokhos_AdaptivityManager.cpp.

void Stokhos::AdaptivityManager::setupWithGraph ( const Epetra_CrsGraph graph,
bool  onlyUseLinear,
int  kExpOrder 
)

Build a CRS graph from a determinstic graph

Definition at line 99 of file Stokhos_AdaptivityManager.cpp.

Teuchos::RCP<const Epetra_Map> Stokhos::AdaptivityManager::getAdaptedMap ( ) const
inline

Get map associated with this set of adaptive indices

Definition at line 90 of file Stokhos_AdaptivityManager.hpp.

void Stokhos::AdaptivityManager::setupOperator ( Epetra_CrsMatrix A,
const Sparse3Tensor< int, double > &  Cijk,
Stokhos::EpetraOperatorOrthogPoly poly,
bool  onlyUseLinear = false,
bool  includeMean = true 
) const

Setup operator

Definition at line 111 of file Stokhos_AdaptivityManager.cpp.

void Stokhos::AdaptivityManager::sumInOperator ( Epetra_CrsMatrix A,
const Stokhos::Sparse3Tensor< int, double > &  Cijk,
int  k,
const Epetra_CrsMatrix J_k 
) const

Sum into a matrix constructed from buildMatrixFromGraph using the Cjik tensor a matrix J_k

Definition at line 147 of file Stokhos_AdaptivityManager.cpp.

void Stokhos::AdaptivityManager::copyToAdaptiveVector ( const Stokhos::EpetraVectorOrthogPoly x_sg,
Epetra_Vector x 
) const

Copy to an adaptive vector from a set of blocked vectors

Definition at line 229 of file Stokhos_AdaptivityManager.cpp.

void Stokhos::AdaptivityManager::copyFromAdaptiveVector ( const Epetra_Vector x,
Stokhos::EpetraVectorOrthogPoly x_sg 
) const

Copy from an adaptive vector to a set of blocked vectors

Definition at line 247 of file Stokhos_AdaptivityManager.cpp.

int Stokhos::AdaptivityManager::getRowStochasticBasisSize ( int  determLid) const
inline

How many stochastic degrees of freedom are associated with a particular deterministic row degree of freedom.

Definition at line 114 of file Stokhos_AdaptivityManager.hpp.

int Stokhos::AdaptivityManager::getColStochasticBasisSize ( int  determLid) const
inline

How many stochastic degrees of freedom are associated with a particular deterministic row degree of freedom.

Definition at line 120 of file Stokhos_AdaptivityManager.hpp.

Teuchos::RCP<const Stokhos::ProductBasis<int,double> > Stokhos::AdaptivityManager::getMasterStochasticBasis ( ) const
inline

Get master stochastic basis

Definition at line 125 of file Stokhos_AdaptivityManager.hpp.

Teuchos::RCP<const Stokhos::ProductBasis<int,double> > Stokhos::AdaptivityManager::getRowStochasticBasis ( int  determLid) const
inline

Get stochastic basis associated with a particular deterministic row local id.

Definition at line 130 of file Stokhos_AdaptivityManager.hpp.

const std::vector<Teuchos::RCP<const Stokhos::ProductBasis<int,double> > >& Stokhos::AdaptivityManager::getRowStochasticBasis ( ) const
inline

Get the vector of row stochastic basis functions.

Definition at line 135 of file Stokhos_AdaptivityManager.hpp.

Teuchos::RCP<const Stokhos::ProductBasis<int,double> > Stokhos::AdaptivityManager::getColStochasticBasis ( int  determLid) const
inline

Get stochastic basis associated with a particular deterministic column local id.

Definition at line 140 of file Stokhos_AdaptivityManager.hpp.

bool Stokhos::AdaptivityManager::isScaled ( )
inline

Definition at line 143 of file Stokhos_AdaptivityManager.hpp.

void Stokhos::AdaptivityManager::sumInOperator ( Epetra_CrsMatrix A,
const Sparse3TensorHash Cijk,
int  k,
const Epetra_CrsMatrix J_k 
) const
private

Sum into a matrix constructed from buildMatrixFromGraph using the Sparse3TensorHash if boost is enabled Cjik tensor a matrix J_k

Definition at line 158 of file Stokhos_AdaptivityManager.cpp.

Member Data Documentation

Teuchos::RCP<const Stokhos::ProductBasis<int,double> > Stokhos::AdaptivityManager::sg_master_basis_
private

Definition at line 184 of file Stokhos_AdaptivityManager.hpp.

std::vector<Teuchos::RCP<const Stokhos::ProductBasis<int,double> > > Stokhos::AdaptivityManager::sg_basis_row_dof_
private

Definition at line 185 of file Stokhos_AdaptivityManager.hpp.

std::vector<Teuchos::RCP<const Stokhos::ProductBasis<int,double> > > Stokhos::AdaptivityManager::sg_basis_col_dof_
private

Definition at line 186 of file Stokhos_AdaptivityManager.hpp.

std::vector<int> Stokhos::AdaptivityManager::myRowGidOffsets_
private

Definition at line 188 of file Stokhos_AdaptivityManager.hpp.

std::vector<int> Stokhos::AdaptivityManager::myColGidOffsets_
private

Definition at line 189 of file Stokhos_AdaptivityManager.hpp.

Teuchos::RCP<Epetra_CrsGraph> Stokhos::AdaptivityManager::graph_
private

Definition at line 191 of file Stokhos_AdaptivityManager.hpp.

Teuchos::RCP<Epetra_Map> Stokhos::AdaptivityManager::rowMap_
private

Definition at line 192 of file Stokhos_AdaptivityManager.hpp.

bool Stokhos::AdaptivityManager::scaleOp_
private

Definition at line 194 of file Stokhos_AdaptivityManager.hpp.


The documentation for this class was generated from the following files: