NOX::Multiphysics::Group Class Reference

NOX pure abstract interface to a "group"; i.e., a solution vector and the corresponding F-vector, Jacobian matrix, gradient vector, and Newton vector. More...

#include <NOX_Multiphysics_Group.H>

Inheritance diagram for NOX::Multiphysics::Group:
Inheritance graph
[legend]
Collaboration diagram for NOX::Multiphysics::Group:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Group (const Teuchos::RCP< vector< Teuchos::RCP< NOX::Solver::Generic > > > &solvers, const Teuchos::RCP< NOX::StatusTest::Generic > &t, const Teuchos::RCP< Teuchos::ParameterList > &p)
 Constructor.
 Group (const Group &grp, NOX::CopyType typ)
 Constructor.
virtual ~Group ()
 Destructor.
virtual NOX::Abstract::Groupoperator= (const NOX::Abstract::Group &source)
 Copies the source group into this group.
virtual NOX::Abstract::Groupoperator= (const NOX::Multiphysics::Group &source)

virtual void setX (const NOX::Abstract::Vector &y)
 Set the solution vector x to y.
virtual void computeX (const NOX::Abstract::Group &grp, const NOX::Abstract::Vector &d, double step)
 Compute x = grp.x + step * d.
virtual
NOX::Abstract::Group::ReturnType 
computeF ()
 Compute and store F(x).
"Is" functions.

Checks to see if various objects have been computed. Returns true if the corresponding "compute" function has been called since the last change to the solution vector.

virtual bool isF () const
 Return true if F is valid.
"Get" functions.

Note that these function do not check whether or not the vectors are valid. Must use the "Is" functions for that purpose.

virtual const
NOX::Abstract::Vector
getX () const
 Return solution vector.
virtual const
NOX::Abstract::Vector
getF () const
 Return F(x).
virtual double getNormF () const
 Return 2-norm of F(x).
virtual const
NOX::Abstract::Vector
getGradient () const
 Return gradient.
virtual const
NOX::Abstract::Vector
getNewton () const
 Return Newton direction.
virtual Teuchos::RCP
< NOX::Abstract::Group
clone (NOX::CopyType type=NOX::DeepCopy) const
 Create a new Group of the same derived type as this one by cloning this one, and return a ref count pointer to the new group.

Protected Member Functions

virtual void resetIsValid ()
 resets the isValid flags to false

Protected Attributes

Teuchos::RCP< vector
< Teuchos::RCP
< NOX::Solver::Generic > > > 
solversVecPtr
 Pointer to the container of solvers for each problem to be coupled.
IsValid flags

True if the current solution is up-to-date with respect to the currect xVector.

bool isValidRHS
double normRHS
 2-Norm of RHS

Detailed Description

NOX pure abstract interface to a "group"; i.e., a solution vector and the corresponding F-vector, Jacobian matrix, gradient vector, and Newton vector.

This class is a member of the namespace NOX::Abstract.

The user should implement their own concrete implementation of this class or use one of the implementations provided by us. Typically the implementation is also tied to a particular NOX::Abstract::Vector implementation.

Note:
The group may be implemented so that multiple groups can share underlying memory space. This is particularly important when it comes to the Jacobian, which is often to big to be replicated for every group. Thus, we have included instructions on how shared data should be treated for the operator=() and clone() functions.

Constructor & Destructor Documentation

NOX::Multiphysics::Group::Group ( const Teuchos::RCP< vector< Teuchos::RCP< NOX::Solver::Generic > > > &  solvers,
const Teuchos::RCP< NOX::StatusTest::Generic > &  t,
const Teuchos::RCP< Teuchos::ParameterList > &  p 
)

Constructor.

Note:
Constructors for any derived object should always define a default x-value so that getX() is always defined.

References getX(), and resetIsValid().


Member Function Documentation

Teuchos::RCP< NOX::Abstract::Group > NOX::Multiphysics::Group::clone ( NOX::CopyType  type = NOX::DeepCopy  )  const [virtual]

Create a new Group of the same derived type as this one by cloning this one, and return a ref count pointer to the new group.

If type is NOX::DeepCopy, then we need to create an exact replica of "this". Otherwise, if type is NOX::ShapeCopy, we need only replicate the shape of "this" (only the memory is allocated, the values are not copied into the vectors and Jacobian). Returns NULL if clone is not supported.

Note:
Any shared data should have its ownership transfered to this group from the source for a NOX::DeepCopy.

Implements NOX::Abstract::Group.

References Teuchos::rcp().

NOX::Abstract::Group::ReturnType NOX::Multiphysics::Group::computeF (  )  [virtual]

Compute and store F(x).

Note:
It's generally useful to also compute and store the 2-norm of F(x) at this point for later access by the getNormF() function.
Returns:

Implements NOX::Abstract::Group.

References normRHS, NOX::Abstract::Group::Ok, and solversVecPtr.

void NOX::Multiphysics::Group::computeX ( const NOX::Abstract::Group grp,
const NOX::Abstract::Vector d,
double  step 
) [virtual]

Compute x = grp.x + step * d.

Let $x$ denote this group's solution vector. Let $\hat x$ denote the result of grp.getX(). Then set

\[ x = \hat x + \mbox{step} \; d. \]

Note:
This should invalidate the function value, Jacobian, gradient, and Newton direction.
Throw an error if the copy fails.
Returns:
Reference to this object

Implements NOX::Abstract::Group.

References resetIsValid().

double NOX::Multiphysics::Group::getNormF (  )  const [virtual]

Return 2-norm of F(x).

In other words,

\[ \sqrt{\sum_{i=1}^n F_i^2} \]

Implements NOX::Abstract::Group.

References isF(), and normRHS.

NOX::Abstract::Group & NOX::Multiphysics::Group::operator= ( const NOX::Abstract::Group source  )  [virtual]

Copies the source group into this group.

Note:
Any shared data owned by the source should have its ownership transfered to this group. This may result in a secret modification to the source object.

Implements NOX::Abstract::Group.

void NOX::Multiphysics::Group::setX ( const NOX::Abstract::Vector y  )  [virtual]

Set the solution vector x to y.

Note:
This should invalidate the function value, Jacobian, gradient, and Newton direction.
Throw an error if the copy fails.
Returns:
Reference to this object

Implements NOX::Abstract::Group.

References resetIsValid().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Generated on Wed Apr 13 09:59:46 2011 for NOX by  doxygen 1.6.3