Thyra::ModelEvaluatorDelegatorBase< Scalar > Class Template Reference

This is a base class that delegetes almost all function to a wrapped model evaluator object. More...

#include <Thyra_ModelEvaluatorDelegatorBase.hpp>

Inheritance diagram for Thyra::ModelEvaluatorDelegatorBase< Scalar >:

[legend]
List of all members.

Constructors/initializers

 ModelEvaluatorDelegatorBase ()
 Constructs to uninitialized.
 ModelEvaluatorDelegatorBase (const Teuchos::RefCountPtr< ModelEvaluator< Scalar > > &model)
 Calls initialize().
 ModelEvaluatorDelegatorBase (const Teuchos::RefCountPtr< const ModelEvaluator< Scalar > > &model)
 Calls initialize().
void initialize (const Teuchos::RefCountPtr< ModelEvaluator< Scalar > > &model)
 Initialize given a non-const model evaluator.
void initialize (const Teuchos::RefCountPtr< const ModelEvaluator< Scalar > > &model)
 Initialize given a const model evaluator.
void uninitialize ()
 Uninitialize.

Virtual functions that can overriden

virtual bool isUnderlyingModelConst () const
 
virtual Teuchos::RefCountPtr<
ModelEvaluator< Scalar > > 
getNonconstUnderlyingModel ()
 
virtual Teuchos::RefCountPtr<
const ModelEvaluator< Scalar > > 
getUnderlyingModel () const
 

Public functions overridden from ModelEvaulator.

int Np () const
 
int Ng () const
 
Teuchos::RefCountPtr< const
VectorSpaceBase< Scalar > > 
get_x_space () const
 
Teuchos::RefCountPtr< const
VectorSpaceBase< Scalar > > 
get_f_space () const
 
Teuchos::RefCountPtr< const
VectorSpaceBase< Scalar > > 
get_p_space (int l) const
 
Teuchos::RefCountPtr< const
VectorSpaceBase< Scalar > > 
get_g_space (int j) const
 
ModelEvaluatorBase::InArgs<
Scalar > 
getNominalValues () const
 
ModelEvaluatorBase::InArgs<
Scalar > 
getLowerBounds () const
 
ModelEvaluatorBase::InArgs<
Scalar > 
getUpperBounds () const
 
Teuchos::RefCountPtr< LinearOpWithSolveBase<
Scalar > > 
create_W () const
 
Teuchos::RefCountPtr< LinearOpBase<
Scalar > > 
create_W_op () const
 
Teuchos::RefCountPtr< LinearOpBase<
Scalar > > 
create_DfDp_op (int l) const
 
Teuchos::RefCountPtr< LinearOpBase<
Scalar > > 
create_DgDx_op (int j) const
 
Teuchos::RefCountPtr< LinearOpBase<
Scalar > > 
create_DgDp_op (int j, int l) const
 
ModelEvaluatorBase::InArgs<
Scalar > 
createInArgs () const
 
ModelEvaluatorBase::OutArgs<
Scalar > 
createOutArgs () const
 
void reportFinalPoint (const ModelEvaluatorBase::InArgs< Scalar > &finalPoint, const bool wasSolved)
 

Detailed Description

template<class Scalar>
class Thyra::ModelEvaluatorDelegatorBase< Scalar >

This is a base class that delegetes almost all function to a wrapped model evaluator object.

This class makes it easy to write many different types of decorator subclasses by only requiring those subclasses to override just the behavior that they need to overide and leave the rest alone. Note that whenever the definition of ModelEvaluator changes, this class will have to be updated. However, the decorator subclasses that derive from this base class might be able to remain unchanged. Note that changes in only the ModelEvaluatorBase::InArgs and ModelEvaluatorBase::OutArgs classes should not require any changes here.

The only functions that a client must override in order to create a concrete subcalss is the evalModel() function. All other functions have implementations here that simply delegate to the model evaluator object returned from getUnderlyingModel(). However, most decorator classes will need to override at least one other function.

This class provides a default implemntation of the machinary to store and access the wrapped model evaluator object. A subclass can choose to ignore this and override the functions isUnderlyingModelConst(), getConstUnderlyingModel(), and getUnderlyingModel().

Definition at line 62 of file Thyra_ModelEvaluatorDelegatorBase.hpp.


Constructor & Destructor Documentation

template<class Scalar>
Thyra::ModelEvaluatorDelegatorBase< Scalar >::ModelEvaluatorDelegatorBase  ) 
 

Constructs to uninitialized.

Definition at line 165 of file Thyra_ModelEvaluatorDelegatorBase.hpp.

template<class Scalar>
Thyra::ModelEvaluatorDelegatorBase< Scalar >::ModelEvaluatorDelegatorBase const Teuchos::RefCountPtr< ModelEvaluator< Scalar > > &  model  ) 
 

Calls initialize().

Definition at line 169 of file Thyra_ModelEvaluatorDelegatorBase.hpp.

template<class Scalar>
Thyra::ModelEvaluatorDelegatorBase< Scalar >::ModelEvaluatorDelegatorBase const Teuchos::RefCountPtr< const ModelEvaluator< Scalar > > &  model  ) 
 

Calls initialize().

Definition at line 177 of file Thyra_ModelEvaluatorDelegatorBase.hpp.


Member Function Documentation

template<class Scalar>
void Thyra::ModelEvaluatorDelegatorBase< Scalar >::initialize const Teuchos::RefCountPtr< ModelEvaluator< Scalar > > &  model  ) 
 

Initialize given a non-const model evaluator.

Definition at line 185 of file Thyra_ModelEvaluatorDelegatorBase.hpp.

template<class Scalar>
void Thyra::ModelEvaluatorDelegatorBase< Scalar >::initialize const Teuchos::RefCountPtr< const ModelEvaluator< Scalar > > &  model  ) 
 

Initialize given a const model evaluator.

Definition at line 193 of file Thyra_ModelEvaluatorDelegatorBase.hpp.

template<class Scalar>
void Thyra::ModelEvaluatorDelegatorBase< Scalar >::uninitialize  ) 
 

Uninitialize.

Definition at line 201 of file Thyra_ModelEvaluatorDelegatorBase.hpp.

template<class Scalar>
bool Thyra::ModelEvaluatorDelegatorBase< Scalar >::isUnderlyingModelConst  )  const [virtual]
 

Definition at line 209 of file Thyra_ModelEvaluatorDelegatorBase.hpp.

template<class Scalar>
Teuchos::RefCountPtr< ModelEvaluator< Scalar > > Thyra::ModelEvaluatorDelegatorBase< Scalar >::getNonconstUnderlyingModel  )  [virtual]
 

Definition at line 216 of file Thyra_ModelEvaluatorDelegatorBase.hpp.

template<class Scalar>
Teuchos::RefCountPtr< const ModelEvaluator< Scalar > > Thyra::ModelEvaluatorDelegatorBase< Scalar >::getUnderlyingModel  )  const [virtual]
 

Definition at line 223 of file Thyra_ModelEvaluatorDelegatorBase.hpp.

template<class Scalar>
int Thyra::ModelEvaluatorDelegatorBase< Scalar >::Np  )  const
 

Definition at line 231 of file Thyra_ModelEvaluatorDelegatorBase.hpp.

template<class Scalar>
int Thyra::ModelEvaluatorDelegatorBase< Scalar >::Ng  )  const
 

Definition at line 237 of file Thyra_ModelEvaluatorDelegatorBase.hpp.

template<class Scalar>
Teuchos::RefCountPtr< const VectorSpaceBase< Scalar > > Thyra::ModelEvaluatorDelegatorBase< Scalar >::get_x_space  )  const
 

Definition at line 244 of file Thyra_ModelEvaluatorDelegatorBase.hpp.

template<class Scalar>
Teuchos::RefCountPtr< const VectorSpaceBase< Scalar > > Thyra::ModelEvaluatorDelegatorBase< Scalar >::get_f_space  )  const
 

Definition at line 251 of file Thyra_ModelEvaluatorDelegatorBase.hpp.

template<class Scalar>
Teuchos::RefCountPtr< const VectorSpaceBase< Scalar > > Thyra::ModelEvaluatorDelegatorBase< Scalar >::get_p_space int  l  )  const
 

Definition at line 258 of file Thyra_ModelEvaluatorDelegatorBase.hpp.

template<class Scalar>
Teuchos::RefCountPtr< const VectorSpaceBase< Scalar > > Thyra::ModelEvaluatorDelegatorBase< Scalar >::get_g_space int  j  )  const
 

Definition at line 265 of file Thyra_ModelEvaluatorDelegatorBase.hpp.

template<class Scalar>
ModelEvaluatorBase::InArgs< Scalar > Thyra::ModelEvaluatorDelegatorBase< Scalar >::getNominalValues  )  const
 

Reimplemented in Thyra::DefaultNominalBoundsOverrideModelEvaluator< Scalar >, and Thyra::SingleResidSSDAEModelEvaluator< Scalar >.

Definition at line 272 of file Thyra_ModelEvaluatorDelegatorBase.hpp.

template<class Scalar>
ModelEvaluatorBase::InArgs< Scalar > Thyra::ModelEvaluatorDelegatorBase< Scalar >::getLowerBounds  )  const
 

Reimplemented in Thyra::DefaultNominalBoundsOverrideModelEvaluator< Scalar >.

Definition at line 279 of file Thyra_ModelEvaluatorDelegatorBase.hpp.

template<class Scalar>
ModelEvaluatorBase::InArgs< Scalar > Thyra::ModelEvaluatorDelegatorBase< Scalar >::getUpperBounds  )  const
 

Reimplemented in Thyra::DefaultNominalBoundsOverrideModelEvaluator< Scalar >.

Definition at line 286 of file Thyra_ModelEvaluatorDelegatorBase.hpp.

template<class Scalar>
Teuchos::RefCountPtr< LinearOpWithSolveBase< Scalar > > Thyra::ModelEvaluatorDelegatorBase< Scalar >::create_W  )  const
 

Reimplemented in Thyra::DefaultModelEvaluatorWithSolveFactory< Scalar >.

Definition at line 293 of file Thyra_ModelEvaluatorDelegatorBase.hpp.

template<class Scalar>
Teuchos::RefCountPtr< LinearOpBase< Scalar > > Thyra::ModelEvaluatorDelegatorBase< Scalar >::create_W_op  )  const
 

Definition at line 300 of file Thyra_ModelEvaluatorDelegatorBase.hpp.

template<class Scalar>
Teuchos::RefCountPtr< LinearOpBase< Scalar > > Thyra::ModelEvaluatorDelegatorBase< Scalar >::create_DfDp_op int  l  )  const
 

Definition at line 307 of file Thyra_ModelEvaluatorDelegatorBase.hpp.

template<class Scalar>
Teuchos::RefCountPtr< LinearOpBase< Scalar > > Thyra::ModelEvaluatorDelegatorBase< Scalar >::create_DgDx_op int  j  )  const
 

Definition at line 314 of file Thyra_ModelEvaluatorDelegatorBase.hpp.

template<class Scalar>
Teuchos::RefCountPtr< LinearOpBase< Scalar > > Thyra::ModelEvaluatorDelegatorBase< Scalar >::create_DgDp_op int  j,
int  l
const
 

Definition at line 321 of file Thyra_ModelEvaluatorDelegatorBase.hpp.

template<class Scalar>
ModelEvaluatorBase::InArgs< Scalar > Thyra::ModelEvaluatorDelegatorBase< Scalar >::createInArgs  )  const
 

Reimplemented in Thyra::SingleResidSSDAEModelEvaluator< Scalar >.

Definition at line 328 of file Thyra_ModelEvaluatorDelegatorBase.hpp.

template<class Scalar>
ModelEvaluatorBase::OutArgs< Scalar > Thyra::ModelEvaluatorDelegatorBase< Scalar >::createOutArgs  )  const
 

Reimplemented in Thyra::DefaultFiniteDifferenceModelEvaluator< Scalar >, Thyra::DefaultModelEvaluatorWithSolveFactory< Scalar >, and Thyra::SingleResidSSDAEModelEvaluator< Scalar >.

Definition at line 337 of file Thyra_ModelEvaluatorDelegatorBase.hpp.

template<class Scalar>
void Thyra::ModelEvaluatorDelegatorBase< Scalar >::reportFinalPoint const ModelEvaluatorBase::InArgs< Scalar > &  finalPoint,
const bool  wasSolved
 

Reimplemented in Thyra::DefaultFinalPointCaptureModelEvaluator< Scalar >.

Definition at line 345 of file Thyra_ModelEvaluatorDelegatorBase.hpp.


The documentation for this class was generated from the following file:
Generated on Thu Sep 18 12:32:49 2008 for Thyra Nonlinear Model Evaluator Support by doxygen 1.3.9.1