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;
461convert(
const EpetraExt::ModelEvaluator::EDerivativeMultiVectorOrientation &mvOrientation );
467EpetraExt::ModelEvaluator::EDerivativeMultiVectorOrientation
475convert(
const EpetraExt::ModelEvaluator::DerivativeProperties &derivativeProperties );
482convert(
const EpetraExt::ModelEvaluator::DerivativeSupport &derivativeSupport );
488EpetraExt::ModelEvaluator::Derivative
495EpetraExt::ModelEvaluator::MPDerivative
507#if defined(Thyra_SHOW_DEPRECATED_WARNINGS)
509#warning "The ThyraEpetraExtAdapters package is deprecated"
Concrete Adapter subclass that takes an EpetraExt::ModelEvaluator object and wraps it as a Thyra::Mod...
RCP< Teuchos::ParameterList > unsetParameterList()
RCP< Teuchos::ParameterList > getNonconstParameterList()
bool finalPointWasSolved() const
void setStateFunctionScalingVec(const RCP< const Epetra_Vector > &stateFunctionScalingVec)
Set the state function scaling vector s_f (see above).
RCP< const Epetra_Vector > getStateFunctionScalingVec() const
Get the state function scaling vector s_f (see above).
std::string description() const
RCP< EpetraModelEvaluator > epetraModelEvaluator(const RCP< const EpetraExt::ModelEvaluator > &epetraModel, const RCP< LinearOpWithSolveFactoryBase< double > > &W_factory)
void initialize(const RCP< const EpetraExt::ModelEvaluator > &epetraModel, const RCP< LinearOpWithSolveFactoryBase< double > > &W_factory)
RCP< const VectorSpaceBase< double > > get_f_space() const
void setStateVariableScalingVec(const RCP< const Epetra_Vector > &stateVariableScalingVec)
Set the state variable scaling vector s_x (see above).
RCP< LinearOpBase< double > > create_W_op() const
ModelEvaluatorBase::InArgs< double > getUpperBounds() const
void setNominalValues(const ModelEvaluatorBase::InArgs< double > &nominalValues)
Set the nominal values.
RCP< PreconditionerBase< double > > create_W_prec() const
Returns null currently.
RCP< const LinearOpWithSolveFactoryBase< double > > get_W_factory() const
ModelEvaluatorBase::InArgs< double > getNominalValues() const
ModelEvaluatorBase::DerivativeSupport convert(const EpetraExt::ModelEvaluator::DerivativeSupport &derivativeSupport)
RCP< const Teuchos::ParameterList > getParameterList() const
void reportFinalPoint(const ModelEvaluatorBase::InArgs< double > &finalPoint, const bool wasSolved)
ModelEvaluatorBase::InArgs< double > createInArgs() const
void setParameterList(RCP< Teuchos::ParameterList > const ¶mList)
RCP< const VectorSpaceBase< double > > get_g_space(int j) const
RCP< const EpetraExt::ModelEvaluator > getEpetraModel() const
EpetraExt::ModelEvaluator::EDerivativeMultiVectorOrientation convert(const ModelEvaluatorBase::EDerivativeMultiVectorOrientation &mvOrientation)
void uninitialize(RCP< const EpetraExt::ModelEvaluator > *epetraModel=NULL, RCP< LinearOpWithSolveFactoryBase< double > > *W_factory=NULL)
RCP< const VectorSpaceBase< double > > get_x_space() const
RCP< const Epetra_Vector > getStateVariableInvScalingVec() const
Get the state variable scaling vector s_x (see above).
ModelEvaluatorBase::InArgs< double > getLowerBounds() const
EpetraExt::ModelEvaluator::Derivative convert(const ModelEvaluatorBase::Derivative< double > &derivative, const RCP< const Epetra_Map > &fnc_map, const RCP< const Epetra_Map > &var_map)
RCP< const Epetra_Vector > getStateVariableScalingVec() const
Get the inverse state variable scaling vector inv_s_x (see above).
RCP< const Teuchos::ParameterList > getValidParameters() const
Teuchos::ArrayView< const std::string > get_g_names(int j) const
ModelEvaluatorBase::DerivativeProperties convert(const EpetraExt::ModelEvaluator::DerivativeProperties &derivativeProperties)
RCP< const Teuchos::Array< std::string > > get_p_names(int l) const
RCP< const VectorSpaceBase< double > > get_p_space(int l) const
const ModelEvaluatorBase::InArgs< double > & getFinalPoint() const
ModelEvaluatorBase::EDerivativeMultiVectorOrientation convert(const EpetraExt::ModelEvaluator::EDerivativeMultiVectorOrientation &mvOrientation)
Base class for all linear operators.
Factory interface for creating LinearOpWithSolveBase objects from compatible LinearOpBase objects.
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...
Concrete aggregate class for all input arguments computable by a ModelEvaluator subclass object.
Simple aggregate class that stores a derivative object as a general linear operator or as a multi-vec...
Concrete aggregate class for all output arguments computable by a ModelEvaluator subclass object.
EDerivativeMultiVectorOrientation
Default base class for concrete model evaluators.
Simple public strict containing properties of a derivative object.