10 #ifndef THYRA_DEFAULT_NOMINAL_BOUNDS_OVERRIDE_MODEL_EVALUATOR_HPP
11 #define THYRA_DEFAULT_NOMINAL_BOUNDS_OVERRIDE_MODEL_EVALUATOR_HPP
14 #include "Thyra_ModelEvaluatorDelegatorBase.hpp"
15 #include "Thyra_LinearOpWithSolveFactoryBase.hpp"
16 #include "Teuchos_Time.hpp"
68 template<
class Scalar>
190 template<
class Scalar>
195 template<
class Scalar>
203 initialize(thyraModel,nominalValues,lowerBounds,upperBounds);
207 template<
class Scalar>
216 nominalValues_ = nominalValues;
217 lowerBounds_ = lowerBounds;
218 upperBounds_ = upperBounds;
222 template<
class Scalar>
227 nominalValues_ = nominalValues;
231 template<
class Scalar>
236 lowerBounds_ = lowerBounds;
240 template<
class Scalar>
245 upperBounds_ = upperBounds;
252 template<
class Scalar>
256 thyraModel = this->getUnderlyingModel();
257 std::ostringstream oss;
258 oss <<
"Thyra::DefaultNominalBoundsOverrideModelEvaluator{";
259 oss <<
"thyraModel=";
261 oss <<
"\'"<<thyraModel->description()<<
"\'";
272 template<
class Scalar>
276 if(nominalValues_.get())
277 return *nominalValues_;
278 return this->getUnderlyingModel()->getNominalValues();
282 template<
class Scalar>
286 if(lowerBounds_.get())
287 return *lowerBounds_;
288 return this->getUnderlyingModel()->getLowerBounds();
292 template<
class Scalar>
296 if(upperBounds_.get())
297 return *upperBounds_;
298 return this->getUnderlyingModel()->getUpperBounds();
305 template<
class Scalar>
313 using Teuchos::rcp_const_cast;
314 using Teuchos::rcp_dynamic_cast;
318 THYRA_MODEL_EVALUATOR_DECORATOR_EVAL_MODEL_BEGIN(
319 "Thyra::DefaultNominalBoundsOverrideModelEvaluator",inArgs,outArgs
324 wrappedInArgs = ( !
is_null(nominalValues_) ? *nominalValues_ : this->createInArgs() );
328 <<
"\nwrappedInArgs after assigning to nominalValues =\n" << Teuchos::describe(wrappedInArgs,verbLevel);
331 wrappedInArgs.setArgs(inArgs);
339 wrappedInArgs.set_x_dot(Teuchos::null);
344 wrappedInArgs.set_x_dot_dot(Teuchos::null);
350 <<
"\nwrappedInArgs after setting input values =\n" << Teuchos::describe(wrappedInArgs,verbLevel);
352 thyraModel->evalModel(wrappedInArgs,outArgs);
354 THYRA_MODEL_EVALUATOR_DECORATOR_EVAL_MODEL_END();
362 #endif // THYRA_DEFAULT_NOMINAL_BOUNDS_OVERRIDE_MODEL_EVALUATOR_HPP
void initialize(int *argc, char ***argv)
Pure abstract base interface for evaluating a stateless "model" that can be mapped into a number of d...
ModelEvaluatorBase::InArgs< Scalar > getUpperBounds() const
bool is_null(const boost::shared_ptr< T > &p)
basic_OSTab< char > OSTab
Concrete aggregate class for all output arguments computable by a ModelEvaluator subclass object...
RCP< const VectorBase< Scalar > > get_x_dot() const
Precondition: supports(IN_ARG_x_dot)==true.
Teuchos::ScalarTraits< Scalar >::magnitudeType ScalarMag
This is a base class that delegetes almost all function to a wrapped model evaluator object...
void initialize(const RCP< ModelEvaluator< Scalar > > &model)
Initialize given a non-const model evaluator.
ModelEvaluatorBase::InArgs< Scalar > getLowerBounds() const
void setNominalValues(const RCP< const ModelEvaluatorBase::InArgs< Scalar > > &nominalValues)
Set only nominal values.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
This class wraps any ModelEvaluator object and allows the client to overide the state contained in th...
std::string description() const
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.
DefaultNominalBoundsOverrideModelEvaluator()
ModelEvaluatorBase::InArgs< Scalar > getNominalValues() const
Base subclass for ModelEvaluator that defines some basic types.
RCP< const VectorBase< Scalar > > get_x_dot_dot() const
Precondition: supports(IN_ARG_x_dot_dot)==true.
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.
Concrete aggregate class for all input arguments computable by a ModelEvaluator subclass object...