00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #ifndef LOCA_EPETRA_MODEL_EVALUATOR_INTERFACE_H
00043 #define LOCA_EPETRA_MODEL_EVALUATOR_INTERFACE_H
00044
00045 #include "NOX_Epetra_ModelEvaluatorInterface.H"
00046 #include "LOCA_Epetra_Interface_TimeDependent.H"
00047 #include "LOCA_DerivUtils.H"
00048 #include "LOCA_Parameter_Vector.H"
00049 #include "Epetra_LocalMap.h"
00050 #include "Epetra_Vector.h"
00051
00052 namespace LOCA {
00053 namespace Epetra {
00054
00063 class ModelEvaluatorInterface :
00064 public LOCA::Epetra::Interface::TimeDependent,
00065 public NOX::Epetra::ModelEvaluatorInterface,
00066 public LOCA::DerivUtils {
00067
00068 public:
00069
00071 ModelEvaluatorInterface(
00072 const Teuchos::RCP<LOCA::GlobalData>& global_data,
00073 const Teuchos::RefCountPtr<EpetraExt::ModelEvaluator>& m,
00074 double perturb = 1.0e-6);
00075
00077 virtual ~ModelEvaluatorInterface();
00078
00080 const ParameterVector& getLOCAParameterVector() const;
00081
00082 virtual bool computeF(const Epetra_Vector& x, Epetra_Vector& F,
00083 const FillType fillFlag);
00084
00085 virtual bool computeJacobian(const Epetra_Vector& x, Epetra_Operator& Jac);
00086
00087 virtual bool computePreconditioner(const Epetra_Vector& x,
00088 Epetra_Operator& M,
00089 Teuchos::ParameterList* precParams = 0);
00090
00091 virtual void setParameters(const ParameterVector& p);
00092
00093 virtual bool computeShiftedMatrix(double alpha, double beta,
00094 const Epetra_Vector& x,
00095 Epetra_Operator& A);
00096
00097
00098
00100 ModelEvaluatorInterface(const ModelEvaluatorInterface&);
00101
00103 virtual Teuchos::RCP<DerivUtils>
00104 clone(NOX::CopyType type = NOX::DeepCopy) const;
00105
00110 virtual NOX::Abstract::Group::ReturnType
00111 computeDfDp(LOCA::MultiContinuation::AbstractGroup& grp,
00112 const vector<int>& param_ids,
00113 NOX::Abstract::MultiVector& result,
00114 bool isValidF) const;
00115
00116
00117 protected:
00118
00120 Epetra_Vector param_vec;
00121
00123 LOCA::ParameterVector loca_param_vec;
00124
00126 mutable Epetra_Vector *x_dot;
00127
00128 };
00129
00130 }
00131
00132 }
00133
00134 #endif