Thyra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | List of all members
Thyra::DefaultNominalBoundsOverrideModelEvaluator< Scalar > Class Template Reference

This class wraps any ModelEvaluator object and allows the client to overide the state contained in the nominal values and the upper and lower bounds. More...

#include <Thyra_DefaultNominalBoundsOverrideModelEvaluator.hpp>

Inheritance diagram for Thyra::DefaultNominalBoundsOverrideModelEvaluator< Scalar >:
Inheritance graph
[legend]

Public Types

typedef Teuchos::ScalarTraits
< Scalar >::magnitudeType 
ScalarMag
 
- Public Types inherited from Thyra::ModelEvaluator< Scalar >
typedef Teuchos::ScalarTraits
< Scalar >::magnitudeType 
ScalarMag
 
- Public Types inherited from Thyra::ModelEvaluatorBase
enum  EInArgsMembers {
  IN_ARG_x_dot_dot, IN_ARG_x_dot, IN_ARG_x, IN_ARG_x_dot_poly,
  IN_ARG_x_poly, IN_ARG_x_dot_mp, IN_ARG_x_mp, IN_ARG_t,
  IN_ARG_alpha, IN_ARG_beta, IN_ARG_W_x_dot_dot_coeff, IN_ARG_step_size,
  IN_ARG_stage_number
}
 
enum  EInArgs_p_mp { IN_ARG_p_mp }
 
enum  EEvalType { , EVAL_TYPE_APPROX_DERIV, EVAL_TYPE_VERY_APPROX_DERIV }
 The type of an evaluation. More...
 
enum  EDerivativeMultiVectorOrientation { DERIV_MV_JACOBIAN_FORM, DERIV_MV_GRADIENT_FORM, DERIV_MV_BY_COL = DERIV_MV_JACOBIAN_FORM, DERIV_TRANS_MV_BY_ROW = DERIV_MV_GRADIENT_FORM }
 
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_mp, OUT_ARG_W_mp,
  OUT_ARG_W_op, OUT_ARG_W_prec, OUT_ARG_f_poly
}
 
enum  EOutArgsDfDp { OUT_ARG_DfDp }
 
enum  EOutArgsDgDx_dot { OUT_ARG_DgDx_dot }
 
enum  EOutArgsDgDx { OUT_ARG_DgDx }
 
enum  EOutArgsDgDp { OUT_ARG_DgDp }
 
enum  EOutArgs_hess_vec_prod_f_xx { OUT_ARG_hess_vec_prod_f_xx }
 
enum  EOutArgs_hess_vec_prod_f_xp { OUT_ARG_hess_vec_prod_f_xp }
 
enum  EOutArgs_hess_vec_prod_f_px { OUT_ARG_hess_vec_prod_f_px }
 
enum  EOutArgs_hess_vec_prod_f_pp { OUT_ARG_hess_vec_prod_f_pp }
 
enum  EOutArgs_hess_vec_prod_g_xx { OUT_ARG_hess_vec_prod_g_xx }
 
enum  EOutArgs_hess_vec_prod_g_xp { OUT_ARG_hess_vec_prod_g_xp }
 
enum  EOutArgs_hess_vec_prod_g_px { OUT_ARG_hess_vec_prod_g_px }
 
enum  EOutArgs_hess_vec_prod_g_pp { OUT_ARG_hess_vec_prod_g_pp }
 
enum  EOutArgs_hess_f_xx { OUT_ARG_hess_f_xx }
 
enum  EOutArgs_hess_f_xp { OUT_ARG_hess_f_xp }
 
enum  EOutArgs_hess_f_pp { OUT_ARG_hess_f_pp }
 
enum  EOutArgs_hess_g_xx { OUT_ARG_hess_g_xx }
 
enum  EOutArgs_hess_g_xp { OUT_ARG_hess_g_xp }
 
enum  EOutArgs_hess_g_pp { OUT_ARG_hess_g_pp }
 
enum  EOutArgs_H_xx { OUT_ARG_H_xx }
 
enum  EOutArgs_H_xp { OUT_ARG_H_xp }
 
enum  EOutArgs_H_pp { OUT_ARG_H_pp }
 
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_mp { OUT_ARG_DgDx_mp }
 
enum  EOutArgsDgDp_mp { OUT_ARG_DgDp_mp }
 

Constructors/initializers/accessors/utilities.

 DefaultNominalBoundsOverrideModelEvaluator ()
 
 DefaultNominalBoundsOverrideModelEvaluator (const RCP< ModelEvaluator< Scalar > > &thyraModel, const RCP< const ModelEvaluatorBase::InArgs< Scalar > > &nominalValues, const RCP< const ModelEvaluatorBase::InArgs< Scalar > > &lowerBounds=Teuchos::null, const RCP< const ModelEvaluatorBase::InArgs< Scalar > > &upperBounds=Teuchos::null)
 
void initialize (const RCP< ModelEvaluator< Scalar > > &thyraModel, const RCP< const ModelEvaluatorBase::InArgs< Scalar > > &nominalValues, const RCP< const ModelEvaluatorBase::InArgs< Scalar > > &lowerBounds=Teuchos::null, const RCP< const ModelEvaluatorBase::InArgs< Scalar > > &upperBounds=Teuchos::null)
 Initalize. More...
 
void setNominalValues (const RCP< const ModelEvaluatorBase::InArgs< Scalar > > &nominalValues)
 Set only nominal values. More...
 
void setLowerBounds (const RCP< const ModelEvaluatorBase::InArgs< Scalar > > &lowerBounds)
 Set only lower bounds. More...
 
void setUpperBounds (const RCP< const ModelEvaluatorBase::InArgs< Scalar > > &upperBounds)
 Set only upper bounds. More...
 

Public functions overridden from Teuchos::Describable.

std::string description () const
 

Public functions overridden from ModelEvaulator.

ModelEvaluatorBase::InArgs
< Scalar > 
getNominalValues () const
 
ModelEvaluatorBase::InArgs
< Scalar > 
getLowerBounds () const
 
ModelEvaluatorBase::InArgs
< Scalar > 
getUpperBounds () const
 

Additional Inherited Members

- Public Member Functions inherited from Thyra::ModelEvaluatorDelegatorBase< Scalar >
 ModelEvaluatorDelegatorBase ()
 Constructs to uninitialized. More...
 
 ModelEvaluatorDelegatorBase (const RCP< ModelEvaluator< Scalar > > &model)
 Calls initialize(). More...
 
 ModelEvaluatorDelegatorBase (const RCP< const ModelEvaluator< Scalar > > &model)
 Calls initialize(). More...
 
void initialize (const RCP< ModelEvaluator< Scalar > > &model)
 Initialize given a non-const model evaluator. More...
 
void initialize (const RCP< const ModelEvaluator< Scalar > > &model)
 Initialize given a const model evaluator. More...
 
void uninitialize ()
 Uninitialize. More...
 
virtual bool isUnderlyingModelConst () const
 
virtual RCP< ModelEvaluator
< Scalar > > 
getNonconstUnderlyingModel ()
 
virtual RCP< const
ModelEvaluator< Scalar > > 
getUnderlyingModel () const
 
RCP< const VectorSpaceBase
< Scalar > > 
get_x_space () const
 
RCP< const VectorSpaceBase
< Scalar > > 
get_f_space () const
 
RCP< const VectorSpaceBase
< Scalar > > 
get_f_multiplier_space () const
 
RCP< const VectorSpaceBase
< Scalar > > 
get_p_space (int l) const
 
RCP< const Teuchos::Array
< std::string > > 
get_p_names (int l) const
 
RCP< const VectorSpaceBase
< Scalar > > 
get_g_space (int j) const
 
RCP< const VectorSpaceBase
< Scalar > > 
get_g_multiplier_space (int j) const
 
Teuchos::ArrayView< const
std::string > 
get_g_names (int j) const
 
ModelEvaluatorBase::InArgs
< Scalar > 
getNominalValues () const
 
ModelEvaluatorBase::InArgs
< Scalar > 
getLowerBounds () const
 
ModelEvaluatorBase::InArgs
< Scalar > 
getUpperBounds () const
 
RCP< LinearOpWithSolveBase
< Scalar > > 
create_W () const
 
RCP< LinearOpBase< Scalar > > create_W_op () const
 
RCP< PreconditionerBase< Scalar > > create_W_prec () const
 
RCP< const
LinearOpWithSolveFactoryBase
< Scalar > > 
get_W_factory () const
 
ModelEvaluatorBase::InArgs
< Scalar > 
createInArgs () const
 
void reportFinalPoint (const ModelEvaluatorBase::InArgs< Scalar > &finalPoint, const bool wasSolved)
 
- Public Member Functions inherited from Thyra::ModelEvaluatorDefaultBase< Scalar >
int Np () const
 
int Ng () const
 
RCP< LinearOpBase< Scalar > > create_DfDp_op (int l) const
 
RCP< LinearOpBase< Scalar > > create_DgDx_dot_op (int j) const
 
RCP< LinearOpBase< Scalar > > create_DgDx_op (int j) const
 
RCP< LinearOpBase< Scalar > > create_DgDp_op (int j, int l) const
 
ModelEvaluatorBase::OutArgs
< Scalar > 
createOutArgs () const
 
void evalModel (const ModelEvaluatorBase::InArgs< Scalar > &inArgs, const ModelEvaluatorBase::OutArgs< Scalar > &outArgs) const
 
virtual RCP< LinearOpBase
< Scalar > > 
create_hess_f_xx () const
 
virtual RCP< LinearOpBase
< Scalar > > 
create_hess_f_xp (int l) const
 
virtual RCP< LinearOpBase
< Scalar > > 
create_hess_f_pp (int l1, int l2) const
 
virtual RCP< LinearOpBase
< Scalar > > 
create_hess_g_xx (int j) const
 
virtual RCP< LinearOpBase
< Scalar > > 
create_hess_g_xp (int j, int l) const
 
virtual RCP< LinearOpBase
< Scalar > > 
create_hess_g_pp (int j, int l1, int l2) const
 
- Public Member Functions inherited from Thyra::ModelEvaluator< Scalar >
- Public Member Functions inherited from Thyra::ModelEvaluatorBase
 ModelEvaluatorBase ()
 constructor More...
 
- Static Public Attributes inherited from Thyra::ModelEvaluatorBase
static const int NUM_E_IN_ARGS_MEMBERS =13
 
static const int NUM_E_OUT_ARGS_MEMBERS =7
 
- Protected Member Functions inherited from Thyra::ModelEvaluatorDelegatorBase< Scalar >
void setLocalVerbosityLevelValidatedParameter (ParameterList *paramList) const
 Set a valid parameter for reading the local verbosity level. More...
 
Teuchos::EVerbosityLevel readLocalVerbosityLevelValidatedParameter (ParameterList &paramList) const
 Read the local verbosity level parameter. More...
 
- Protected Member Functions inherited from Thyra::ModelEvaluatorDefaultBase< Scalar >
 ModelEvaluatorDefaultBase ()
 
void initializeDefaultBase ()
 Function called by subclasses to fully initialize this object on any important change. More...
 
void resetDefaultBase ()
 Sets the the DefaultBase to an uninitialized state, forcing lazy initialization when needed. More...
 

Detailed Description

template<class Scalar>
class Thyra::DefaultNominalBoundsOverrideModelEvaluator< Scalar >

This class wraps any ModelEvaluator object and allows the client to overide the state contained in the nominal values and the upper and lower bounds.

To only override selected nominal values and bounds, do the following:

template<class Scalar>
RCP<DefaultNominalBoundsOverrideModelEvaluator<Scalar> >
override(
const RCP<ModelEvaluator<Scalar> > &thyraModel
...
)
{
using Teuchos::rcp;
// Get the defaults
RCP<MEB::InArgs<Scalar> >
nominalValues = clone(thyraModel->getNominalValues()),
lowerBounds = clone(thyraModel->getLowerBounds()),
upperBounds = clone(thyraModel->getUpperBounds());
// Override selected components ...
...
// Initialize the overridden state
RCP<DefaultNominalBoundsOverrideModelEvaluator<Scalar> >
defaultOverridder = rcp(
new DefaultNominalBoundsOverrideModelEvaluator<Scalar>(thyraModel));
defaultOverridder->setNominalValues(nominalValues);
defaultOverridder->setLowerBounds(lowerBounds);
defaultOverridder->setUpperBounds(upperBounds);
return defaultOverridder;
}

ToDo: Finish documentation!

Definition at line 101 of file Thyra_DefaultNominalBoundsOverrideModelEvaluator.hpp.

Member Typedef Documentation

template<class Scalar >
typedef Teuchos::ScalarTraits<Scalar>::magnitudeType Thyra::DefaultNominalBoundsOverrideModelEvaluator< Scalar >::ScalarMag

Constructor & Destructor Documentation

template<class Scalar >
Thyra::DefaultNominalBoundsOverrideModelEvaluator< Scalar >::DefaultNominalBoundsOverrideModelEvaluator ( const RCP< ModelEvaluator< Scalar > > &  thyraModel,
const RCP< const ModelEvaluatorBase::InArgs< Scalar > > &  nominalValues,
const RCP< const ModelEvaluatorBase::InArgs< Scalar > > &  lowerBounds = Teuchos::null,
const RCP< const ModelEvaluatorBase::InArgs< Scalar > > &  upperBounds = Teuchos::null 
)

Member Function Documentation

template<class Scalar >
void Thyra::DefaultNominalBoundsOverrideModelEvaluator< Scalar >::initialize ( const RCP< ModelEvaluator< Scalar > > &  thyraModel,
const RCP< const ModelEvaluatorBase::InArgs< Scalar > > &  nominalValues,
const RCP< const ModelEvaluatorBase::InArgs< Scalar > > &  lowerBounds = Teuchos::null,
const RCP< const ModelEvaluatorBase::InArgs< Scalar > > &  upperBounds = Teuchos::null 
)

Initalize.

Parameters
thyraModel[in] Model being wrapped.
nominalValues[in] Completely overrides thyraModel->getNominalValues()
lowerBounds[in] If non-null, completely overrides thyraModel->getLowerBounds()
upperBounds[in] If non-null, completely overrides thyraModel->getUpperBounds()

Preconditions:

  • thyraModel.get()!=NULL

Postconditions:

  • this->getUnderlyingModel.get() == thyraModel.get()
  • [nominalValues.get()] this->getNominalValues() returns *nominalValues
  • [lowerBounds.get()] this->getLowerBounds() returns *lowerBounds
  • [upperBounds.get()] this->getUpperBounds() returns *upperBounds

Definition at line 240 of file Thyra_DefaultNominalBoundsOverrideModelEvaluator.hpp.

template<class Scalar >
void Thyra::DefaultNominalBoundsOverrideModelEvaluator< Scalar >::setNominalValues ( const RCP< const ModelEvaluatorBase::InArgs< Scalar > > &  nominalValues)

Set only nominal values.

Definition at line 255 of file Thyra_DefaultNominalBoundsOverrideModelEvaluator.hpp.

template<class Scalar >
void Thyra::DefaultNominalBoundsOverrideModelEvaluator< Scalar >::setLowerBounds ( const RCP< const ModelEvaluatorBase::InArgs< Scalar > > &  lowerBounds)

Set only lower bounds.

Definition at line 264 of file Thyra_DefaultNominalBoundsOverrideModelEvaluator.hpp.

template<class Scalar >
void Thyra::DefaultNominalBoundsOverrideModelEvaluator< Scalar >::setUpperBounds ( const RCP< const ModelEvaluatorBase::InArgs< Scalar > > &  upperBounds)

Set only upper bounds.

Definition at line 273 of file Thyra_DefaultNominalBoundsOverrideModelEvaluator.hpp.

template<class Scalar >
std::string Thyra::DefaultNominalBoundsOverrideModelEvaluator< Scalar >::description ( ) const
virtual

Reimplemented from Teuchos::Describable.

Definition at line 285 of file Thyra_DefaultNominalBoundsOverrideModelEvaluator.hpp.

template<class Scalar >
ModelEvaluatorBase::InArgs< Scalar > Thyra::DefaultNominalBoundsOverrideModelEvaluator< Scalar >::getNominalValues ( ) const
virtual
template<class Scalar >
ModelEvaluatorBase::InArgs< Scalar > Thyra::DefaultNominalBoundsOverrideModelEvaluator< Scalar >::getLowerBounds ( ) const
virtual
template<class Scalar >
ModelEvaluatorBase::InArgs< Scalar > Thyra::DefaultNominalBoundsOverrideModelEvaluator< Scalar >::getUpperBounds ( ) const
virtual

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