#include <NOX_Multiphysics_Group.H>
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::Group & | operator= (const NOX::Abstract::Group &source) |
Copies the source group into this group. | |
virtual NOX::Abstract::Group & | operator= (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 |
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.
Definition at line 80 of file NOX_Multiphysics_Group.H.
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.
Definition at line 41 of file NOX_Multiphysics_Group.C.
References getX(), and resetIsValid().
NOX::Multiphysics::Group::Group | ( | const Group & | grp, | |
NOX::CopyType | typ | |||
) |
Constructor.
Definition at line 60 of file NOX_Multiphysics_Group.C.
References NOX::DeepCopy, normRHS, resetIsValid(), and NOX::ShapeCopy.
NOX::Multiphysics::Group::~Group | ( | ) | [virtual] |
Destructor.
Reimplemented from NOX::Abstract::Group.
Definition at line 81 of file NOX_Multiphysics_Group.C.
NOX::Abstract::Group & NOX::Multiphysics::Group::operator= | ( | const NOX::Abstract::Group & | source | ) | [virtual] |
Copies the source group into this group.
Implements NOX::Abstract::Group.
Definition at line 93 of file NOX_Multiphysics_Group.C.
void NOX::Multiphysics::Group::setX | ( | const NOX::Abstract::Vector & | y | ) | [virtual] |
Set the solution vector x to y.
Throw an error if the copy fails.
Implements NOX::Abstract::Group.
Definition at line 105 of file NOX_Multiphysics_Group.C.
References resetIsValid().
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 denote this group's solution vector. Let
denote the result of grp.getX(). Then set
Throw an error if the copy fails.
Implements NOX::Abstract::Group.
Definition at line 111 of file NOX_Multiphysics_Group.C.
References resetIsValid().
NOX::Abstract::Group::ReturnType NOX::Multiphysics::Group::computeF | ( | ) | [virtual] |
Compute and store F(x).
Implements NOX::Abstract::Group.
Definition at line 118 of file NOX_Multiphysics_Group.C.
References normRHS, NOX::Abstract::Group::Ok, and solversVecPtr.
bool NOX::Multiphysics::Group::isF | ( | ) | const [virtual] |
Return true if F is valid.
Implements NOX::Abstract::Group.
Definition at line 143 of file NOX_Multiphysics_Group.C.
Referenced by getNormF().
const NOX::Abstract::Vector & NOX::Multiphysics::Group::getX | ( | ) | const [virtual] |
Return solution vector.
Implements NOX::Abstract::Group.
Definition at line 149 of file NOX_Multiphysics_Group.C.
References solversVecPtr.
Referenced by Group().
const NOX::Abstract::Vector & NOX::Multiphysics::Group::getF | ( | ) | const [virtual] |
Return F(x).
Implements NOX::Abstract::Group.
Definition at line 155 of file NOX_Multiphysics_Group.C.
References solversVecPtr.
double NOX::Multiphysics::Group::getNormF | ( | ) | const [virtual] |
Return 2-norm of F(x).
In other words,
Implements NOX::Abstract::Group.
Definition at line 173 of file NOX_Multiphysics_Group.C.
const NOX::Abstract::Vector & NOX::Multiphysics::Group::getGradient | ( | ) | const [virtual] |
Return gradient.
Implements NOX::Abstract::Group.
Definition at line 161 of file NOX_Multiphysics_Group.C.
References solversVecPtr.
const NOX::Abstract::Vector & NOX::Multiphysics::Group::getNewton | ( | ) | const [virtual] |
Return Newton direction.
Implements NOX::Abstract::Group.
Definition at line 167 of file NOX_Multiphysics_Group.C.
References solversVecPtr.
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.
Implements NOX::Abstract::Group.
Definition at line 185 of file NOX_Multiphysics_Group.C.
void NOX::Multiphysics::Group::resetIsValid | ( | ) | [protected, virtual] |
resets the isValid flags to false
Definition at line 86 of file NOX_Multiphysics_Group.C.
Referenced by computeX(), Group(), and setX().
Teuchos::RCP<vector<Teuchos::RCP<NOX::Solver::Generic> > > NOX::Multiphysics::Group::solversVecPtr [protected] |
Pointer to the container of solvers for each problem to be coupled.
Definition at line 227 of file NOX_Multiphysics_Group.H.
Referenced by computeF(), getF(), getGradient(), getNewton(), and getX().
double NOX::Multiphysics::Group::normRHS [protected] |
2-Norm of RHS
Definition at line 237 of file NOX_Multiphysics_Group.H.
Referenced by computeF(), getNormF(), and Group().