EpetraExt Package Browser (Single Doxygen Collection)  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | List of all members
EpetraExt::ModelEvaluator Class Referenceabstract

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

#include <EpetraExt_ModelEvaluator.h>

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

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
 
class  DerivativeSupport
 
class  Evaluation
 
class  InArgs
 
class  InArgsSetup
 
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
 
class  OutArgsSetup
 
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_step_size,
  IN_ARG_stage_number, 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
}
 
enum  EInArgs_p_sg { IN_ARG_p_sg }
 
enum  EInArgs_p_mp { IN_ARG_p_mp }
 
enum  EEvalType { EVAL_TYPE_EXACT, EVAL_TYPE_APPROX_DERIV, EVAL_TYPE_VERY_APPROX_DERIV }
 
enum  EDerivativeMultiVectorOrientation { DERIV_MV_BY_COL, DERIV_TRANS_MV_BY_ROW }
 
enum  EDerivativeLinearOp { DERIV_LINEAR_OP }
 
enum  EDerivativeLinearity { DERIV_LINEARITY_UNKNOWN, DERIV_LINEARITY_CONST, DERIV_LINEARITY_NONCONST }
 
enum  ERankStatus { DERIV_RANK_UNKNOWN, DERIV_RANK_FULL, DERIV_RANK_DEFICIENT }
 
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
}
 
enum  EOutArgsDfDp { OUT_ARG_DfDp }
 
enum  EOutArgsDgDx_dot { OUT_ARG_DgDx_dot }
 
enum  EOutArgsDgDx_dotdot { OUT_ARG_DgDx_dotdot }
 
enum  EOutArgsDgDx { OUT_ARG_DgDx }
 
enum  EOutArgsDgDp { OUT_ARG_DgDp }
 
enum  EOutArgsDfDp_sg { OUT_ARG_DfDp_sg }
 
enum  EOutArgs_g_sg { OUT_ARG_g_sg }
 
enum  EOutArgsDgDx_dot_sg { OUT_ARG_DgDx_dot_sg }
 
enum  EOutArgsDgDx_dotdot_sg { OUT_ARG_DgDx_dotdot_sg }
 
enum  EOutArgsDgDx_sg { OUT_ARG_DgDx_sg }
 
enum  EOutArgsDgDp_sg { OUT_ARG_DgDp_sg }
 
enum  EOutArgsDfDp_mp { OUT_ARG_DfDp_mp }
 
enum  EOutArgs_g_mp { OUT_ARG_g_mp }
 
enum  EOutArgsDgDx_dot_mp { OUT_ARG_DgDx_dot_mp }
 
enum  EOutArgsDgDx_dotdot_mp { OUT_ARG_DgDx_dotdot_mp }
 
enum  EOutArgsDgDx_mp { OUT_ARG_DgDx_mp }
 
enum  EOutArgsDgDp_mp { OUT_ARG_DgDp_mp }
 
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 =21
 
static const int NUM_E_OUT_ARGS_MEMBERS =9
 

Destructor

virtual ~ModelEvaluator ()
 

Vector maps

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

Initial guesses for variables/parameters

virtual Teuchos::RCP< const
Epetra_Vector
get_x_init () const
 
virtual Teuchos::RCP< const
Epetra_Vector
get_x_dot_init () const
 
virtual Teuchos::RCP< const
Epetra_Vector
get_x_dotdot_init () const
 
virtual Teuchos::RCP< 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. More...
 
virtual Teuchos::RCP< const
Epetra_Vector
get_x_lower_bounds () const
 
virtual Teuchos::RCP< const
Epetra_Vector
get_x_upper_bounds () const
 
virtual Teuchos::RCP< const
Epetra_Vector
get_p_lower_bounds (int l) const
 
virtual Teuchos::RCP< 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::RCP
< Epetra_Operator
create_W () const
 If supported, create a Epetra_Operator object for W to be evaluated. More...
 
virtual Teuchos::RCP
< EpetraExt::ModelEvaluator::Preconditioner
create_WPrec () const
 
virtual Teuchos::RCP
< Epetra_Operator
create_DfDp_op (int l) const
 
virtual Teuchos::RCP
< Epetra_Operator
create_DgDx_dot_op (int j) const
 
virtual Teuchos::RCP
< Epetra_Operator
create_DgDx_dotdot_op (int j) const
 
virtual Teuchos::RCP
< Epetra_Operator
create_DgDx_op (int j) const
 
virtual Teuchos::RCP
< 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
 

Additional Inherited Members

- Public Member Functions inherited from Teuchos::Describable
DescribableStreamManipulatorState describe (const Describable &describable, const EVerbosityLevel verbLevel=Describable::verbLevel_default)
 
std::ostream & operator<< (std::ostream &os, const DescribableStreamManipulatorState &d)
 
virtual std::string description () const
 
virtual void describe (FancyOStream &out, const EVerbosityLevel verbLevel=verbLevel_default) const
 
void describe (std::ostream &out, const EVerbosityLevel verbLevel=verbLevel_default) const
 
virtual ~Describable ()
 
 LabeledObject ()
 
virtual ~LabeledObject ()
 
virtual void setObjectLabel (const std::string &objectLabel)
 
virtual std::string getObjectLabel () const
 
- Static Public Attributes inherited from Teuchos::Describable
static const EVerbosityLevel verbLevel_default
 

Detailed Description

Base interface for evaluating a stateless "model".

ToDo: Finish Documentation!

Definition at line 91 of file EpetraExt_ModelEvaluator.h.

Member Typedef Documentation

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

Definition at line 97 of file EpetraExt_ModelEvaluator.h.

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

Definition at line 98 of file EpetraExt_ModelEvaluator.h.

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

Definition at line 99 of file EpetraExt_ModelEvaluator.h.

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

Definition at line 100 of file EpetraExt_ModelEvaluator.h.

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

Definition at line 101 of file EpetraExt_ModelEvaluator.h.

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

Definition at line 102 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_step_size 
IN_ARG_stage_number 
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 

Coeff of second derivative term d(x_dotdot)/dx.

IN_ARG_sg_basis 

Stochastic Galerkin basis.

IN_ARG_sg_quadrature 

Stochastic Galerkin quadrature.

IN_ARG_sg_expansion 

Stochastic Galerkin expansion.

Definition at line 105 of file EpetraExt_ModelEvaluator.h.

Enumerator
IN_ARG_p_sg 

Definition at line 131 of file EpetraExt_ModelEvaluator.h.

Enumerator
IN_ARG_p_mp 

Definition at line 136 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 304 of file EpetraExt_ModelEvaluator.h.

Enumerator
DERIV_MV_BY_COL 
DERIV_TRANS_MV_BY_ROW 

Definition at line 332 of file EpetraExt_ModelEvaluator.h.

Enumerator
DERIV_LINEAR_OP 

Definition at line 338 of file EpetraExt_ModelEvaluator.h.

Enumerator
DERIV_LINEARITY_UNKNOWN 
DERIV_LINEARITY_CONST 
DERIV_LINEARITY_NONCONST 

Definition at line 410 of file EpetraExt_ModelEvaluator.h.

Enumerator
DERIV_RANK_UNKNOWN 
DERIV_RANK_FULL 
DERIV_RANK_DEFICIENT 

Definition at line 416 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 668 of file EpetraExt_ModelEvaluator.h.

Enumerator
OUT_ARG_DfDp 

Definition at line 681 of file EpetraExt_ModelEvaluator.h.

Enumerator
OUT_ARG_DgDx_dot 

Definition at line 686 of file EpetraExt_ModelEvaluator.h.

Enumerator
OUT_ARG_DgDx_dotdot 

Definition at line 691 of file EpetraExt_ModelEvaluator.h.

Enumerator
OUT_ARG_DgDx 

Definition at line 696 of file EpetraExt_ModelEvaluator.h.

Enumerator
OUT_ARG_DgDp 

Definition at line 701 of file EpetraExt_ModelEvaluator.h.

Enumerator
OUT_ARG_DfDp_sg 

Definition at line 706 of file EpetraExt_ModelEvaluator.h.

Enumerator
OUT_ARG_g_sg 

Definition at line 711 of file EpetraExt_ModelEvaluator.h.

Enumerator
OUT_ARG_DgDx_dot_sg 

Definition at line 716 of file EpetraExt_ModelEvaluator.h.

Enumerator
OUT_ARG_DgDx_dotdot_sg 

Definition at line 721 of file EpetraExt_ModelEvaluator.h.

Enumerator
OUT_ARG_DgDx_sg 

Definition at line 726 of file EpetraExt_ModelEvaluator.h.

Enumerator
OUT_ARG_DgDp_sg 

Definition at line 731 of file EpetraExt_ModelEvaluator.h.

Enumerator
OUT_ARG_DfDp_mp 

Definition at line 736 of file EpetraExt_ModelEvaluator.h.

Enumerator
OUT_ARG_g_mp 

Definition at line 741 of file EpetraExt_ModelEvaluator.h.

Enumerator
OUT_ARG_DgDx_dot_mp 

Definition at line 746 of file EpetraExt_ModelEvaluator.h.

Enumerator
OUT_ARG_DgDx_dotdot_mp 

Definition at line 751 of file EpetraExt_ModelEvaluator.h.

Enumerator
OUT_ARG_DgDx_mp 

Definition at line 756 of file EpetraExt_ModelEvaluator.h.

Enumerator
OUT_ARG_DgDp_mp 

Definition at line 761 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::RCP<const Epetra_Map> EpetraExt::ModelEvaluator::get_x_map ( ) const
pure virtual
virtual Teuchos::RCP<const Epetra_Map> EpetraExt::ModelEvaluator::get_f_map ( ) const
pure virtual
Teuchos::RCP< const Epetra_Map > EpetraExt::ModelEvaluator::get_p_map ( int  l) const
virtual
Teuchos::RCP< 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::RCP< const Epetra_Map > EpetraExt::ModelEvaluator::get_g_map ( int  j) const
virtual
Teuchos::ArrayView< const std::string > EpetraExt::ModelEvaluator::get_g_names ( int  j) const
virtual

Get the names of the response functions associated with response subvector j if available.

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

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

Definition at line 943 of file EpetraExt_ModelEvaluator.cpp.

Teuchos::RCP< const Epetra_Vector > EpetraExt::ModelEvaluator::get_x_init ( ) const
virtual
Teuchos::RCP< const Epetra_Vector > EpetraExt::ModelEvaluator::get_x_dot_init ( ) const
virtual

Reimplemented in EpetraExt::DiagonalTransientModel.

Definition at line 955 of file EpetraExt_ModelEvaluator.cpp.

Teuchos::RCP< const Epetra_Vector > EpetraExt::ModelEvaluator::get_x_dotdot_init ( ) const
virtual

Definition at line 959 of file EpetraExt_ModelEvaluator.cpp.

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

Definition at line 966 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 973 of file EpetraExt_ModelEvaluator.cpp.

Teuchos::RCP< const Epetra_Vector > EpetraExt::ModelEvaluator::get_x_lower_bounds ( ) const
virtual
Teuchos::RCP< const Epetra_Vector > EpetraExt::ModelEvaluator::get_x_upper_bounds ( ) const
virtual
Teuchos::RCP< const Epetra_Vector > EpetraExt::ModelEvaluator::get_p_lower_bounds ( int  l) const
virtual
Teuchos::RCP< 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 999 of file EpetraExt_ModelEvaluator.cpp.

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

Definition at line 1003 of file EpetraExt_ModelEvaluator.cpp.

Teuchos::RCP< 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 GLpApp::AdvDiffReactOptModel, EpetraExt::DiagonalTransientModel, EpetraModelEval4DOpt, EpetraMultiPointModelEval4DOpt, EpetraExt::MultiPointModelEvaluator, and EpetraModelEval2DSim.

Definition at line 1011 of file EpetraExt_ModelEvaluator.cpp.

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

Definition at line 1015 of file EpetraExt_ModelEvaluator.cpp.

Teuchos::RCP< Epetra_Operator > EpetraExt::ModelEvaluator::create_DfDp_op ( int  l) const
virtual

Reimplemented in GLpApp::AdvDiffReactOptModel.

Definition at line 1019 of file EpetraExt_ModelEvaluator.cpp.

Teuchos::RCP< Epetra_Operator > EpetraExt::ModelEvaluator::create_DgDx_dot_op ( int  j) const
virtual

Definition at line 1023 of file EpetraExt_ModelEvaluator.cpp.

Teuchos::RCP< Epetra_Operator > EpetraExt::ModelEvaluator::create_DgDx_dotdot_op ( int  j) const
virtual

Definition at line 1027 of file EpetraExt_ModelEvaluator.cpp.

Teuchos::RCP< Epetra_Operator > EpetraExt::ModelEvaluator::create_DgDx_op ( int  j) const
virtual

Definition at line 1031 of file EpetraExt_ModelEvaluator.cpp.

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

Definition at line 1035 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

const int EpetraExt::ModelEvaluator::NUM_E_IN_ARGS_MEMBERS =21
static

Definition at line 128 of file EpetraExt_ModelEvaluator.h.

const int EpetraExt::ModelEvaluator::NUM_E_OUT_ARGS_MEMBERS =9
static

Definition at line 678 of file EpetraExt_ModelEvaluator.h.


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