NOX Development
Loading...
Searching...
No Matches
NOX::Petsc::SharedJacobian Class Reference

Shared Jacobian for NOX::Petsc::Group objects. More...

#include <NOX_Petsc_SharedJacobian.H>

Collaboration diagram for NOX::Petsc::SharedJacobian:

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 Groupowner
 Pointer to const group that owns Jacobian.

Detailed Description

Shared Jacobian for NOX::Petsc::Group objects.

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.

Constructor & Destructor Documentation

◆ SharedJacobian() [1/2]

SharedJacobian::SharedJacobian ( Mat & j)

Constructor.

References jacobian, and owner.

◆ SharedJacobian() [2/2]

SharedJacobian::SharedJacobian ( Mat & j,
Mat & p )

Constructor with separate Matrices for the Jacobian and preconditioner.

References jacobian, and prec.

Member Function Documentation

◆ getJacobian() [1/2]

const Mat & SharedJacobian::getJacobian ( ) const

Return a const pointer to the Jacobian.

References jacobian.

◆ getJacobian() [2/2]

Mat & SharedJacobian::getJacobian ( const Group * newowner)

◆ getPrec() [1/2]

const Mat & SharedJacobian::getPrec ( ) const

Return a const pointer to the Jacobian.

References prec.

◆ getPrec() [2/2]

Mat & SharedJacobian::getPrec ( const Group * newowner)

Get a reference to the Jacobian AND take ownership.

References owner, and prec.

◆ isOwner()

bool SharedJacobian::isOwner ( const Group * grp) const

Return true if grp is the owner of the Jacobian.

References owner.

Referenced by NOX::Petsc::Group::isJacobian().

Member Data Documentation

◆ jacobian

Mat* NOX::Petsc::SharedJacobian::jacobian
protected

Pointer to Petsc Jacobian matrix.

Referenced by getJacobian(), getJacobian(), SharedJacobian(), and SharedJacobian().

◆ owner

const Group* NOX::Petsc::SharedJacobian::owner
protected

Pointer to const group that owns Jacobian.

Referenced by getJacobian(), getPrec(), isOwner(), and SharedJacobian().

◆ prec

Mat* NOX::Petsc::SharedJacobian::prec
protected

Pointer to Petsc Preconditioning Matrix.

Referenced by getPrec(), getPrec(), and SharedJacobian().


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