|
NOX
Development
|
Wrapper for an EpetraExt::ModelEvaluator. More...
#include <LOCA_Epetra_ModelEvaluatorInterface.H>


Public Member Functions | |
| ModelEvaluatorInterface (const Teuchos::RCP< LOCA::GlobalData > &global_data, const Teuchos::RefCountPtr< EpetraExt::ModelEvaluator > &m, double perturb=1.0e-6) | |
| Constructor. | |
| virtual | ~ModelEvaluatorInterface () |
| Destructor. | |
| const ParameterVector & | getLOCAParameterVector () const |
| Return LOCA parameter vector. | |
| virtual bool | computeF (const Epetra_Vector &x, Epetra_Vector &F, const FillType fillFlag) |
| Compute the function, F, given the specified input vector x. Returns true if computation was successful. | |
| virtual bool | computeJacobian (const Epetra_Vector &x, Epetra_Operator &Jac) |
| virtual bool | computePreconditioner (const Epetra_Vector &x, Epetra_Operator &M, Teuchos::ParameterList *precParams=0) |
| virtual void | setParameters (const ParameterVector &p) |
| Set parameters in the user's application. | |
| virtual bool | computeShiftedMatrix (double alpha, double beta, const Epetra_Vector &x, Epetra_Operator &A) |
Call user routine for computing the shifted matrix where is the Jacobian matrix and is the mass matrix. | |
| virtual void | setXdot (const Epetra_Vector &xdot, const double time) |
| Routine used in XYZT to set x_dot and time in the interface. | |
| virtual void | printSolution (const Epetra_Vector &x_, double conParam) |
| Call user's own print routine for vector-parameter pair. | |
| void | setObserver (const Teuchos::RCP< NOX::Epetra::Observer > &observer_) |
| ModelEvaluatorInterface (const ModelEvaluatorInterface &) | |
| Copy constructor. | |
| virtual Teuchos::RCP< DerivUtils > | clone (NOX::CopyType type=NOX::DeepCopy) const |
| Clone. | |
|
virtual NOX::Abstract::Group::ReturnType | computeDfDp (LOCA::MultiContinuation::AbstractGroup &grp, const std::vector< int > ¶m_ids, NOX::Abstract::MultiVector &result, bool isValidF) const |
| Compute derivative of f with respect to parameter, identified by param_id. | |
| void | postProcessContinuationStep (LOCA::Abstract::Iterator::StepStatus stepStatus, LOCA::Epetra::Group &group) |
| Perform any postprocessing after a continuation step finishes. | |
Protected Attributes | |
| Epetra_Vector | param_vec |
| Parameter vector as an Epetra_Vector. | |
| LOCA::ParameterVector | loca_param_vec |
| LOCA parameter vector. | |
| Epetra_Vector * | x_dot |
| Epetra vector storing x_dot, filled with zeros. | |
| double | alpha_prev |
| Stored values of alpha and beta parameters from previous call. | |
| double | beta_prev |
|
Teuchos::RCP < NOX::Epetra::Observer > | observer |
Observer for printSolution(). | |
Wrapper for an EpetraExt::ModelEvaluator.
If an application interfaces their code to solvers using the EpetraExt::ModelEvaluator, this class provides a wrapper so that the model evaluator can be used instead of having the user write concrete versions of the LOCA::Epetra::Interface objects.
| void LOCA::Epetra::ModelEvaluatorInterface::postProcessContinuationStep | ( | LOCA::Abstract::Iterator::StepStatus | stepStatus, |
| LOCA::Epetra::Group & | group | ||
| ) | [virtual] |
Perform any postprocessing after a continuation step finishes.
The stepStatus argument indicates whether the step was successful.
Reimplemented from LOCA::Epetra::Interface::Required.
References NOX::Epetra::Vector::getEpetraVector(), NOX::Epetra::Group::getX(), Teuchos::rcp(), and LOCA::Abstract::Iterator::Successful.
| void LOCA::Epetra::ModelEvaluatorInterface::setParameters | ( | const ParameterVector & | p | ) | [virtual] |
Set parameters in the user's application.
Should be called prior to calling one of the compute functions.
Implements LOCA::Epetra::Interface::Required.
References LOCA::ParameterVector::length().
| void LOCA::Epetra::ModelEvaluatorInterface::setXdot | ( | const Epetra_Vector & | xdot, |
| const double | time | ||
| ) | [virtual] |
Routine used in XYZT to set x_dot and time in the interface.
The computeF() routine for XYZT problems needs to be a function of x_dot, but th NOX/LOCA computeF() does not take x_dot as an argument. This is used to set x_dot in the application interface so the subsequent call to computeF has the correct x_dot value. The timeStep argument is sent so the use can set the global time, for cases when computeF, computeJacobian, computeMassMatrix fills are functions of time (nonautonomous systems).
Reimplemented from LOCA::Epetra::Interface::TimeDependent.
1.7.6.1