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

Multi-point model evaluator. More...

#include <Stokhos_MPModelEvaluator.hpp>

Inherits ModelEvaluator.

Public Member Functions

 MPModelEvaluator (const Teuchos::RCP< EpetraExt::ModelEvaluator > &me, const Teuchos::RCP< const EpetraExt::MultiComm > &mp_comm, const Teuchos::RCP< const Epetra_Map > &mp_block_map, const Teuchos::RCP< Teuchos::ParameterList > &params)
 
void set_x_mp_init (const Stokhos::ProductEpetraVector &x_mp_in)
 Set initial multi-point solution. More...
 
void set_x_dot_mp_init (const Stokhos::ProductEpetraVector &x_dot_mp_in)
 
Teuchos::RCP< const
Stokhos::ProductEpetraVector
get_x_mp_init () const
 Return initial SG x. More...
 
Teuchos::RCP< const
Stokhos::ProductEpetraVector
get_x_dot_mp_init () const
 
void set_p_mp_init (int i, const Stokhos::ProductEpetraVector &p_mp_in)
 Set initial multi-point parameter. More...
 
Teuchos::RCP< const
Stokhos::ProductEpetraVector
get_p_mp_init (int l) const
 Return initial SG parameters. More...
 
Teuchos::Array< int > get_p_mp_map_indices () const
 Get indices of MP parameters. More...
 
Teuchos::Array< int > get_g_mp_map_indices () const
 Get indices of MP responses. More...
 
Teuchos::Array< Teuchos::RCP
< const Epetra_Map > > 
get_g_mp_base_maps () const
 Get base maps of MP responses. More...
 
Teuchos::RCP
< Stokhos::ProductEpetraVector
create_x_mp (Epetra_DataAccess CV=Copy, const Epetra_Vector *v=NULL) const
 Create multi-point vector using x map and owned mp map. More...
 
Teuchos::RCP
< Stokhos::ProductEpetraMultiVector
create_x_mv_mp (int num_vecs, Epetra_DataAccess CV=Copy, const Epetra_MultiVector *v=NULL) const
 Create multi-point vector using x map. More...
 
Teuchos::RCP
< Stokhos::ProductEpetraVector
create_p_mp (int l, Epetra_DataAccess CV=Copy, const Epetra_Vector *v=NULL) const
 Create multi-point vector using p map. More...
 
Teuchos::RCP
< Stokhos::ProductEpetraMultiVector
create_p_mv_mp (int l, int num_vecs, Epetra_DataAccess CV=Copy, const Epetra_MultiVector *v=NULL) const
 Create multi-point vector using p map. More...
 
Teuchos::RCP
< Stokhos::ProductEpetraVector
create_f_mp (Epetra_DataAccess CV=Copy, const Epetra_Vector *v=NULL) const
 Create multi-point vector using f map. More...
 
Teuchos::RCP
< Stokhos::ProductEpetraMultiVector
create_f_mv_mp (int num_vecs, Epetra_DataAccess CV=Copy, const Epetra_MultiVector *v=NULL) const
 Create multi-point multi-vector using f map. More...
 
Teuchos::RCP
< Stokhos::ProductEpetraVector
create_g_mp (int l, Epetra_DataAccess CV=Copy, const Epetra_Vector *v=NULL) const
 Create multi-point vector using g map. More...
 
Teuchos::RCP
< Stokhos::ProductEpetraMultiVector
create_g_mv_mp (int l, int num_vecs, Epetra_DataAccess CV=Copy, const Epetra_MultiVector *v=NULL) const
 Create multi-point multi-vector using g map. More...
 

Protected Attributes

Teuchos::RCP
< EpetraExt::ModelEvaluator > 
me
 Underlying model evaluator. More...
 
unsigned int num_mp_blocks
 Number of blocks. More...
 
Teuchos::RCP< const
EpetraExt::MultiComm > 
mp_comm
 Parallel MP communicator. More...
 
Teuchos::RCP< const Epetra_Mapmp_block_map
 Map for layout of parallel MP blocks. More...
 
Teuchos::RCP
< Teuchos::ParameterList
params
 Algorithmic parameters. More...
 
bool supports_x
 Whether we support x (and thus f and W) More...
 
Teuchos::RCP< const Epetra_Mapx_map
 Underlying unknown map. More...
 
Teuchos::RCP< const Epetra_Mapf_map
 Underlying residual map. More...
 
Teuchos::RCP< const Epetra_Mapmp_x_map
 Block MP unknown map. More...
 
Teuchos::RCP< const Epetra_Mapmp_f_map
 Block MP residual map. More...
 
int num_p
 Number of parameter vectors of underlying model evaluator. More...
 
int num_p_mp
 Number of multi-point parameter vectors. More...
 
Teuchos::Array< int > mp_p_index_map
 Index map between block-p and p_mp maps. More...
 
Teuchos::Array< Teuchos::RCP
< const Epetra_Map > > 
mp_p_map
 Block MP parameter map. More...
 
Teuchos::Array< Teuchos::RCP
< Teuchos::Array< std::string > > > 
mp_p_names
 MP coefficient parameter names. More...
 
int num_g
 Number of response vectors of underlying model evaluator. More...
 
int num_g_mp
 Number of multi-point response vectors. More...
 
Teuchos::Array< int > mp_g_index_map
 Index map between block-g and g_mp maps. More...
 
Teuchos::Array< Teuchos::RCP
< const Epetra_Map > > 
mp_g_map
 Block MP response map. More...
 
Teuchos::RCP
< Stokhos::ProductEpetraOperator
W_mp_blocks
 W multi-point components. More...
 
Teuchos::RCP
< Stokhos::ProductEpetraVector
mp_x_init
 MP initial x. More...
 
Teuchos::RCP
< Stokhos::ProductEpetraVector
mp_x_dot_init
 
Teuchos::Array< Teuchos::RCP
< ProductEpetraVector > > 
mp_p_init
 MP initial p. More...
 
Teuchos::RCP
< Stokhos::BlockDiagonalOperator
my_W
 W pointer for evaluating preconditioner. More...
 
Teuchos::RCP< Epetra_Vectormy_x
 x pointer for evaluating preconditioner 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 l) const
 Return response 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_x_dot_init () const
 
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 operator. More...
 
Teuchos::RCP< Epetra_Operatorcreate_DgDx_dot_op (int j) const
 Create MP operator representing dg/dxdot. More...
 
Teuchos::RCP< Epetra_Operatorcreate_DgDx_op (int j) const
 Create MP operator representing dg/dx. More...
 
Teuchos::RCP< Epetra_Operatorcreate_DgDp_op (int j, int i) const
 Create MP operator representing dg/dp. More...
 
Teuchos::RCP< Epetra_Operatorcreate_DfDp_op (int i) const
 Create MP operator representing df/dp. 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

Multi-point model evaluator.

Transforms a multi-point nonlinear problem to single nonlinear problem.

Definition at line 34 of file Stokhos_MPModelEvaluator.hpp.

Constructor & Destructor Documentation

Stokhos::MPModelEvaluator::MPModelEvaluator ( const Teuchos::RCP< EpetraExt::ModelEvaluator > &  me,
const Teuchos::RCP< const EpetraExt::MultiComm > &  mp_comm,
const Teuchos::RCP< const Epetra_Map > &  mp_block_map,
const Teuchos::RCP< Teuchos::ParameterList > &  params 
)

Definition at line 21 of file Stokhos_MPModelEvaluator.cpp.

Member Function Documentation

Teuchos::RCP< const Epetra_Map > Stokhos::MPModelEvaluator::get_x_map ( ) const

Return solution vector map.

Definition at line 160 of file Stokhos_MPModelEvaluator.cpp.

Teuchos::RCP< const Epetra_Map > Stokhos::MPModelEvaluator::get_f_map ( ) const

Return residual vector map.

Definition at line 166 of file Stokhos_MPModelEvaluator.cpp.

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

Return parameter vector map.

Definition at line 172 of file Stokhos_MPModelEvaluator.cpp.

Teuchos::RCP< const Epetra_Map > Stokhos::MPModelEvaluator::get_g_map ( int  l) const

Return response map.

Definition at line 185 of file Stokhos_MPModelEvaluator.cpp.

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

Return array of parameter names.

Definition at line 193 of file Stokhos_MPModelEvaluator.cpp.

Teuchos::RCP< const Epetra_Vector > Stokhos::MPModelEvaluator::get_x_init ( ) const

Return initial solution.

Definition at line 206 of file Stokhos_MPModelEvaluator.cpp.

Teuchos::RCP< const Epetra_Vector > Stokhos::MPModelEvaluator::get_x_dot_init ( ) const

Definition at line 212 of file Stokhos_MPModelEvaluator.cpp.

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

Return initial parameters.

Definition at line 218 of file Stokhos_MPModelEvaluator.cpp.

Teuchos::RCP< Epetra_Operator > Stokhos::MPModelEvaluator::create_W ( ) const

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

Definition at line 231 of file Stokhos_MPModelEvaluator.cpp.

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

Create preconditioner operator.

Definition at line 247 of file Stokhos_MPModelEvaluator.cpp.

Teuchos::RCP< Epetra_Operator > Stokhos::MPModelEvaluator::create_DgDx_dot_op ( int  j) const

Create MP operator representing dg/dxdot.

Definition at line 313 of file Stokhos_MPModelEvaluator.cpp.

Teuchos::RCP< Epetra_Operator > Stokhos::MPModelEvaluator::create_DgDx_op ( int  j) const

Create MP operator representing dg/dx.

Definition at line 263 of file Stokhos_MPModelEvaluator.cpp.

Teuchos::RCP< Epetra_Operator > Stokhos::MPModelEvaluator::create_DgDp_op ( int  j,
int  i 
) const

Create MP operator representing dg/dp.

Definition at line 364 of file Stokhos_MPModelEvaluator.cpp.

Teuchos::RCP< Epetra_Operator > Stokhos::MPModelEvaluator::create_DfDp_op ( int  i) const

Create MP operator representing df/dp.

Definition at line 438 of file Stokhos_MPModelEvaluator.cpp.

EpetraExt::ModelEvaluator::InArgs Stokhos::MPModelEvaluator::createInArgs ( ) const

Create InArgs.

Definition at line 510 of file Stokhos_MPModelEvaluator.cpp.

EpetraExt::ModelEvaluator::OutArgs Stokhos::MPModelEvaluator::createOutArgs ( ) const

Create OutArgs.

Definition at line 527 of file Stokhos_MPModelEvaluator.cpp.

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

Evaluate model on InArgs.

Definition at line 561 of file Stokhos_MPModelEvaluator.cpp.

void Stokhos::MPModelEvaluator::set_x_mp_init ( const Stokhos::ProductEpetraVector x_mp_in)

Set initial multi-point solution.

Definition at line 880 of file Stokhos_MPModelEvaluator.cpp.

void Stokhos::MPModelEvaluator::set_x_dot_mp_init ( const Stokhos::ProductEpetraVector x_dot_mp_in)

Definition at line 887 of file Stokhos_MPModelEvaluator.cpp.

Teuchos::RCP< const Stokhos::ProductEpetraVector > Stokhos::MPModelEvaluator::get_x_mp_init ( ) const

Return initial SG x.

Definition at line 894 of file Stokhos_MPModelEvaluator.cpp.

Teuchos::RCP< const Stokhos::ProductEpetraVector > Stokhos::MPModelEvaluator::get_x_dot_mp_init ( ) const

Definition at line 900 of file Stokhos_MPModelEvaluator.cpp.

void Stokhos::MPModelEvaluator::set_p_mp_init ( int  i,
const Stokhos::ProductEpetraVector p_mp_in 
)

Set initial multi-point parameter.

Definition at line 906 of file Stokhos_MPModelEvaluator.cpp.

Teuchos::RCP< const Stokhos::ProductEpetraVector > Stokhos::MPModelEvaluator::get_p_mp_init ( int  l) const

Return initial SG parameters.

Definition at line 919 of file Stokhos_MPModelEvaluator.cpp.

Teuchos::Array< int > Stokhos::MPModelEvaluator::get_p_mp_map_indices ( ) const

Get indices of MP parameters.

These indices determine which parameter vectors support MP

Definition at line 931 of file Stokhos_MPModelEvaluator.cpp.

Teuchos::Array< int > Stokhos::MPModelEvaluator::get_g_mp_map_indices ( ) const

Get indices of MP responses.

These indices determine which response vectors support MP

Definition at line 937 of file Stokhos_MPModelEvaluator.cpp.

Teuchos::Array< Teuchos::RCP< const Epetra_Map > > Stokhos::MPModelEvaluator::get_g_mp_base_maps ( ) const

Get base maps of MP responses.

Definition at line 943 of file Stokhos_MPModelEvaluator.cpp.

Teuchos::RCP< Stokhos::ProductEpetraVector > Stokhos::MPModelEvaluator::create_x_mp ( Epetra_DataAccess  CV = Copy,
const Epetra_Vector v = NULL 
) const

Create multi-point vector using x map and owned mp map.

Definition at line 952 of file Stokhos_MPModelEvaluator.cpp.

Teuchos::RCP< Stokhos::ProductEpetraMultiVector > Stokhos::MPModelEvaluator::create_x_mv_mp ( int  num_vecs,
Epetra_DataAccess  CV = Copy,
const Epetra_MultiVector v = NULL 
) const

Create multi-point vector using x map.

Definition at line 967 of file Stokhos_MPModelEvaluator.cpp.

Teuchos::RCP< Stokhos::ProductEpetraVector > Stokhos::MPModelEvaluator::create_p_mp ( int  l,
Epetra_DataAccess  CV = Copy,
const Epetra_Vector v = NULL 
) const

Create multi-point vector using p map.

Definition at line 983 of file Stokhos_MPModelEvaluator.cpp.

Teuchos::RCP< Stokhos::ProductEpetraMultiVector > Stokhos::MPModelEvaluator::create_p_mv_mp ( int  l,
int  num_vecs,
Epetra_DataAccess  CV = Copy,
const Epetra_MultiVector v = NULL 
) const

Create multi-point vector using p map.

Definition at line 1005 of file Stokhos_MPModelEvaluator.cpp.

Teuchos::RCP< Stokhos::ProductEpetraVector > Stokhos::MPModelEvaluator::create_f_mp ( Epetra_DataAccess  CV = Copy,
const Epetra_Vector v = NULL 
) const

Create multi-point vector using f map.

Definition at line 1028 of file Stokhos_MPModelEvaluator.cpp.

Teuchos::RCP< Stokhos::ProductEpetraMultiVector > Stokhos::MPModelEvaluator::create_f_mv_mp ( int  num_vecs,
Epetra_DataAccess  CV = Copy,
const Epetra_MultiVector v = NULL 
) const

Create multi-point multi-vector using f map.

Definition at line 1043 of file Stokhos_MPModelEvaluator.cpp.

Teuchos::RCP< Stokhos::ProductEpetraVector > Stokhos::MPModelEvaluator::create_g_mp ( int  l,
Epetra_DataAccess  CV = Copy,
const Epetra_Vector v = NULL 
) const

Create multi-point vector using g map.

Definition at line 1061 of file Stokhos_MPModelEvaluator.cpp.

Teuchos::RCP< Stokhos::ProductEpetraMultiVector > Stokhos::MPModelEvaluator::create_g_mv_mp ( int  l,
int  num_vecs,
Epetra_DataAccess  CV = Copy,
const Epetra_MultiVector v = NULL 
) const

Create multi-point multi-vector using g map.

Definition at line 1085 of file Stokhos_MPModelEvaluator.cpp.

Member Data Documentation

Teuchos::RCP<EpetraExt::ModelEvaluator> Stokhos::MPModelEvaluator::me
protected

Underlying model evaluator.

Definition at line 172 of file Stokhos_MPModelEvaluator.hpp.

unsigned int Stokhos::MPModelEvaluator::num_mp_blocks
protected

Number of blocks.

Definition at line 175 of file Stokhos_MPModelEvaluator.hpp.

Teuchos::RCP<const EpetraExt::MultiComm> Stokhos::MPModelEvaluator::mp_comm
protected

Parallel MP communicator.

Definition at line 178 of file Stokhos_MPModelEvaluator.hpp.

Teuchos::RCP<const Epetra_Map> Stokhos::MPModelEvaluator::mp_block_map
protected

Map for layout of parallel MP blocks.

Definition at line 181 of file Stokhos_MPModelEvaluator.hpp.

Teuchos::RCP<Teuchos::ParameterList> Stokhos::MPModelEvaluator::params
protected

Algorithmic parameters.

Definition at line 184 of file Stokhos_MPModelEvaluator.hpp.

bool Stokhos::MPModelEvaluator::supports_x
protected

Whether we support x (and thus f and W)

Definition at line 187 of file Stokhos_MPModelEvaluator.hpp.

Teuchos::RCP<const Epetra_Map> Stokhos::MPModelEvaluator::x_map
protected

Underlying unknown map.

Definition at line 190 of file Stokhos_MPModelEvaluator.hpp.

Teuchos::RCP<const Epetra_Map> Stokhos::MPModelEvaluator::f_map
protected

Underlying residual map.

Definition at line 193 of file Stokhos_MPModelEvaluator.hpp.

Teuchos::RCP<const Epetra_Map> Stokhos::MPModelEvaluator::mp_x_map
protected

Block MP unknown map.

Definition at line 196 of file Stokhos_MPModelEvaluator.hpp.

Teuchos::RCP<const Epetra_Map> Stokhos::MPModelEvaluator::mp_f_map
protected

Block MP residual map.

Definition at line 199 of file Stokhos_MPModelEvaluator.hpp.

int Stokhos::MPModelEvaluator::num_p
protected

Number of parameter vectors of underlying model evaluator.

Definition at line 202 of file Stokhos_MPModelEvaluator.hpp.

int Stokhos::MPModelEvaluator::num_p_mp
protected

Number of multi-point parameter vectors.

Definition at line 205 of file Stokhos_MPModelEvaluator.hpp.

Teuchos::Array<int> Stokhos::MPModelEvaluator::mp_p_index_map
protected

Index map between block-p and p_mp maps.

Definition at line 208 of file Stokhos_MPModelEvaluator.hpp.

Teuchos::Array< Teuchos::RCP<const Epetra_Map> > Stokhos::MPModelEvaluator::mp_p_map
protected

Block MP parameter map.

Definition at line 211 of file Stokhos_MPModelEvaluator.hpp.

Teuchos::Array< Teuchos::RCP< Teuchos::Array<std::string> > > Stokhos::MPModelEvaluator::mp_p_names
protected

MP coefficient parameter names.

Definition at line 214 of file Stokhos_MPModelEvaluator.hpp.

int Stokhos::MPModelEvaluator::num_g
protected

Number of response vectors of underlying model evaluator.

Definition at line 217 of file Stokhos_MPModelEvaluator.hpp.

int Stokhos::MPModelEvaluator::num_g_mp
protected

Number of multi-point response vectors.

Definition at line 220 of file Stokhos_MPModelEvaluator.hpp.

Teuchos::Array<int> Stokhos::MPModelEvaluator::mp_g_index_map
protected

Index map between block-g and g_mp maps.

Definition at line 223 of file Stokhos_MPModelEvaluator.hpp.

Teuchos::Array< Teuchos::RCP<const Epetra_Map> > Stokhos::MPModelEvaluator::mp_g_map
protected

Block MP response map.

Definition at line 226 of file Stokhos_MPModelEvaluator.hpp.

Teuchos::RCP< Stokhos::ProductEpetraOperator> Stokhos::MPModelEvaluator::W_mp_blocks
mutableprotected

W multi-point components.

Definition at line 229 of file Stokhos_MPModelEvaluator.hpp.

Teuchos::RCP<Stokhos::ProductEpetraVector> Stokhos::MPModelEvaluator::mp_x_init
protected

MP initial x.

Definition at line 232 of file Stokhos_MPModelEvaluator.hpp.

Teuchos::RCP<Stokhos::ProductEpetraVector> Stokhos::MPModelEvaluator::mp_x_dot_init
protected

Definition at line 233 of file Stokhos_MPModelEvaluator.hpp.

Teuchos::Array< Teuchos::RCP<ProductEpetraVector> > Stokhos::MPModelEvaluator::mp_p_init
protected

MP initial p.

Definition at line 236 of file Stokhos_MPModelEvaluator.hpp.

Teuchos::RCP<Stokhos::BlockDiagonalOperator> Stokhos::MPModelEvaluator::my_W
mutableprotected

W pointer for evaluating preconditioner.

Definition at line 239 of file Stokhos_MPModelEvaluator.hpp.

Teuchos::RCP<Epetra_Vector> Stokhos::MPModelEvaluator::my_x
mutableprotected

x pointer for evaluating preconditioner

Definition at line 242 of file Stokhos_MPModelEvaluator.hpp.


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