#include <NOX_Petsc_SharedJacobian.H>
Public Member Functions | |
SharedJacobian (Mat &j) | |
Constructor. | |
SharedJacobian (Mat &j, Mat &p) | |
Constructor with separate Matrices for the Jacobian and preconditioner. | |
~SharedJacobian () | |
Destructor. | |
Mat & | getJacobian (const Group *newowner) |
Get a reference to the Jacobian AND take ownership. | |
const Mat & | getJacobian () const |
Return a const pointer to the Jacobian. | |
bool | isOwner (const Group *grp) const |
Return true if grp is the owner of the Jacobian. | |
Mat & | getPrec (const Group *newowner) |
Get a reference to the Jacobian AND take ownership. | |
const Mat & | getPrec () const |
Return a const pointer to the Jacobian. | |
Protected Attributes | |
Mat * | jacobian |
Pointer to Petsc Jacobian matrix. | |
Mat * | prec |
Pointer to Petsc Preconditioning Matrix. | |
const Group * | owner |
Pointer to const group that owns Jacobian. |
Due to the size of the Jacobian, we cannot afford to have multiple copies. Instead we implement a shared Jacobian that all groups use.
NOTE: An additional matrix is included with the SharedJacobian in anticipation of having a separate Matrix for the Jacobian and the Preconditioner. This option will be available in the future.
Definition at line 63 of file NOX_Petsc_SharedJacobian.H.
SharedJacobian::SharedJacobian | ( | Mat & | j | ) |
SharedJacobian::SharedJacobian | ( | Mat & | j, | |
Mat & | p | |||
) |
Constructor with separate Matrices for the Jacobian and preconditioner.
Definition at line 52 of file NOX_Petsc_SharedJacobian.C.
SharedJacobian::~SharedJacobian | ( | ) |
Mat & SharedJacobian::getJacobian | ( | const Group * | newowner | ) |
Get a reference to the Jacobian AND take ownership.
Definition at line 62 of file NOX_Petsc_SharedJacobian.C.
References jacobian, and owner.
Referenced by NOX::Petsc::Group::applyRightPreconditioning(), NOX::Petsc::Group::computeGradient(), NOX::Petsc::Group::computeJacobian(), NOX::Petsc::Group::computeNewton(), NOX::Petsc::Group::Group(), and NOX::Petsc::Group::operator=().
const Mat & SharedJacobian::getJacobian | ( | ) | const |
Return a const pointer to the Jacobian.
Definition at line 68 of file NOX_Petsc_SharedJacobian.C.
References jacobian.
bool SharedJacobian::isOwner | ( | const Group * | grp | ) | const |
Return true if grp is the owner of the Jacobian.
Definition at line 73 of file NOX_Petsc_SharedJacobian.C.
References owner.
Referenced by NOX::Petsc::Group::isJacobian().
Mat & SharedJacobian::getPrec | ( | const Group * | newowner | ) |
Get a reference to the Jacobian AND take ownership.
Definition at line 78 of file NOX_Petsc_SharedJacobian.C.
const Mat & SharedJacobian::getPrec | ( | ) | const |
Return a const pointer to the Jacobian.
Definition at line 84 of file NOX_Petsc_SharedJacobian.C.
References prec.
Mat* NOX::Petsc::SharedJacobian::jacobian [protected] |
Pointer to Petsc Jacobian matrix.
Definition at line 94 of file NOX_Petsc_SharedJacobian.H.
Referenced by getJacobian(), and SharedJacobian().
Mat* NOX::Petsc::SharedJacobian::prec [protected] |
Pointer to Petsc Preconditioning Matrix.
Definition at line 97 of file NOX_Petsc_SharedJacobian.H.
Referenced by getPrec(), and SharedJacobian().
const Group* NOX::Petsc::SharedJacobian::owner [protected] |
Pointer to const group that owns Jacobian.
Definition at line 100 of file NOX_Petsc_SharedJacobian.H.
Referenced by getJacobian(), getPrec(), and isOwner().