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< intget_p_mp_map_indices () const
 Get indices of MP parameters. More...
 
Teuchos::Array< intget_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< intmp_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< intmp_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 66 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 53 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 192 of file Stokhos_MPModelEvaluator.cpp.

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

Return residual vector map.

Definition at line 198 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 204 of file Stokhos_MPModelEvaluator.cpp.

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

Return response map.

Definition at line 217 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 225 of file Stokhos_MPModelEvaluator.cpp.

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

Return initial solution.

Definition at line 238 of file Stokhos_MPModelEvaluator.cpp.

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

Definition at line 244 of file Stokhos_MPModelEvaluator.cpp.

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

Return initial parameters.

Definition at line 250 of file Stokhos_MPModelEvaluator.cpp.

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

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

Definition at line 263 of file Stokhos_MPModelEvaluator.cpp.

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

Create preconditioner operator.

Definition at line 279 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 345 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 295 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 396 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 470 of file Stokhos_MPModelEvaluator.cpp.

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

Create InArgs.

Definition at line 542 of file Stokhos_MPModelEvaluator.cpp.

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

Create OutArgs.

Definition at line 559 of file Stokhos_MPModelEvaluator.cpp.

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

Evaluate model on InArgs.

Definition at line 593 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 912 of file Stokhos_MPModelEvaluator.cpp.

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

Definition at line 919 of file Stokhos_MPModelEvaluator.cpp.

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

Return initial SG x.

Definition at line 926 of file Stokhos_MPModelEvaluator.cpp.

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

Definition at line 932 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 938 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 951 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 963 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 969 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 975 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 984 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 999 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 1015 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 1037 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 1060 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 1075 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 1093 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 1117 of file Stokhos_MPModelEvaluator.cpp.

Member Data Documentation

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

Underlying model evaluator.

Definition at line 204 of file Stokhos_MPModelEvaluator.hpp.

unsigned int Stokhos::MPModelEvaluator::num_mp_blocks
protected

Number of blocks.

Definition at line 207 of file Stokhos_MPModelEvaluator.hpp.

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

Parallel MP communicator.

Definition at line 210 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 213 of file Stokhos_MPModelEvaluator.hpp.

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

Algorithmic parameters.

Definition at line 216 of file Stokhos_MPModelEvaluator.hpp.

bool Stokhos::MPModelEvaluator::supports_x
protected

Whether we support x (and thus f and W)

Definition at line 219 of file Stokhos_MPModelEvaluator.hpp.

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

Underlying unknown map.

Definition at line 222 of file Stokhos_MPModelEvaluator.hpp.

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

Underlying residual map.

Definition at line 225 of file Stokhos_MPModelEvaluator.hpp.

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

Block MP unknown map.

Definition at line 228 of file Stokhos_MPModelEvaluator.hpp.

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

Block MP residual map.

Definition at line 231 of file Stokhos_MPModelEvaluator.hpp.

int Stokhos::MPModelEvaluator::num_p
protected

Number of parameter vectors of underlying model evaluator.

Definition at line 234 of file Stokhos_MPModelEvaluator.hpp.

int Stokhos::MPModelEvaluator::num_p_mp
protected

Number of multi-point parameter vectors.

Definition at line 237 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 240 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 243 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 246 of file Stokhos_MPModelEvaluator.hpp.

int Stokhos::MPModelEvaluator::num_g
protected

Number of response vectors of underlying model evaluator.

Definition at line 249 of file Stokhos_MPModelEvaluator.hpp.

int Stokhos::MPModelEvaluator::num_g_mp
protected

Number of multi-point response vectors.

Definition at line 252 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 255 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 258 of file Stokhos_MPModelEvaluator.hpp.

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

W multi-point components.

Definition at line 261 of file Stokhos_MPModelEvaluator.hpp.

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

MP initial x.

Definition at line 264 of file Stokhos_MPModelEvaluator.hpp.

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

Definition at line 265 of file Stokhos_MPModelEvaluator.hpp.

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

MP initial p.

Definition at line 268 of file Stokhos_MPModelEvaluator.hpp.

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

W pointer for evaluating preconditioner.

Definition at line 271 of file Stokhos_MPModelEvaluator.hpp.

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

x pointer for evaluating preconditioner

Definition at line 274 of file Stokhos_MPModelEvaluator.hpp.


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