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"
176 :
public ModelEvaluatorDefaultBase<double>,
190 const RCP<LinearOpWithSolveFactoryBase<double> > &W_factory
196 const RCP<LinearOpWithSolveFactoryBase<double> > &W_factory
207 void setNominalValues(
const ModelEvaluatorBase::InArgs<double>& nominalValues );
244 RCP<LinearOpWithSolveFactoryBase<double> > *W_factory = NULL
248 const ModelEvaluatorBase::InArgs<double>&
getFinalPoint()
const;
311 ModelEvaluatorBase::InArgs<double>
createInArgs()
const;
314 const ModelEvaluatorBase::InArgs<double> &finalPoint
315 ,
const bool wasSolved
341 const ModelEvaluatorBase::InArgs<double> &inArgs,
342 const ModelEvaluatorBase::OutArgs<double> &outArgs
412 const EpetraExt::ModelEvaluator::InArgs &epetraInArgs,
413 ModelEvaluatorBase::InArgs<double> *inArgs
418 const ModelEvaluatorBase::InArgs<double> &inArgs,
419 EpetraExt::ModelEvaluator::InArgs *epetraInArgs
425 const ModelEvaluatorBase::OutArgs<double> &outArgs,
427 EpetraExt::ModelEvaluator::OutArgs *epetraUnscaledOutArgs,
429 RCP<LinearOpBase<double> > *W_op,
437 EpetraExt::ModelEvaluator::InArgs *epetraInArgs,
438 EpetraExt::ModelEvaluator::OutArgs *epetraUnscaledOutArgs,
445 const EpetraExt::ModelEvaluator::OutArgs &epetraUnscaledOutArgs,
452 const EpetraExt::ModelEvaluator::OutArgs &epetraOutArgs,
453 RCP<LinearOpBase<double> > &W_op,
456 const ModelEvaluatorBase::OutArgs<double> &outArgs
483 epetraModelEvaluator(
485 const RCP<LinearOpWithSolveFactoryBase<double> > &W_factory
492 ModelEvaluatorBase::EDerivativeMultiVectorOrientation
493 convert(
const EpetraExt::ModelEvaluator::EDerivativeMultiVectorOrientation &mvOrientation );
499 EpetraExt::ModelEvaluator::EDerivativeMultiVectorOrientation
500 convert(
const ModelEvaluatorBase::EDerivativeMultiVectorOrientation &mvOrientation );
506 ModelEvaluatorBase::DerivativeProperties
507 convert(
const EpetraExt::ModelEvaluator::DerivativeProperties &derivativeProperties );
513 ModelEvaluatorBase::DerivativeSupport
514 convert(
const EpetraExt::ModelEvaluator::DerivativeSupport &derivativeSupport );
520 EpetraExt::ModelEvaluator::Derivative
522 const ModelEvaluatorBase::Derivative<double> &derivative,
527 EpetraExt::ModelEvaluator::MPDerivative
529 const ModelEvaluatorBase::MPDerivative &derivative,
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.
void updateInArgsOutArgs() const
void convertInArgsFromEpetraToThyra(const EpetraExt::ModelEvaluator::InArgs &epetraInArgs, ModelEvaluatorBase::InArgs< double > *inArgs) const
RCP< const EpetraExt::ModelEvaluator > getEpetraModel() const
RCP< Epetra_Vector > x_dot_unscaled_
RCP< const Epetra_Map > x_map_
void reportFinalPoint(const ModelEvaluatorBase::InArgs< double > &finalPoint, const bool wasSolved)
void preEvalScalingSetup(EpetraExt::ModelEvaluator::InArgs *epetraInArgs, EpetraExt::ModelEvaluator::OutArgs *epetraUnscaledOutArgs, const RCP< Teuchos::FancyOStream > &out, const Teuchos::EVerbosityLevel verbLevel) const
ModelEvaluatorBase::OutArgs< double > createOutArgsImpl() const
RCP< LinearOpBase< double > > create_DgDx_dot_op_impl(int j) const
RCP< const Teuchos::ParameterList > getValidParameters() const
RCP< LinearOpBase< double > > create_W_op() const
ModelEvaluatorBase::InArgs< double > getNominalValues() const
RCP< Teuchos::ParameterList > getNonconstParameterList()
p_map_is_local_t g_map_is_local_
RCP< Epetra_Vector > x_unscaled_
Teuchos::Array< RCP< const Epetra_Map > > p_map_t
RCP< LinearOpWithSolveFactoryBase< double > > W_factory_
EStateFunctionScaling stateFunctionScaling_
void convertOutArgsFromThyraToEpetra(const ModelEvaluatorBase::OutArgs< double > &outArgs, EpetraExt::ModelEvaluator::OutArgs *epetraUnscaledOutArgs, RCP< LinearOpBase< double > > *W_op, RCP< EpetraLinearOp > *efwdW, RCP< Epetra_Operator > *eW) const
RCP< PreconditionerBase< double > > create_W_prec() const
Returns null currently.
Teuchos::Array< RCP< const Epetra_Map > > g_map_t
void setStateVariableScalingVec(const RCP< const Epetra_Vector > &stateVariableScalingVec)
Set the state variable scaling vector s_x (see above).
Teuchos::Array< RCP< const VectorSpaceBase< double > > > g_space_t
ModelEvaluatorBase::InArgs< double > createInArgs() const
EpetraExt::ModelEvaluator::OutArgs epetraOutArgsScaling_
void convertInArgsFromThyraToEpetra(const ModelEvaluatorBase::InArgs< double > &inArgs, EpetraExt::ModelEvaluator::InArgs *epetraInArgs) const
RCP< const VectorSpaceBase< double > > x_space_
RCP< const Epetra_Vector > getStateVariableScalingVec() const
Get the inverse state variable scaling vector inv_s_x (see above).
ModelEvaluatorBase::OutArgs< double > prototypeOutArgs_
RCP< const Teuchos::ParameterList > getParameterList() const
RCP< const LinearOpWithSolveFactoryBase< double > > get_W_factory() const
EpetraExt::ModelEvaluator::MPDerivative convert(const ModelEvaluatorBase::MPDerivative &derivative, const RCP< const Epetra_Map > &fnc_map, const RCP< const Epetra_Map > &var_map)
RCP< const Epetra_Vector > getStateVariableInvScalingVec() const
Get the state variable scaling vector s_x (see above).
RCP< const VectorSpaceBase< double > > f_space_
ModelEvaluatorBase::InArgs< double > getUpperBounds() const
ModelEvaluatorBase::InArgs< double > finalPoint_
void setStateFunctionScalingVec(const RCP< const Epetra_Vector > &stateFunctionScalingVec)
Set the state function scaling vector s_f (see above).
RCP< LinearOpBase< double > > create_DgDx_op_impl(int j) const
bool finalPointWasSolved() const
ModelEvaluatorBase::InArgs< double > lowerBounds_
RCP< const Epetra_Vector > getStateFunctionScalingVec() const
Get the state function scaling vector s_f (see above).
RCP< EpetraLinearOp > create_epetra_W_op() const
void initialize(const RCP< const EpetraExt::ModelEvaluator > &epetraModel, const RCP< LinearOpWithSolveFactoryBase< double > > &W_factory)
RCP< const VectorSpaceBase< double > > get_f_space() const
void updateNominalValuesAndBounds() const
RCP< LinearOpBase< double > > create_DfDp_op_impl(int l) const
Teuchos::Array< RCP< const VectorSpaceBase< double > > > p_space_t
RCP< const VectorSpaceBase< double > > get_x_space() const
RCP< const VectorSpaceBase< double > > get_g_space(int j) const
EpetraExt::ModelEvaluator::InArgs epetraInArgsScaling_
RCP< const VectorSpaceBase< double > > get_p_space(int l) const
bool currentInArgsOutArgs_
Concrete Adapter subclass that takes an EpetraExt::ModelEvaluator object and wraps it as a Thyra::Mod...
bool finalPointWasSolved_
RCP< const Teuchos::Array< std::string > > get_p_names(int l) const
void setParameterList(RCP< Teuchos::ParameterList > const ¶mList)
RCP< LinearOpBase< double > > create_DgDp_op_impl(int j, int l) const
std::string description() const
RCP< const Epetra_Vector > stateFunctionScalingVec_
void postEvalScalingSetup(const EpetraExt::ModelEvaluator::OutArgs &epetraUnscaledOutArgs, const RCP< Teuchos::FancyOStream > &out, const Teuchos::EVerbosityLevel verbLevel) 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
void evalModelImpl(const ModelEvaluatorBase::InArgs< double > &inArgs, const ModelEvaluatorBase::OutArgs< double > &outArgs) const
bool nominalValuesAndBoundsAreUpdated_
void finishConvertingOutArgsFromEpetraToThyra(const EpetraExt::ModelEvaluator::OutArgs &epetraOutArgs, RCP< LinearOpBase< double > > &W_op, RCP< EpetraLinearOp > &efwdW, RCP< Epetra_Operator > &eW, const ModelEvaluatorBase::OutArgs< double > &outArgs) const
ModelEvaluatorBase::InArgs< double > prototypeInArgs_
RCP< const Epetra_Map > f_map_
RCP< const Epetra_Vector > stateVariableScalingVec_
std::vector< bool > g_map_is_local_t
RCP< const EpetraExt::ModelEvaluator > epetraModel_
std::vector< bool > p_map_is_local_t
RCP< Teuchos::ParameterList > paramList_
ModelEvaluatorBase::InArgs< double > nominalValues_
p_map_is_local_t p_map_is_local_
RCP< Teuchos::ParameterList > unsetParameterList()
RCP< const Epetra_Vector > invStateVariableScalingVec_
ModelEvaluatorBase::InArgs< double > upperBounds_