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"
18 #include "Teuchos_Array.hpp"
283 ,
const bool wasSolved
290 enum EStateFunctionScaling { STATE_FUNC_SCALING_NONE, STATE_FUNC_SCALING_ROW_SUM };
322 typedef std::vector<bool> p_map_is_local_t;
323 typedef std::vector<bool> g_map_is_local_t;
342 p_map_is_local_t p_map_is_local_;
343 p_map_is_local_t g_map_is_local_;
354 mutable bool nominalValuesAndBoundsAreUpdated_;
358 EStateFunctionScaling stateFunctionScaling_;
363 mutable EpetraExt::ModelEvaluator::InArgs epetraInArgsScaling_;
364 mutable EpetraExt::ModelEvaluator::OutArgs epetraOutArgsScaling_;
371 mutable bool currentInArgsOutArgs_;
373 bool finalPointWasSolved_;
379 void convertInArgsFromEpetraToThyra(
380 const EpetraExt::ModelEvaluator::InArgs &epetraInArgs,
385 void convertInArgsFromThyraToEpetra(
387 EpetraExt::ModelEvaluator::InArgs *epetraInArgs
391 void convertOutArgsFromThyraToEpetra(
395 EpetraExt::ModelEvaluator::OutArgs *epetraUnscaledOutArgs,
404 void preEvalScalingSetup(
405 EpetraExt::ModelEvaluator::InArgs *epetraInArgs,
406 EpetraExt::ModelEvaluator::OutArgs *epetraUnscaledOutArgs,
412 void postEvalScalingSetup(
413 const EpetraExt::ModelEvaluator::OutArgs &epetraUnscaledOutArgs,
419 void finishConvertingOutArgsFromEpetraToThyra(
420 const EpetraExt::ModelEvaluator::OutArgs &epetraOutArgs,
431 void updateNominalValuesAndBounds()
const;
434 void updateInArgsOutArgs()
const;
451 epetraModelEvaluator(
461 convert(
const EpetraExt::ModelEvaluator::EDerivativeMultiVectorOrientation &mvOrientation );
467 EpetraExt::ModelEvaluator::EDerivativeMultiVectorOrientation
475 convert(
const EpetraExt::ModelEvaluator::DerivativeProperties &derivativeProperties );
482 convert(
const EpetraExt::ModelEvaluator::DerivativeSupport &derivativeSupport );
488 EpetraExt::ModelEvaluator::Derivative
495 EpetraExt::ModelEvaluator::MPDerivative
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.
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()