EpetraExt Development
Classes
EpetraExt::ModelEvaluator Class Reference

Base interface for evaluating a stateless "model". More...

#include <EpetraExt_ModelEvaluator.h>

Inheritance diagram for EpetraExt::ModelEvaluator:
Inheritance graph
[legend]

List of all members.

Classes

class  Derivative
 Simple aggregate class that stores a derivative object as a general linear operator or as a multi-vector. More...
class  DerivativeMultiVector
 Simple aggregate class for a derivative object represented as a column-wise multi-vector or its transpose as a row-wise multi-vector. More...
struct  DerivativeProperties
  More...
class  DerivativeSupport
  More...
class  Evaluation
  More...
class  InArgs
  More...
class  InArgsSetup
  More...
class  MPDerivative
 Simple aggregate class that stores a derivative object as a general linear operator or as a multi-vector. More...
class  MPDerivativeMultiVector
 Simple aggregate class for a derivative object represented as a column-wise multi-vector or its transpose as a row-wise multi-vector. More...
class  OutArgs
  More...
class  OutArgsSetup
  More...
struct  Preconditioner
 Simple aggregate struct that stores a preconditioner as an Epetra_Operator and a bool, about whether it is inverted or not. More...
class  SGDerivative
 Simple aggregate class that stores a derivative object as a general linear operator or as a multi-vector. More...
class  SGDerivativeMultiVector
 Simple aggregate class for a derivative object represented as a column-wise multi-vector or its transpose as a row-wise multi-vector. More...

Public types

enum  EInArgsMembers {
  IN_ARG_x_dot, IN_ARG_x, IN_ARG_x_dot_poly, IN_ARG_x_poly,
  IN_ARG_x_dot_sg, IN_ARG_x_sg, IN_ARG_x_dot_mp, IN_ARG_x_mp,
  IN_ARG_t, IN_ARG_alpha, IN_ARG_beta, IN_ARG_x_dotdot,
  IN_ARG_x_dotdot_poly, IN_ARG_x_dotdot_sg, IN_ARG_x_dotdot_mp, IN_ARG_omega,
  IN_ARG_sg_basis, IN_ARG_sg_quadrature, IN_ARG_sg_expansion
}
  More...
enum  EInArgs_p_sg { IN_ARG_p_sg }
  More...
enum  EInArgs_p_mp { IN_ARG_p_mp }
  More...
enum  EEvalType { EVAL_TYPE_EXACT, EVAL_TYPE_APPROX_DERIV, EVAL_TYPE_VERY_APPROX_DERIV }
  More...
enum  EDerivativeMultiVectorOrientation { DERIV_MV_BY_COL, DERIV_TRANS_MV_BY_ROW }
  More...
enum  EDerivativeLinearOp { DERIV_LINEAR_OP }
  More...
enum  EDerivativeLinearity { DERIV_LINEARITY_UNKNOWN, DERIV_LINEARITY_CONST, DERIV_LINEARITY_NONCONST }
  More...
enum  ERankStatus { DERIV_RANK_UNKNOWN, DERIV_RANK_FULL, DERIV_RANK_DEFICIENT }
  More...
enum  EOutArgsMembers {
  OUT_ARG_f, OUT_ARG_W, OUT_ARG_f_poly, OUT_ARG_f_sg,
  OUT_ARG_W_sg, OUT_ARG_f_mp, OUT_ARG_W_mp, OUT_ARG_WPrec
}
  More...
enum  EOutArgsDfDp { OUT_ARG_DfDp }
  More...
enum  EOutArgsDgDx_dot { OUT_ARG_DgDx_dot }
  More...
enum  EOutArgsDgDx_dotdot { OUT_ARG_DgDx_dotdot }
  More...
enum  EOutArgsDgDx { OUT_ARG_DgDx }
  More...
enum  EOutArgsDgDp { OUT_ARG_DgDp }
  More...
enum  EOutArgsDfDp_sg { OUT_ARG_DfDp_sg }
  More...
enum  EOutArgs_g_sg { OUT_ARG_g_sg }
  More...
enum  EOutArgsDgDx_dot_sg { OUT_ARG_DgDx_dot_sg }
  More...
enum  EOutArgsDgDx_dotdot_sg { OUT_ARG_DgDx_dotdot_sg }
  More...
enum  EOutArgsDgDx_sg { OUT_ARG_DgDx_sg }
  More...
enum  EOutArgsDgDp_sg { OUT_ARG_DgDp_sg }
  More...
enum  EOutArgsDfDp_mp { OUT_ARG_DfDp_mp }
  More...
enum  EOutArgs_g_mp { OUT_ARG_g_mp }
  More...
enum  EOutArgsDgDx_dot_mp { OUT_ARG_DgDx_dot_mp }
  More...
enum  EOutArgsDgDx_dotdot_mp { OUT_ARG_DgDx_dotdot_mp }
  More...
enum  EOutArgsDgDx_mp { OUT_ARG_DgDx_mp }
  More...
enum  EOutArgsDgDp_mp { OUT_ARG_DgDp_mp }
  More...
typedef Teuchos::RCP< const
Stokhos::ProductEpetraVector > 
mp_const_vector_t
typedef Teuchos::RCP< const
Stokhos::ProductEpetraMultiVector > 
mp_const_multivector_t
typedef Teuchos::RCP< const
Stokhos::ProductEpetraOperator > 
mp_const_operator_t
typedef Teuchos::RCP
< Stokhos::ProductEpetraVector > 
mp_vector_t
typedef Teuchos::RCP
< Stokhos::ProductEpetraMultiVector > 
mp_multivector_t
typedef Teuchos::RCP
< Stokhos::ProductEpetraOperator > 
mp_operator_t
static const int NUM_E_IN_ARGS_MEMBERS = 19
static const int NUM_E_OUT_ARGS_MEMBERS = 9

Destructor

virtual ~ModelEvaluator ()
 

Vector maps

virtual Teuchos::RefCountPtr
< const Epetra_Map
get_x_map () const =0
 .
virtual Teuchos::RefCountPtr
< const Epetra_Map
get_f_map () const =0
 .
virtual Teuchos::RefCountPtr
< const Epetra_Map
get_p_map (int l) const
 .
virtual Teuchos::RefCountPtr
< const Teuchos::Array
< std::string > > 
get_p_names (int l) const
 Get the names of the parameters associated with parameter subvector l if available.
virtual Teuchos::RefCountPtr
< const Epetra_Map
get_g_map (int j) const
 .

Initial guesses for variables/parameters

virtual Teuchos::RefCountPtr
< const Epetra_Vector
get_x_init () const
 
virtual Teuchos::RefCountPtr
< const Epetra_Vector
get_x_dot_init () const
 
virtual Teuchos::RefCountPtr
< const Epetra_Vector
get_x_dotdot_init () const
 
virtual Teuchos::RefCountPtr
< const Epetra_Vector
get_p_init (int l) const
 
virtual double get_t_init () const
 

Bounds for variables/parameters

virtual double getInfBound () const
 Return the value of an infinite bound.
virtual Teuchos::RefCountPtr
< const Epetra_Vector
get_x_lower_bounds () const
 
virtual Teuchos::RefCountPtr
< const Epetra_Vector
get_x_upper_bounds () const
 
virtual Teuchos::RefCountPtr
< const Epetra_Vector
get_p_lower_bounds (int l) const
 
virtual Teuchos::RefCountPtr
< const Epetra_Vector
get_p_upper_bounds (int l) const
 
virtual double get_t_lower_bound () const
 
virtual double get_t_upper_bound () const
 

Factory functions for creating derivative objects

virtual Teuchos::RefCountPtr
< Epetra_Operator
create_W () const
 If supported, create a Epetra_Operator object for W to be evaluated.
virtual Teuchos::RefCountPtr
< EpetraExt::ModelEvaluator::Preconditioner
create_WPrec () const
virtual Teuchos::RefCountPtr
< Epetra_Operator
create_DfDp_op (int l) const
 
virtual Teuchos::RefCountPtr
< Epetra_Operator
create_DgDx_dot_op (int j) const
 
virtual Teuchos::RefCountPtr
< Epetra_Operator
create_DgDx_dotdot_op (int j) const
 
virtual Teuchos::RefCountPtr
< Epetra_Operator
create_DgDx_op (int j) const
 
virtual Teuchos::RefCountPtr
< Epetra_Operator
create_DgDp_op (int j, int l) const
 

Computational functions

virtual InArgs createInArgs () const =0
 
virtual OutArgs createOutArgs () const =0
 
virtual void evalModel (const InArgs &inArgs, const OutArgs &outArgs) const =0
 

Detailed Description

Base interface for evaluating a stateless "model".

ToDo: Finish Documentation!

Definition at line 84 of file EpetraExt_ModelEvaluator.h.


Member Typedef Documentation

typedef Teuchos::RCP<const Stokhos::ProductEpetraVector> EpetraExt::ModelEvaluator::mp_const_vector_t

Definition at line 90 of file EpetraExt_ModelEvaluator.h.

typedef Teuchos::RCP<const Stokhos::ProductEpetraMultiVector> EpetraExt::ModelEvaluator::mp_const_multivector_t

Definition at line 91 of file EpetraExt_ModelEvaluator.h.

typedef Teuchos::RCP<const Stokhos::ProductEpetraOperator > EpetraExt::ModelEvaluator::mp_const_operator_t

Definition at line 92 of file EpetraExt_ModelEvaluator.h.

typedef Teuchos::RCP<Stokhos::ProductEpetraVector> EpetraExt::ModelEvaluator::mp_vector_t

Definition at line 93 of file EpetraExt_ModelEvaluator.h.

typedef Teuchos::RCP<Stokhos::ProductEpetraMultiVector> EpetraExt::ModelEvaluator::mp_multivector_t

Definition at line 94 of file EpetraExt_ModelEvaluator.h.

typedef Teuchos::RCP<Stokhos::ProductEpetraOperator > EpetraExt::ModelEvaluator::mp_operator_t

Definition at line 95 of file EpetraExt_ModelEvaluator.h.


Member Enumeration Documentation

Enumerator:
IN_ARG_x_dot 
IN_ARG_x 
IN_ARG_x_dot_poly 

Time derivative vector Taylor polynomial.

IN_ARG_x_poly 

Solution vector Taylor polynomial.

IN_ARG_x_dot_sg 

Stochastic Galerkin time derivative vector polynomial.

IN_ARG_x_sg 

Stochastic Galerkin solution vector polynomial.

IN_ARG_x_dot_mp 

Multi-point time derivative vector.

IN_ARG_x_mp 

Multi-point solution vector.

IN_ARG_t 
IN_ARG_alpha 
IN_ARG_beta 
IN_ARG_x_dotdot 
IN_ARG_x_dotdot_poly 

Time second derivative vector Taylor polynomial.

IN_ARG_x_dotdot_sg 

Stochastic Galerkin time second derivative vector polynomial.

IN_ARG_x_dotdot_mp 

Multi-point time second derivative vector.

IN_ARG_omega 
IN_ARG_sg_basis 

Stochastic Galerkin basis.

IN_ARG_sg_quadrature 

Stochastic Galerkin quadrature.

IN_ARG_sg_expansion 

Stochastic Galerkin expansion.

Definition at line 98 of file EpetraExt_ModelEvaluator.h.

Enumerator:
IN_ARG_p_sg 

Definition at line 122 of file EpetraExt_ModelEvaluator.h.

Enumerator:
IN_ARG_p_mp 

Definition at line 127 of file EpetraExt_ModelEvaluator.h.

Enumerator:
EVAL_TYPE_EXACT 

Exact function evaluation.

EVAL_TYPE_APPROX_DERIV 

An approximate derivative (i.e. for a Jacobian)

EVAL_TYPE_VERY_APPROX_DERIV 

A very approximate derivative (i.e. for a preconditioner)

Definition at line 289 of file EpetraExt_ModelEvaluator.h.

Enumerator:
DERIV_MV_BY_COL 
DERIV_TRANS_MV_BY_ROW 

Definition at line 317 of file EpetraExt_ModelEvaluator.h.

Enumerator:
DERIV_LINEAR_OP 

Definition at line 323 of file EpetraExt_ModelEvaluator.h.

Enumerator:
DERIV_LINEARITY_UNKNOWN 
DERIV_LINEARITY_CONST 
DERIV_LINEARITY_NONCONST 

Definition at line 395 of file EpetraExt_ModelEvaluator.h.

Enumerator:
DERIV_RANK_UNKNOWN 
DERIV_RANK_FULL 
DERIV_RANK_DEFICIENT 

Definition at line 401 of file EpetraExt_ModelEvaluator.h.

Enumerator:
OUT_ARG_f 
OUT_ARG_W 
OUT_ARG_f_poly 

Residual vector Taylor polynomial.

OUT_ARG_f_sg 

Stochastic Galerkin residual vector polynomial.

OUT_ARG_W_sg 

Stochastic Galerkin "W" operator polyomial.

OUT_ARG_f_mp 

Multi-point residual vector.

OUT_ARG_W_mp 

Multi-point "W" operator.

OUT_ARG_WPrec 

Preconditioner operator (approx Jacobian)

Definition at line 653 of file EpetraExt_ModelEvaluator.h.

Enumerator:
OUT_ARG_DfDp 

Definition at line 666 of file EpetraExt_ModelEvaluator.h.

Enumerator:
OUT_ARG_DgDx_dot 

Definition at line 671 of file EpetraExt_ModelEvaluator.h.

Enumerator:
OUT_ARG_DgDx_dotdot 

Definition at line 676 of file EpetraExt_ModelEvaluator.h.

Enumerator:
OUT_ARG_DgDx 

Definition at line 681 of file EpetraExt_ModelEvaluator.h.

Enumerator:
OUT_ARG_DgDp 

Definition at line 686 of file EpetraExt_ModelEvaluator.h.

Enumerator:
OUT_ARG_DfDp_sg 

Definition at line 691 of file EpetraExt_ModelEvaluator.h.

Enumerator:
OUT_ARG_g_sg 

Definition at line 696 of file EpetraExt_ModelEvaluator.h.

Enumerator:
OUT_ARG_DgDx_dot_sg 

Definition at line 701 of file EpetraExt_ModelEvaluator.h.

Enumerator:
OUT_ARG_DgDx_dotdot_sg 

Definition at line 706 of file EpetraExt_ModelEvaluator.h.

Enumerator:
OUT_ARG_DgDx_sg 

Definition at line 711 of file EpetraExt_ModelEvaluator.h.

Enumerator:
OUT_ARG_DgDp_sg 

Definition at line 716 of file EpetraExt_ModelEvaluator.h.

Enumerator:
OUT_ARG_DfDp_mp 

Definition at line 721 of file EpetraExt_ModelEvaluator.h.

Enumerator:
OUT_ARG_g_mp 

Definition at line 726 of file EpetraExt_ModelEvaluator.h.

Enumerator:
OUT_ARG_DgDx_dot_mp 

Definition at line 731 of file EpetraExt_ModelEvaluator.h.

Enumerator:
OUT_ARG_DgDx_dotdot_mp 

Definition at line 736 of file EpetraExt_ModelEvaluator.h.

Enumerator:
OUT_ARG_DgDx_mp 

Definition at line 741 of file EpetraExt_ModelEvaluator.h.

Enumerator:
OUT_ARG_DgDp_mp 

Definition at line 746 of file EpetraExt_ModelEvaluator.h.


Constructor & Destructor Documentation

EpetraExt::ModelEvaluator::~ModelEvaluator ( ) [virtual]

Definition at line 923 of file EpetraExt_ModelEvaluator.cpp.


Member Function Documentation

virtual Teuchos::RefCountPtr<const Epetra_Map> EpetraExt::ModelEvaluator::get_x_map ( ) const [pure virtual]
virtual Teuchos::RefCountPtr<const Epetra_Map> EpetraExt::ModelEvaluator::get_f_map ( ) const [pure virtual]
Teuchos::RefCountPtr< const Epetra_Map > EpetraExt::ModelEvaluator::get_p_map ( int  l) const [virtual]
Teuchos::RefCountPtr< const Teuchos::Array< std::string > > EpetraExt::ModelEvaluator::get_p_names ( int  l) const [virtual]

Get the names of the parameters associated with parameter subvector l if available.

Returns:
Returns an RCP to a Teuchos::Array<std::string> object that contains the names of the parameters. If returnVal == Teuchos::null, then there are no names available for the parameter subvector p(l). If returnVal->size() == 1, then a single name is given to the entire parameter subvector. If returnVal->size() == get_p_map(l)->GlobalNumElements(), then a name is given to every parameter scalar entry.

The default implementation return returnVal==Teuchos::null which means by default, parameters have no names associated with them.

Reimplemented in EpetraExt::DiagonalTransientModel.

Definition at line 935 of file EpetraExt_ModelEvaluator.cpp.

Teuchos::RefCountPtr< const Epetra_Map > EpetraExt::ModelEvaluator::get_g_map ( int  j) const [virtual]
Teuchos::RefCountPtr< const Epetra_Vector > EpetraExt::ModelEvaluator::get_x_init ( ) const [virtual]
Teuchos::RefCountPtr< const Epetra_Vector > EpetraExt::ModelEvaluator::get_x_dot_init ( ) const [virtual]

Reimplemented in EpetraExt::DiagonalTransientModel.

Definition at line 951 of file EpetraExt_ModelEvaluator.cpp.

Teuchos::RefCountPtr< const Epetra_Vector > EpetraExt::ModelEvaluator::get_x_dotdot_init ( ) const [virtual]

Definition at line 955 of file EpetraExt_ModelEvaluator.cpp.

Teuchos::RefCountPtr< const Epetra_Vector > EpetraExt::ModelEvaluator::get_p_init ( int  l) const [virtual]
double EpetraExt::ModelEvaluator::get_t_init ( ) const [virtual]

Definition at line 962 of file EpetraExt_ModelEvaluator.cpp.

double EpetraExt::ModelEvaluator::getInfBound ( ) const [virtual]

Return the value of an infinite bound.

The default implementation returns 1e+50.

Definition at line 969 of file EpetraExt_ModelEvaluator.cpp.

Teuchos::RefCountPtr< const Epetra_Vector > EpetraExt::ModelEvaluator::get_x_lower_bounds ( ) const [virtual]
Teuchos::RefCountPtr< const Epetra_Vector > EpetraExt::ModelEvaluator::get_x_upper_bounds ( ) const [virtual]
Teuchos::RefCountPtr< const Epetra_Vector > EpetraExt::ModelEvaluator::get_p_lower_bounds ( int  l) const [virtual]
Teuchos::RefCountPtr< const Epetra_Vector > EpetraExt::ModelEvaluator::get_p_upper_bounds ( int  l) const [virtual]
double EpetraExt::ModelEvaluator::get_t_lower_bound ( ) const [virtual]

Definition at line 995 of file EpetraExt_ModelEvaluator.cpp.

double EpetraExt::ModelEvaluator::get_t_upper_bound ( ) const [virtual]

Definition at line 999 of file EpetraExt_ModelEvaluator.cpp.

Teuchos::RefCountPtr< Epetra_Operator > EpetraExt::ModelEvaluator::create_W ( ) const [virtual]

If supported, create a Epetra_Operator object for W to be evaluated.

Same for preconditioner M

The default implementation returns return.get()==NULL (i.e. implicit solvers are not supported by default).

Reimplemented in EpetraExt::MultiPointModelEvaluator, EpetraModelEval2DSim, EpetraModelEval4DOpt, EpetraMultiPointModelEval4DOpt, EpetraExt::DiagonalTransientModel, and GLpApp::AdvDiffReactOptModel.

Definition at line 1007 of file EpetraExt_ModelEvaluator.cpp.

Teuchos::RefCountPtr< EpetraExt::ModelEvaluator::Preconditioner > EpetraExt::ModelEvaluator::create_WPrec ( ) const [virtual]

Definition at line 1011 of file EpetraExt_ModelEvaluator.cpp.

Teuchos::RefCountPtr< Epetra_Operator > EpetraExt::ModelEvaluator::create_DfDp_op ( int  l) const [virtual]

Reimplemented in GLpApp::AdvDiffReactOptModel.

Definition at line 1015 of file EpetraExt_ModelEvaluator.cpp.

Teuchos::RefCountPtr< Epetra_Operator > EpetraExt::ModelEvaluator::create_DgDx_dot_op ( int  j) const [virtual]

Definition at line 1019 of file EpetraExt_ModelEvaluator.cpp.

Teuchos::RefCountPtr< Epetra_Operator > EpetraExt::ModelEvaluator::create_DgDx_dotdot_op ( int  j) const [virtual]

Definition at line 1023 of file EpetraExt_ModelEvaluator.cpp.

Teuchos::RefCountPtr< Epetra_Operator > EpetraExt::ModelEvaluator::create_DgDx_op ( int  j) const [virtual]

Definition at line 1027 of file EpetraExt_ModelEvaluator.cpp.

Teuchos::RefCountPtr< Epetra_Operator > EpetraExt::ModelEvaluator::create_DgDp_op ( int  j,
int  l 
) const [virtual]

Definition at line 1031 of file EpetraExt_ModelEvaluator.cpp.

virtual InArgs EpetraExt::ModelEvaluator::createInArgs ( ) const [pure virtual]
virtual OutArgs EpetraExt::ModelEvaluator::createOutArgs ( ) const [pure virtual]
virtual void EpetraExt::ModelEvaluator::evalModel ( const InArgs inArgs,
const OutArgs outArgs 
) const [pure virtual]

Member Data Documentation

Definition at line 119 of file EpetraExt_ModelEvaluator.h.

Definition at line 663 of file EpetraExt_ModelEvaluator.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines