Stokhos::SGModelEvaluator Class Reference

Nonlinear, stochastic Galerkin ModelEvaluator. More...

#include <Stokhos_SGModelEvaluator.hpp>

List of all members.

Public Member Functions

 SGModelEvaluator (const Teuchos::RCP< EpetraExt::ModelEvaluator > &me, const Teuchos::RCP< const Stokhos::OrthogPolyBasis< int, double > > &sg_basis, const Teuchos::RCP< const Stokhos::Quadrature< int, double > > &sg_quad, const Teuchos::RCP< Stokhos::OrthogPolyExpansion< int, double > > &sg_exp, const Teuchos::RCP< const Stokhos::Sparse3Tensor< int, double > > &Cijk, const Teuchos::RCP< Teuchos::ParameterList > &params, const Teuchos::RCP< const Epetra_Comm > &comm, const Teuchos::RCP< const Stokhos::EpetraVectorOrthogPoly > &initial_x_sg=Teuchos::null, const Teuchos::Array< Teuchos::RCP< Stokhos::EpetraVectorOrthogPoly > > &initial_p_sg=Teuchos::Array< Teuchos::RCP< Stokhos::EpetraVectorOrthogPoly > >())
void set_x_init (const Epetra_Vector &x_in)
 Set initial solution vector.
Teuchos::Array< int > get_p_sg_indices () const
 Get indices of SG parameters.
Teuchos::Array< int > get_non_p_sg_indices () const
 Get indices of non-SG parameters.
Teuchos::Array< int > get_g_sg_indices () const
 Get indices of SG responses.
Teuchos::Array< int > get_non_g_sg_indices () const
 Get indices of non-SG responses.
Teuchos::Array< Teuchos::RCP
< const Epetra_Map > > 
get_p_sg_base_maps () const
 Get base maps of SG parameters.
Teuchos::Array< Teuchos::RCP
< const Epetra_Map > > 
get_g_sg_base_maps () const
 Get base maps of SG responses.
Overridden from EpetraExt::ModelEvaluator .

Teuchos::RCP< const Epetra_Map > get_x_map () const
 Return solution vector map.
Teuchos::RCP< const Epetra_Map > get_f_map () const
 Return residual vector map.
Teuchos::RCP< const Epetra_Map > get_p_map (int l) const
 Return parameter vector map.
Teuchos::RCP< const Epetra_Map > get_g_map (int l) const
 Return response map.
Teuchos::RCP< const
Teuchos::Array< std::string > > 
get_p_names (int l) const
 Return array of parameter names.
Teuchos::RCP< const Epetra_Vector > get_x_init () const
 Return initial solution.
Teuchos::RCP< const Epetra_Vector > get_p_init (int l) const
 Return initial parameters.
Teuchos::RCP< Epetra_Operator > create_W () const
 Create W = alpha*M + beta*J matrix.
Teuchos::RCP
< EpetraExt::ModelEvaluator::Preconditioner > 
create_WPrec () const
 Create preconditioner operator.
Teuchos::RefCountPtr
< Epetra_Operator > 
create_DgDx_dot_op (int j) const
 Create SG operator representing dg/dxdot.
Teuchos::RefCountPtr
< Epetra_Operator > 
create_DgDx_op (int j) const
 Create SG operator representing dg/dx.
InArgs createInArgs () const
 Create InArgs.
OutArgs createOutArgs () const
 Create OutArgs.
void evalModel (const InArgs &inArgs, const OutArgs &outArgs) const
 Evaluate model on InArgs.

Protected Types

enum  EJacobianMethod { MATRIX_FREE, KL_MATRIX_FREE, KL_REDUCED_MATRIX_FREE, FULLY_ASSEMBLED }
 

Method for creating block Jacobian.


Protected Attributes

Teuchos::RCP
< EpetraExt::ModelEvaluator > 
me
 Underlying model evaluator.
Teuchos::RCP< const
Stokhos::OrthogPolyBasis< int,
double > > 
sg_basis
 Stochastic Galerkin basis.
Teuchos::RCP< const
Stokhos::Quadrature< int,
double > > 
sg_quad
 Stochastic Galerkin quadrature.
Teuchos::RCP
< Stokhos::OrthogPolyExpansion
< int, double > > 
sg_exp
 Stochastic Galerkin expansion.
Teuchos::RCP
< Teuchos::ParameterList > 
params
 Algorithmic parameters.
unsigned int num_sg_blocks
 Number of stochastic blocks.
unsigned int num_W_blocks
 Number of W stochastic blocks (may be smaller than num_sg_blocks).
unsigned int num_p_blocks
 Number of p stochastic blocks (may be smaller than num_sg_blocks).
bool supports_x
 Whether we support x (and thus f and W).
Teuchos::RCP< const Epetra_Map > x_map
 Underlying unknown map.
Teuchos::RCP< const Epetra_Map > f_map
 Underlying residual map.
Teuchos::RCP< const Epetra_Comm > sg_comm
 Parallel SG communicator.
Teuchos::RCP< const Epetra_Map > sg_x_map
 Block SG unknown map.
Teuchos::RCP< const Epetra_Map > sg_f_map
 Block SG residual map.
int num_p
 Number of parameter vectors of underlying model evaluator.
int num_p_sg
 Number of stochastic parameter vectors.
Teuchos::Array< Teuchos::RCP
< const Epetra_Map > > 
sg_p_map
 Block SG parameter map.
Teuchos::Array< Teuchos::RCP
< Teuchos::Array< std::string > > > 
sg_p_names
 SG coefficient parameter names.
int num_g
 Number of response vectors of underlying model evaluator.
int num_g_sg
 Number of stochastic response vectors.
Teuchos::Array< Teuchos::RCP
< const Epetra_Map > > 
sg_g_map
 Block SG response map.
Teuchos::RCP< const
Stokhos::Sparse3Tensor< int,
double > > 
Cijk
 Triple product tensor.
Teuchos::RCP
< Stokhos::EpetraVectorOrthogPoly
x_dot_sg_blocks
 x_dot stochastic Galerkin components
Teuchos::RCP
< Stokhos::EpetraVectorOrthogPoly
x_sg_blocks
 x stochastic Galerkin components
Teuchos::Array< Teuchos::RCP
< Stokhos::EpetraVectorOrthogPoly > > 
p_sg_blocks
 p stochastic Galerkin components
Teuchos::RCP
< Stokhos::EpetraVectorOrthogPoly
f_sg_blocks
 f stochastic Galerkin components
Teuchos::RCP
< Stokhos::VectorOrthogPoly
< Epetra_Operator > > 
W_sg_blocks
 W stochastic Galerkin components.
Teuchos::Array< Teuchos::RCP
< Stokhos::EpetraVectorOrthogPoly > > 
g_sg_blocks
 g stochastic Galerkin components
Teuchos::Array< Teuchos::RCP
< Stokhos::EpetraMultiVectorOrthogPoly > > 
dfdp_sg_blocks
 df/dp stochastic Galerkin components
Teuchos::Array< Teuchos::RCP
< Stokhos::EpetraMultiVectorOrthogPoly > > 
dgdx_dot_sg_blocks
 dg/dxdot stochastic Galerkin components
Teuchos::Array< Teuchos::RCP
< Stokhos::EpetraMultiVectorOrthogPoly > > 
dgdx_sg_blocks
 dg/dx stochastic Galerkin components
Teuchos::Array< Teuchos::Array
< Teuchos::RCP
< Stokhos::EpetraMultiVectorOrthogPoly > > > 
dgdp_sg_blocks
 dg/dp stochastic Galerkin components
EJacobianMethod jacobianMethod
 Method for creating block Jacobian.
std::vector< std::vector< int > > rowStencil
std::vector< int > rowIndex
Teuchos::RCP
< EpetraExt::BlockVector > 
sg_x_init
 SG initial x.
Teuchos::Array< Teuchos::RCP
< EpetraExt::BlockVector > > 
sg_p_init
 SG initial p.
Teuchos::RCP
< Stokhos::PreconditionerFactory
precFactory
 SG Preconditioner factory.
bool eval_W_with_f
 Whether to always evaluate W with f.
Teuchos::RCP< Epetra_Operator > my_W
 W pointer for evaluating W with f.

Detailed Description

Nonlinear, stochastic Galerkin ModelEvaluator.

SGModelEvaluator is an implementation of EpetraExt::ModelEvaluator that generates a nonlinear problem from a stochastic Galerkin expansion. It wraps a supplied ModelEvaluator that supports the SG versions of p, x, and possibly x_dot InArgs, and f and W OutArgs, and translates those into a new nonlinear problem. It does so by concatenating all of the SG components of p, x, x_dot, and f into extended block vectors that form the parameters, solution vector, time derivative vector and residual for the new nonlinear problem. For dealing with the W matrix two methods are supported: forming a fully-assembled SG matrix and a "matrix free" method. The choice is selected by setting the "Jacobian Method" parameter of the parameter list supplied to the constructor, which can be either "Fully Assembled" or "Matrix Free". In the first case, the W operator of the underlying model evaluator must be an Epetra_CrsMatrix. In the second case, a preconditioner for the mean block must also be supplied via the "Preconditioner Factory" parameter of this list. This preconditioner factory must implement the Stokhos::PreconditionerFactory interface also supplied in this file. Currently using a preconditioner for the mean is the only option available for preconditioning the SG system when using the matrix-free method.


Member Function Documentation

Teuchos::Array< int > Stokhos::SGModelEvaluator::get_g_sg_indices (  )  const

Get indices of SG responses.

These indices determine which response vectors that will be passed through OutArgs correspond to the SG responses.

Teuchos::Array< int > Stokhos::SGModelEvaluator::get_non_g_sg_indices (  )  const

Get indices of non-SG responses.

These indices determine which response vectors that will be passed through OutArgs correspond to the non-SG responses.

Teuchos::Array< int > Stokhos::SGModelEvaluator::get_non_p_sg_indices (  )  const

Get indices of non-SG parameters.

These indices determine which parameter vectors that will be passed through InArgs correspond to the non-SG parameters.

Teuchos::Array< int > Stokhos::SGModelEvaluator::get_p_sg_indices (  )  const

Get indices of SG parameters.

These indices determine which parameter vectors that will be passed through InArgs correspond to the SG parameters.

void Stokhos::SGModelEvaluator::set_x_init ( const Epetra_Vector &  x_in  ) 

Set initial solution vector.

This is NOT a virtual ModelEvaluator method, and is just a convenience for users of this class.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Generated on Wed Apr 13 09:58:15 2011 for Stokhos by  doxygen 1.6.3