42 #ifndef THYRA_DEFAULT_NOMINAL_BOUNDS_OVERRIDE_MODEL_EVALUATOR_HPP
43 #define THYRA_DEFAULT_NOMINAL_BOUNDS_OVERRIDE_MODEL_EVALUATOR_HPP
46 #include "Thyra_ModelEvaluatorDelegatorBase.hpp"
47 #include "Thyra_LinearOpWithSolveFactoryBase.hpp"
48 #include "Teuchos_Time.hpp"
100 template<
class Scalar>
222 template<
class Scalar>
227 template<
class Scalar>
235 initialize(thyraModel,nominalValues,lowerBounds,upperBounds);
239 template<
class Scalar>
248 nominalValues_ = nominalValues;
249 lowerBounds_ = lowerBounds;
250 upperBounds_ = upperBounds;
254 template<
class Scalar>
259 nominalValues_ = nominalValues;
263 template<
class Scalar>
268 lowerBounds_ = lowerBounds;
272 template<
class Scalar>
277 upperBounds_ = upperBounds;
284 template<
class Scalar>
288 thyraModel = this->getUnderlyingModel();
289 std::ostringstream oss;
290 oss <<
"Thyra::DefaultNominalBoundsOverrideModelEvaluator{";
291 oss <<
"thyraModel=";
293 oss <<
"\'"<<thyraModel->description()<<
"\'";
304 template<
class Scalar>
308 if(nominalValues_.get())
309 return *nominalValues_;
310 return this->getUnderlyingModel()->getNominalValues();
314 template<
class Scalar>
318 if(lowerBounds_.get())
319 return *lowerBounds_;
320 return this->getUnderlyingModel()->getLowerBounds();
324 template<
class Scalar>
328 if(upperBounds_.get())
329 return *upperBounds_;
330 return this->getUnderlyingModel()->getUpperBounds();
337 template<
class Scalar>
345 using Teuchos::rcp_const_cast;
346 using Teuchos::rcp_dynamic_cast;
350 THYRA_MODEL_EVALUATOR_DECORATOR_EVAL_MODEL_BEGIN(
351 "Thyra::DefaultNominalBoundsOverrideModelEvaluator",inArgs,outArgs
356 wrappedInArgs = ( !
is_null(nominalValues_) ? *nominalValues_ : this->createInArgs() );
360 <<
"\nwrappedInArgs after assigning to nominalValues =\n" << Teuchos::describe(wrappedInArgs,verbLevel);
363 wrappedInArgs.setArgs(inArgs);
371 wrappedInArgs.set_x_dot(Teuchos::null);
376 wrappedInArgs.set_x_dot_dot(Teuchos::null);
382 <<
"\nwrappedInArgs after setting input values =\n" << Teuchos::describe(wrappedInArgs,verbLevel);
384 thyraModel->evalModel(wrappedInArgs,outArgs);
386 THYRA_MODEL_EVALUATOR_DECORATOR_EVAL_MODEL_END();
394 #endif // THYRA_DEFAULT_NOMINAL_BOUNDS_OVERRIDE_MODEL_EVALUATOR_HPP
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...