42 #ifndef THYRA_EPETRA_MODEL_EVALUATOR_HPP
43 #define THYRA_EPETRA_MODEL_EVALUATOR_HPP
45 #include "Thyra_ModelEvaluatorDefaultBase.hpp"
47 #include "Thyra_LinearOpWithSolveFactoryBase.hpp"
48 #include "EpetraExt_ModelEvaluator.h"
49 #include "Epetra_Map.h"
50 #include "Teuchos_Array.hpp"
315 ,
const bool wasSolved
322 enum EStateFunctionScaling { STATE_FUNC_SCALING_NONE, STATE_FUNC_SCALING_ROW_SUM };
354 typedef std::vector<bool> p_map_is_local_t;
355 typedef std::vector<bool> g_map_is_local_t;
374 p_map_is_local_t p_map_is_local_;
375 p_map_is_local_t g_map_is_local_;
386 mutable bool nominalValuesAndBoundsAreUpdated_;
390 EStateFunctionScaling stateFunctionScaling_;
395 mutable EpetraExt::ModelEvaluator::InArgs epetraInArgsScaling_;
396 mutable EpetraExt::ModelEvaluator::OutArgs epetraOutArgsScaling_;
403 mutable bool currentInArgsOutArgs_;
405 bool finalPointWasSolved_;
411 void convertInArgsFromEpetraToThyra(
412 const EpetraExt::ModelEvaluator::InArgs &epetraInArgs,
417 void convertInArgsFromThyraToEpetra(
419 EpetraExt::ModelEvaluator::InArgs *epetraInArgs
423 void convertOutArgsFromThyraToEpetra(
427 EpetraExt::ModelEvaluator::OutArgs *epetraUnscaledOutArgs,
436 void preEvalScalingSetup(
437 EpetraExt::ModelEvaluator::InArgs *epetraInArgs,
438 EpetraExt::ModelEvaluator::OutArgs *epetraUnscaledOutArgs,
444 void postEvalScalingSetup(
445 const EpetraExt::ModelEvaluator::OutArgs &epetraUnscaledOutArgs,
451 void finishConvertingOutArgsFromEpetraToThyra(
452 const EpetraExt::ModelEvaluator::OutArgs &epetraOutArgs,
463 void updateNominalValuesAndBounds()
const;
466 void updateInArgsOutArgs()
const;
483 epetraModelEvaluator(
493 convert(
const EpetraExt::ModelEvaluator::EDerivativeMultiVectorOrientation &mvOrientation );
499 EpetraExt::ModelEvaluator::EDerivativeMultiVectorOrientation
507 convert(
const EpetraExt::ModelEvaluator::DerivativeProperties &derivativeProperties );
514 convert(
const EpetraExt::ModelEvaluator::DerivativeSupport &derivativeSupport );
520 EpetraExt::ModelEvaluator::Derivative
527 EpetraExt::ModelEvaluator::MPDerivative
537 #endif // THYRA_EPETRA_MODEL_EVALUATOR_HPP
const ModelEvaluatorBase::InArgs< double > & getFinalPoint() const
ModelEvaluatorBase::InArgs< double > getLowerBounds() const
void setNominalValues(const ModelEvaluatorBase::InArgs< double > &nominalValues)
Set the nominal values.
RCP< const EpetraExt::ModelEvaluator > getEpetraModel() const
Default base class for concrete model evaluators.
void reportFinalPoint(const ModelEvaluatorBase::InArgs< double > &finalPoint, const bool wasSolved)
RCP< const Teuchos::ParameterList > getValidParameters() const
RCP< LinearOpBase< double > > create_W_op() const
ModelEvaluatorBase::InArgs< double > getNominalValues() const
RCP< Teuchos::ParameterList > getNonconstParameterList()
EDerivativeMultiVectorOrientation
RCP< PreconditionerBase< double > > create_W_prec() const
Returns null currently.
Simple aggregate class that stores a derivative object as a general linear operator or as a multi-vec...
void setStateVariableScalingVec(const RCP< const Epetra_Vector > &stateVariableScalingVec)
Set the state variable scaling vector s_x (see above).
ModelEvaluatorBase::InArgs< double > createInArgs() const
RCP< const Epetra_Vector > getStateVariableScalingVec() const
Get the inverse state variable scaling vector inv_s_x (see above).
RCP< const Teuchos::ParameterList > getParameterList() const
RCP< const LinearOpWithSolveFactoryBase< double > > get_W_factory() const
RCP< const Epetra_Vector > getStateVariableInvScalingVec() const
Get the state variable scaling vector s_x (see above).
ModelEvaluatorBase::InArgs< double > getUpperBounds() const
void setStateFunctionScalingVec(const RCP< const Epetra_Vector > &stateFunctionScalingVec)
Set the state function scaling vector s_f (see above).
bool finalPointWasSolved() const
RCP< const Epetra_Vector > getStateFunctionScalingVec() const
Get the state function scaling vector s_f (see above).
void initialize(const RCP< const EpetraExt::ModelEvaluator > &epetraModel, const RCP< LinearOpWithSolveFactoryBase< double > > &W_factory)
RCP< const VectorSpaceBase< double > > get_f_space() const
RCP< const VectorSpaceBase< double > > get_x_space() const
RCP< const VectorSpaceBase< double > > get_g_space(int j) const
Simple public strict containing properties of a derivative object.
RCP< const VectorSpaceBase< double > > get_p_space(int l) const
Concrete Adapter subclass that takes an EpetraExt::ModelEvaluator object and wraps it as a Thyra::Mod...
RCP< const Teuchos::Array< std::string > > get_p_names(int l) const
void setParameterList(RCP< Teuchos::ParameterList > const ¶mList)
std::string description() const
void uninitialize(RCP< const EpetraExt::ModelEvaluator > *epetraModel=NULL, RCP< LinearOpWithSolveFactoryBase< double > > *W_factory=NULL)
Teuchos::ArrayView< const std::string > get_g_names(int j) const
Determines the forms of a general derivative that are supported.
Simple aggregate class that stores a derivative object as a general linear operator or as a multi-vec...
RCP< Teuchos::ParameterList > unsetParameterList()