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 | Protected Member Functions | Protected Attributes | List of all members
twoD_diffusion_ME Class Reference

ModelEvaluator for a linear 2-D diffusion problem. More...

#include <twoD_diffusion_ME.hpp>

Inherits ModelEvaluator.

Classes

struct  MeshPoint
 

Public Member Functions

 twoD_diffusion_ME (const Teuchos::RCP< const Epetra_Comm > &comm, int n, int d, double s=0.1, double mu=0.2, const Teuchos::RCP< const Stokhos::OrthogPolyBasis< int, double > > &basis=Teuchos::null, bool log_normal=false, bool eliminate_bcs=false, const Teuchos::RCP< Teuchos::ParameterList > &precParams=Teuchos::null)
 Constructor. More...
 
 ~twoD_diffusion_ME ()
 Destructor. More...
 
Teuchos::RCP< Epetra_CrsMatrixget_mean () const
 Get mean matrix. More...
 

Protected Member Functions

template<typename FuncT >
void fillMatrices (const FuncT &func, int sz)
 Fill coefficient matrix given function to evaluate diffusion coefficient. More...
 

Protected Attributes

double h
 
Teuchos::Array< MeshPointmesh
 
Teuchos::Array< int > bcIndices
 
Teuchos::RCP< const
Stokhos::OrthogPolyBasis< int,
double > > 
basis
 
bool log_normal
 
bool eliminate_bcs
 
Teuchos::RCP
< Teuchos::ParameterList
precParams
 
Teuchos::RCP
< Stokhos::AbstractPreconditionerFactory
precFactory
 
Teuchos::RCP< Epetra_Mapx_map
 Solution vector map. More...
 
Teuchos::RCP< Epetra_Importimporter
 Importer to overlapped distribution. More...
 
Teuchos::RCP< Epetra_Vectorx_init
 Initial guess. More...
 
Teuchos::RCP< Epetra_Mapp_map
 Parameter vector map. More...
 
Teuchos::RCP< Epetra_Mapg_map
 Response vector map. More...
 
Teuchos::RCP< Epetra_Vectorp_init
 Initial parameters. More...
 
Teuchos::RCP< Teuchos::Array
< std::string > > 
p_names
 Parameter names. More...
 
Teuchos::RCP< Epetra_CrsGraphgraph
 Jacobian graph. More...
 
Teuchos::Array< Teuchos::RCP
< Epetra_CrsMatrix > > 
A_k
 KL coefficients of operator. More...
 
Teuchos::RCP< Epetra_Vectorb
 Deterministic RHS. More...
 
Teuchos::Array< Teuchos::RCP
< Epetra_Vector > > 
sg_kx_vec_all
 Vectors to store matrix-vector products in SG residual calculation. More...
 
Teuchos::RCP< Epetra_CrsMatrixA
 Matrix to store deterministic operator. More...
 
Teuchos::Array< doublepoint
 Array to store a point for basis evaluation. More...
 
Teuchos::Array< doublebasis_vals
 Array to store values of basis at a point. More...
 

Overridden from EpetraExt::ModelEvaluator .

Teuchos::RCP< const Epetra_Mapget_x_map () const
 Return solution vector map. More...
 
Teuchos::RCP< const Epetra_Mapget_f_map () const
 Return residual vector map. More...
 
Teuchos::RCP< const Epetra_Mapget_p_map (int l) const
 Return parameter vector map. More...
 
Teuchos::RCP< const Epetra_Mapget_g_map (int j) const
 Return response function map. More...
 
Teuchos::RCP< const
Teuchos::Array< std::string > > 
get_p_names (int l) const
 Return array of parameter names. More...
 
Teuchos::RCP< const Epetra_Vectorget_x_init () const
 Return initial solution. More...
 
Teuchos::RCP< const Epetra_Vectorget_p_init (int l) const
 Return initial parameters. More...
 
Teuchos::RCP< Epetra_Operatorcreate_W () const
 Create W = alpha*M + beta*J matrix. More...
 
Teuchos::RCP
< EpetraExt::ModelEvaluator::Preconditioner > 
create_WPrec () const
 Create preconditioner for W. More...
 
InArgs createInArgs () const
 Create InArgs. More...
 
OutArgs createOutArgs () const
 Create OutArgs. More...
 
void evalModel (const InArgs &inArgs, const OutArgs &outArgs) const
 Evaluate model on InArgs. More...
 

Detailed Description

ModelEvaluator for a linear 2-D diffusion problem.

Definition at line 30 of file twoD_diffusion_ME.hpp.

Constructor & Destructor Documentation

twoD_diffusion_ME::twoD_diffusion_ME ( const Teuchos::RCP< const Epetra_Comm > &  comm,
int  n,
int  d,
double  s = 0.1,
double  mu = 0.2,
const Teuchos::RCP< const Stokhos::OrthogPolyBasis< int, double > > &  basis = Teuchos::null,
bool  log_normal = false,
bool  eliminate_bcs = false,
const Teuchos::RCP< Teuchos::ParameterList > &  precParams = Teuchos::null 
)

Constructor.

Definition at line 131 of file twoD_diffusion_ME.cpp.

twoD_diffusion_ME::~twoD_diffusion_ME ( )

Destructor.

Definition at line 294 of file twoD_diffusion_ME.cpp.

Member Function Documentation

Teuchos::RCP< const Epetra_Map > twoD_diffusion_ME::get_x_map ( ) const

Return solution vector map.

Definition at line 303 of file twoD_diffusion_ME.cpp.

Teuchos::RCP< const Epetra_Map > twoD_diffusion_ME::get_f_map ( ) const

Return residual vector map.

Definition at line 310 of file twoD_diffusion_ME.cpp.

Teuchos::RCP< const Epetra_Map > twoD_diffusion_ME::get_p_map ( int  l) const

Return parameter vector map.

Definition at line 317 of file twoD_diffusion_ME.cpp.

Teuchos::RCP< const Epetra_Map > twoD_diffusion_ME::get_g_map ( int  j) const

Return response function map.

Definition at line 330 of file twoD_diffusion_ME.cpp.

Teuchos::RCP< const Teuchos::Array< std::string > > twoD_diffusion_ME::get_p_names ( int  l) const

Return array of parameter names.

Definition at line 343 of file twoD_diffusion_ME.cpp.

Teuchos::RCP< const Epetra_Vector > twoD_diffusion_ME::get_x_init ( ) const

Return initial solution.

Definition at line 356 of file twoD_diffusion_ME.cpp.

Teuchos::RCP< const Epetra_Vector > twoD_diffusion_ME::get_p_init ( int  l) const

Return initial parameters.

Definition at line 363 of file twoD_diffusion_ME.cpp.

Teuchos::RCP< Epetra_Operator > twoD_diffusion_ME::create_W ( ) const

Create W = alpha*M + beta*J matrix.

Definition at line 376 of file twoD_diffusion_ME.cpp.

Teuchos::RCP< EpetraExt::ModelEvaluator::Preconditioner > twoD_diffusion_ME::create_WPrec ( ) const

Create preconditioner for W.

Definition at line 387 of file twoD_diffusion_ME.cpp.

EpetraExt::ModelEvaluator::InArgs twoD_diffusion_ME::createInArgs ( ) const

Create InArgs.

Definition at line 400 of file twoD_diffusion_ME.cpp.

EpetraExt::ModelEvaluator::OutArgs twoD_diffusion_ME::createOutArgs ( ) const

Create OutArgs.

Definition at line 425 of file twoD_diffusion_ME.cpp.

void twoD_diffusion_ME::evalModel ( const InArgs &  inArgs,
const OutArgs &  outArgs 
) const

Evaluate model on InArgs.

Definition at line 452 of file twoD_diffusion_ME.cpp.

Teuchos::RCP<Epetra_CrsMatrix> twoD_diffusion_ME::get_mean ( ) const
inline

Get mean matrix.

Definition at line 89 of file twoD_diffusion_ME.hpp.

template<typename FuncT >
void twoD_diffusion_ME::fillMatrices ( const FuncT &  func,
int  sz 
)
protected

Fill coefficient matrix given function to evaluate diffusion coefficient.

Definition at line 163 of file twoD_diffusion_ME.hpp.

Member Data Documentation

double twoD_diffusion_ME::h
protected

Definition at line 99 of file twoD_diffusion_ME.hpp.

Teuchos::Array<MeshPoint> twoD_diffusion_ME::mesh
protected

Definition at line 106 of file twoD_diffusion_ME.hpp.

Teuchos::Array<int> twoD_diffusion_ME::bcIndices
protected

Definition at line 107 of file twoD_diffusion_ME.hpp.

Teuchos::RCP<const Stokhos::OrthogPolyBasis<int,double> > twoD_diffusion_ME::basis
protected

Definition at line 109 of file twoD_diffusion_ME.hpp.

bool twoD_diffusion_ME::log_normal
protected

Definition at line 110 of file twoD_diffusion_ME.hpp.

bool twoD_diffusion_ME::eliminate_bcs
protected

Definition at line 111 of file twoD_diffusion_ME.hpp.

Teuchos::RCP<Teuchos::ParameterList> twoD_diffusion_ME::precParams
protected

Definition at line 113 of file twoD_diffusion_ME.hpp.

Teuchos::RCP<Stokhos::AbstractPreconditionerFactory> twoD_diffusion_ME::precFactory
protected

Definition at line 114 of file twoD_diffusion_ME.hpp.

Teuchos::RCP<Epetra_Map> twoD_diffusion_ME::x_map
protected

Solution vector map.

Definition at line 117 of file twoD_diffusion_ME.hpp.

Teuchos::RCP<Epetra_Import> twoD_diffusion_ME::importer
protected

Importer to overlapped distribution.

Definition at line 120 of file twoD_diffusion_ME.hpp.

Teuchos::RCP<Epetra_Vector> twoD_diffusion_ME::x_init
protected

Initial guess.

Definition at line 123 of file twoD_diffusion_ME.hpp.

Teuchos::RCP<Epetra_Map> twoD_diffusion_ME::p_map
protected

Parameter vector map.

Definition at line 126 of file twoD_diffusion_ME.hpp.

Teuchos::RCP<Epetra_Map> twoD_diffusion_ME::g_map
protected

Response vector map.

Definition at line 129 of file twoD_diffusion_ME.hpp.

Teuchos::RCP<Epetra_Vector> twoD_diffusion_ME::p_init
protected

Initial parameters.

Definition at line 132 of file twoD_diffusion_ME.hpp.

Teuchos::RCP< Teuchos::Array<std::string> > twoD_diffusion_ME::p_names
protected

Parameter names.

Definition at line 135 of file twoD_diffusion_ME.hpp.

Teuchos::RCP<Epetra_CrsGraph> twoD_diffusion_ME::graph
protected

Jacobian graph.

Definition at line 138 of file twoD_diffusion_ME.hpp.

Teuchos::Array<Teuchos::RCP<Epetra_CrsMatrix> > twoD_diffusion_ME::A_k
protected

KL coefficients of operator.

Definition at line 141 of file twoD_diffusion_ME.hpp.

Teuchos::RCP<Epetra_Vector> twoD_diffusion_ME::b
protected

Deterministic RHS.

Definition at line 144 of file twoD_diffusion_ME.hpp.

Teuchos::Array< Teuchos::RCP<Epetra_Vector> > twoD_diffusion_ME::sg_kx_vec_all
mutableprotected

Vectors to store matrix-vector products in SG residual calculation.

Definition at line 147 of file twoD_diffusion_ME.hpp.

Teuchos::RCP<Epetra_CrsMatrix> twoD_diffusion_ME::A
protected

Matrix to store deterministic operator.

Definition at line 150 of file twoD_diffusion_ME.hpp.

Teuchos::Array<double> twoD_diffusion_ME::point
mutableprotected

Array to store a point for basis evaluation.

Definition at line 153 of file twoD_diffusion_ME.hpp.

Teuchos::Array<double> twoD_diffusion_ME::basis_vals
mutableprotected

Array to store values of basis at a point.

Definition at line 156 of file twoD_diffusion_ME.hpp.


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