10 #ifndef THYRA_EPETRA_MODEL_EVALUATOR_HPP
11 #define THYRA_EPETRA_MODEL_EVALUATOR_HPP
13 #include "Thyra_ModelEvaluatorDefaultBase.hpp"
15 #include "Thyra_LinearOpWithSolveFactoryBase.hpp"
16 #include "EpetraExt_ModelEvaluator.h"
17 #include "Epetra_Map.h"
144 :
public ModelEvaluatorDefaultBase<double>,
158 const RCP<LinearOpWithSolveFactoryBase<double> > &W_factory
164 const RCP<LinearOpWithSolveFactoryBase<double> > &W_factory
175 void setNominalValues(
const ModelEvaluatorBase::InArgs<double>& nominalValues );
212 RCP<LinearOpWithSolveFactoryBase<double> > *W_factory = NULL
216 const ModelEvaluatorBase::InArgs<double>&
getFinalPoint()
const;
279 ModelEvaluatorBase::InArgs<double>
createInArgs()
const;
282 const ModelEvaluatorBase::InArgs<double> &finalPoint
283 ,
const bool wasSolved
309 const ModelEvaluatorBase::InArgs<double> &inArgs,
310 const ModelEvaluatorBase::OutArgs<double> &outArgs
380 const EpetraExt::ModelEvaluator::InArgs &epetraInArgs,
381 ModelEvaluatorBase::InArgs<double> *inArgs
386 const ModelEvaluatorBase::InArgs<double> &inArgs,
387 EpetraExt::ModelEvaluator::InArgs *epetraInArgs
393 const ModelEvaluatorBase::OutArgs<double> &outArgs,
395 EpetraExt::ModelEvaluator::OutArgs *epetraUnscaledOutArgs,
397 RCP<LinearOpBase<double> > *W_op,
405 EpetraExt::ModelEvaluator::InArgs *epetraInArgs,
406 EpetraExt::ModelEvaluator::OutArgs *epetraUnscaledOutArgs,
413 const EpetraExt::ModelEvaluator::OutArgs &epetraUnscaledOutArgs,
420 const EpetraExt::ModelEvaluator::OutArgs &epetraOutArgs,
421 RCP<LinearOpBase<double> > &W_op,
424 const ModelEvaluatorBase::OutArgs<double> &outArgs
451 epetraModelEvaluator(
453 const RCP<LinearOpWithSolveFactoryBase<double> > &W_factory
460 ModelEvaluatorBase::EDerivativeMultiVectorOrientation
461 convert(
const EpetraExt::ModelEvaluator::EDerivativeMultiVectorOrientation &mvOrientation );
467 EpetraExt::ModelEvaluator::EDerivativeMultiVectorOrientation
468 convert(
const ModelEvaluatorBase::EDerivativeMultiVectorOrientation &mvOrientation );
474 ModelEvaluatorBase::DerivativeProperties
475 convert(
const EpetraExt::ModelEvaluator::DerivativeProperties &derivativeProperties );
481 ModelEvaluatorBase::DerivativeSupport
482 convert(
const EpetraExt::ModelEvaluator::DerivativeSupport &derivativeSupport );
488 EpetraExt::ModelEvaluator::Derivative
490 const ModelEvaluatorBase::Derivative<double> &derivative,
495 EpetraExt::ModelEvaluator::MPDerivative
497 const ModelEvaluatorBase::MPDerivative &derivative,
505 #endif // THYRA_EPETRA_MODEL_EVALUATOR_HPP
507 #if defined(Thyra_SHOW_DEPRECATED_WARNINGS)
509 #warning "The ThyraEpetraExtAdapters package is deprecated"
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_