42 #ifndef THYRA_DEFAULT_FINAL_POINT_CAPTURE_MODEL_EVALUATOR_HPP
43 #define THYRA_DEFAULT_FINAL_POINT_CAPTURE_MODEL_EVALUATOR_HPP
45 #include "Thyra_ModelEvaluatorDelegatorBase.hpp"
46 #include "Thyra_LinearOpWithSolveFactoryBase.hpp"
47 #include "Teuchos_Time.hpp"
63 template<
class Scalar>
126 bool finalPointWasSolved_;
138 template<
class Scalar>
140 :finalPointWasSolved_(false)
144 template<
class Scalar>
150 finalPoint_ = thyraModel->createInArgs();
151 finalPoint_.setArgs(thyraModel->getNominalValues());
152 finalPointWasSolved_ =
false;
156 template<
class Scalar>
160 #ifdef THYRA_DEFAULT_FINAL_POINT_CAPTURE_MODEL_EVALUATOR_DUMP_ALL
162 <<
"\nDefaultFinalPointCaptureModelEvaluator<Scalar>::getFinalPoint():"
169 template<
class Scalar>
172 return finalPointWasSolved_;
179 template<
class Scalar>
183 thyraModel = this->getUnderlyingModel();
184 std::ostringstream oss;
185 oss <<
"Thyra::DefaultFinalPointCaptureModelEvaluator{";
186 oss <<
"thyraModel=";
188 oss <<
"\'"<<thyraModel->description()<<
"\'";
199 template<
class Scalar>
205 finalPoint_.setArgs(finalPoint);
206 finalPointWasSolved_ = wasSolved;
207 if(!this->isUnderlyingModelConst())
208 this->getNonconstUnderlyingModel()->reportFinalPoint(finalPoint,wasSolved);
209 #ifdef THYRA_DEFAULT_FINAL_POINT_CAPTURE_MODEL_EVALUATOR_DUMP_ALL
211 <<
"\nDefaultFinalPointCaptureModelEvaluator<Scalar>::reportFinalPoint(...):"
220 template<
class Scalar>
227 THYRA_MODEL_EVALUATOR_DECORATOR_EVAL_MODEL_BEGIN(
228 "Thyra::DefaultFinalPointCaptureModelEvaluator",inArgs,outArgs
231 thyraModel->evalModel(inArgs,outArgs);
233 THYRA_MODEL_EVALUATOR_DECORATOR_EVAL_MODEL_END();
241 #endif // THYRA_DEFAULT_FINAL_POINT_CAPTURE_MODEL_EVALUATOR_HPP
void reportFinalPoint(const ModelEvaluatorBase::InArgs< Scalar > &finalPoint, const bool wasSolved)
Pure abstract base interface for evaluating a stateless "model" that can be mapped into a number of d...
DefaultFinalPointCaptureModelEvaluator()
bool finalPointWasSolved() const
Concrete aggregate class for all output arguments computable by a ModelEvaluator subclass object...
std::string description() const
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.
const ModelEvaluatorBase::InArgs< Scalar > & getFinalPoint() const
static RCP< FancyOStream > getDefaultOStream()
Teuchos::ScalarTraits< Scalar >::magnitudeType ScalarMag
This class wraps any ModelEvaluator object and allows the client to capture the final point that is r...
Concrete aggregate class for all input arguments computable by a ModelEvaluator subclass object...