NOX  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Attributes | List of all members
LOCA::Epetra::ModelEvaluatorInterface Class Reference

Wrapper for an EpetraExt::ModelEvaluator. More...

#include <LOCA_Epetra_ModelEvaluatorInterface.H>

Inheritance diagram for LOCA::Epetra::ModelEvaluatorInterface:
Inheritance graph
[legend]
Collaboration diagram for LOCA::Epetra::ModelEvaluatorInterface:
Collaboration graph
[legend]

Public Member Functions

 ModelEvaluatorInterface (const Teuchos::RCP< LOCA::GlobalData > &global_data, const Teuchos::RCP< EpetraExt::ModelEvaluator > &m, double perturb=1.0e-6)
 Constructor.
 
virtual ~ModelEvaluatorInterface ()
 Destructor.
 
const ParameterVectorgetLOCAParameterVector () 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. More...
 
virtual bool computeShiftedMatrix (double alpha, double beta, const Epetra_Vector &x, Epetra_Operator &A)
 Call user routine for computing the shifted matrix $\alpha J + \beta M$ where $ J$ is the Jacobian matrix and $ M$ 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. More...
 
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< DerivUtilsclone (NOX::CopyType type=NOX::DeepCopy) const
 Clone.
 
virtual
NOX::Abstract::Group::ReturnType 
computeDfDp (LOCA::MultiContinuation::AbstractGroup &grp, const std::vector< int > &param_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. More...
 
- Public Member Functions inherited from LOCA::Epetra::Interface::TimeDependent
 TimeDependent ()
 Constructor.
 
virtual ~TimeDependent ()
 Destructor.
 
- Public Member Functions inherited from LOCA::Epetra::Interface::Required
 Required ()
 Constructor.
 
virtual ~Required ()
 Destructor.
 
virtual void dataForPrintSolution (const int, const int, const int)
 Provides data to application for output files. More...
 
virtual void setMultiPointParameter (const int)
 Set multipoint parameter in the user's application. More...
 
virtual void preProcessContinuationStep (LOCA::Abstract::Iterator::StepStatus, LOCA::Epetra::Group &)
 Perform any preprocessing before a continuation step starts. More...
 
virtual void projectToDraw (const NOX::Epetra::Vector &x, double *px) const
 Projects solution to a few scalars for multiparameter continuation. More...
 
virtual int projectToDrawDimension () const
 Returns the dimension of the projection to draw array.
 
- Public Member Functions inherited from NOX::Epetra::Interface::Required
 Required ()
 Constructor.
 
- Public Member Functions inherited from LOCA::DerivUtils
 DerivUtils (const Teuchos::RCP< LOCA::GlobalData > &global_data, double perturb=1.0e-6)
 Default constructor. perturb is the relative perturbation size used in differencing calculations.
 
 DerivUtils (const DerivUtils &)
 Copy constructor.
 
virtual ~DerivUtils ()
 Destructor.
 
virtual
NOX::Abstract::Group::ReturnType 
computeDJnDp (LOCA::MultiContinuation::AbstractGroup &, const std::vector< int > &paramIDs, const NOX::Abstract::Vector &nullVector, NOX::Abstract::MultiVector &result, bool isValid) const
 Compute derivative of Jn with respect to particular parameter param_id.
 
virtual
NOX::Abstract::Group::ReturnType 
computeDJnDxa (LOCA::MultiContinuation::AbstractGroup &grp, const NOX::Abstract::Vector &nullVector, const NOX::Abstract::MultiVector &aVector, NOX::Abstract::MultiVector &result) const
 Compute vector (Jn)_{x}a given multi-vector a.
 
virtual
NOX::Abstract::Group::ReturnType 
computeDJnDxa (LOCA::MultiContinuation::AbstractGroup &grp, const NOX::Abstract::Vector &nullVector, const NOX::Abstract::MultiVector &aVector, const NOX::Abstract::Vector &JnVector, NOX::Abstract::MultiVector &result) const
 Compute vector (Jn)_{x}a given multi-vector a, given JnVector.
 
virtual
NOX::Abstract::Group::ReturnType 
computeDwtJnDp (LOCA::MultiContinuation::AbstractGroup &grp, const std::vector< int > &paramIDs, const NOX::Abstract::Vector &w, const NOX::Abstract::Vector &nullVector, NOX::Abstract::MultiVector::DenseMatrix &result, bool isValid) const
 Compute derivative of w^TJn with respect to particular parameter param_id.
 
virtual
NOX::Abstract::Group::ReturnType 
computeDwtJDp (LOCA::MultiContinuation::AbstractGroup &grp, const std::vector< int > &paramIDs, const NOX::Abstract::Vector &w, NOX::Abstract::MultiVector &result, bool isValid) const
 Compute derivative of w^TJ with respect to particular parameter param_id.
 
virtual
NOX::Abstract::Group::ReturnType 
computeDwtJnDx (LOCA::MultiContinuation::AbstractGroup &grp, const NOX::Abstract::Vector &w, const NOX::Abstract::Vector &nullVector, NOX::Abstract::Vector &result) const
 Compute vector (w^TJn)_{x}.
 
virtual
NOX::Abstract::Group::ReturnType 
computeDwtJnDx (LOCA::MultiContinuation::AbstractGroup &grp, const NOX::Abstract::MultiVector &w, const NOX::Abstract::Vector &nullVector, NOX::Abstract::MultiVector &result) const
 Compute vector (w^TJn)_{x}.
 
virtual
NOX::Abstract::Group::ReturnType 
computeDCeDp (LOCA::Hopf::MooreSpence::AbstractGroup &grp, const std::vector< int > &paramIDs, const NOX::Abstract::Vector &yVector, const NOX::Abstract::Vector &zVector, double w, NOX::Abstract::MultiVector &result_real, NOX::Abstract::MultiVector &result_imag, bool isValid) const
 Compute derivative of (J+iwM)(y+iz) with respect to parameter,.
 
virtual
NOX::Abstract::Group::ReturnType 
computeDCeDxa (LOCA::Hopf::MooreSpence::AbstractGroup &grp, const NOX::Abstract::Vector &yVector, const NOX::Abstract::Vector &zVector, double w, const NOX::Abstract::MultiVector &aVector, NOX::Abstract::MultiVector &result_real, NOX::Abstract::MultiVector &result_imag) const
 Compute vector (J+iwM)(y+iz))_{x}a given a.
 
virtual
NOX::Abstract::Group::ReturnType 
computeDCeDxa (LOCA::Hopf::MooreSpence::AbstractGroup &grp, const NOX::Abstract::Vector &yVector, const NOX::Abstract::Vector &zVector, double w, const NOX::Abstract::MultiVector &aVector, const NOX::Abstract::Vector &Ce_real, const NOX::Abstract::Vector &Ce_imag, NOX::Abstract::MultiVector &result_real, NOX::Abstract::MultiVector &result_imag) const
 Compute vector (J+iwM)(y+iz))_{x}a given a and (J+iwM)(y+iz) vector.
 
virtual
NOX::Abstract::Group::ReturnType 
computeDwtCeDp (LOCA::Hopf::MinimallyAugmented::AbstractGroup &grp, const std::vector< int > &paramIDs, const NOX::Abstract::Vector &w1, const NOX::Abstract::Vector &w2, const NOX::Abstract::Vector &yVector, const NOX::Abstract::Vector &zVector, double omega, NOX::Abstract::MultiVector::DenseMatrix &result_real, NOX::Abstract::MultiVector::DenseMatrix &result_imag, bool isValid) const
 Compute derivative of (w1+iw2)^T(J+iwM)(y+iz) w.r.t. parameter p.
 
virtual
NOX::Abstract::Group::ReturnType 
computeDwtCeDx (LOCA::Hopf::MinimallyAugmented::AbstractGroup &grp, const NOX::Abstract::Vector &w1, const NOX::Abstract::Vector &w2, const NOX::Abstract::Vector &yVector, const NOX::Abstract::Vector &zVector, double omega, NOX::Abstract::Vector &result_real, NOX::Abstract::Vector &result_imag) const
 Compute vector (w1+iw2)^T(J+iwM)(y+iz))_{x}.
 

Protected Attributes

Epetra_Vector param_vec
 Parameter vector as an Epetra_Vector.
 
LOCA::ParameterVector loca_param_vec
 LOCA parameter vector.
 
Epetra_Vectorx_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().
 
- Protected Attributes inherited from LOCA::DerivUtils
Teuchos::RCP< LOCA::GlobalDataglobalData
 Global data.
 
double perturb
 Relative perturbation size using in differencing calculations.
 

Additional Inherited Members

- Public Types inherited from NOX::Epetra::Interface::Required
enum  FillType {
  Residual, Jac, Prec, FD_Res,
  MF_Res, MF_Jac, User
}
 Type of fill that a computeF() method is used for. More...
 
- Protected Member Functions inherited from LOCA::DerivUtils
virtual double perturbParam (LOCA::MultiContinuation::AbstractGroup &grp, double &param, int param_id) const
 Perturb parameter param_id in the group's parameter vector, and return perturbation size.
 
virtual double perturbXVec (LOCA::MultiContinuation::AbstractGroup &grp, const NOX::Abstract::Vector &xVector, const NOX::Abstract::Vector &aVector) const
 Perturb group's solution vector in direction of aVector, and return perturbation size.
 
virtual double epsScalar (double p) const
 Return perturbation for finite differencing around given double variable.
 
virtual double epsVector (const NOX::Abstract::Vector &xVector, const NOX::Abstract::Vector &aVector) const
 Return perturbation for directional derivatives around first vector in direction of second vector.
 

Detailed Description

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.

Member Function Documentation

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 ,
const double   
)
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.


The documentation for this class was generated from the following files: