#include <Stokhos_SGModelEvaluator.hpp>
Public Member Functions | |
| SGModelEvaluator (const Teuchos::RCP< EpetraExt::ModelEvaluator > &me, const Teuchos::RCP< const Stokhos::OrthogPolyBasis< int, double > > &sg_basis, const Teuchos::Array< int > &sg_p_index, const Teuchos::Array< int > &sg_g_index, const Teuchos::Array< Teuchos::Array< Teuchos::RCP< Epetra_Vector > > > &initial_p_sg_coeffs_, const Teuchos::RCP< Teuchos::ParameterList > ¶ms_, const Teuchos::RCP< const Epetra_Comm > &comm) | |
| Teuchos::RCP< Epetra_Operator > | create_prec () const |
| Create preconditioner operator. | |
| void | set_x_init (const Epetra_Vector &x_in) |
| Set initial solution vector. | |
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. | |
| 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 | |
| MATRIX_FREE | |
| FULLY_ASSEMBLED | |
| enum | EJacobianMethod { 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 Galerking basis. | |
| Teuchos::Array< int > | sg_p_index |
| Index of stochastic parameters. | |
| Teuchos::Array< int > | sg_g_index |
| Index of stochastic responses. | |
| Teuchos::RCP< Teuchos::ParameterList > | params |
| Algorithmic parameters. | |
| unsigned int | num_sg_blocks |
| Number of stochastic 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 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 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::VectorOrthogPoly< Epetra_Vector > > | x_dot_sg_blocks |
| x_dot stochastic Galerkin components | |
|
Teuchos::RCP< Stokhos::VectorOrthogPoly< Epetra_Vector > > | x_sg_blocks |
| x stochastic Galerkin components | |
|
Teuchos::Array< Teuchos::RCP< Stokhos::VectorOrthogPoly< Epetra_Vector > > > | p_sg_blocks |
| p stochastic Galerkin components | |
|
Teuchos::RCP< Stokhos::VectorOrthogPoly< Epetra_Vector > > | 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::VectorOrthogPoly< Epetra_Vector > > > | g_sg_blocks |
| g stochastic Galerkin components | |
|
Teuchos::Array< Teuchos::Array< Teuchos::RCP< Stokhos::VectorOrthogPoly< Derivative > > > > | 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. | |
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.
| Teuchos::RCP< Epetra_Operator > Stokhos::SGModelEvaluator::create_prec | ( | ) | const |
Create preconditioner operator.
This is NOT a virtual ModelEvaluator method, and is just a convenience for users of this class.
| 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.
1.4.7