Thyra Version of the Day
Public Types
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]

List of all members.

Public Types

typedef Teuchos::ScalarTraits
< Scalar >::magnitudeType 
ScalarMag
 

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.
void setNominalValues (const RCP< const ModelEvaluatorBase::InArgs< Scalar > > &nominalValues)
 Set only nominal values.
void setLowerBounds (const RCP< const ModelEvaluatorBase::InArgs< Scalar > > &lowerBounds)
 Set only lower bounds.
void setUpperBounds (const RCP< const ModelEvaluatorBase::InArgs< Scalar > > &upperBounds)
 Set only upper bounds.

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
 

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;
     typedef Thyra::ModelEvaluatorBase MEB;

     // 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 88 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 227 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 242 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 251 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 260 of file Thyra_DefaultNominalBoundsOverrideModelEvaluator.hpp.

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

Reimplemented from Teuchos::Describable.

Definition at line 272 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:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines