1#ifndef included_AMP_PetscMatrix
2#define included_AMP_PetscMatrix
4#include "AMP/matrices/Matrix.h"
5#include "AMP/vectors/petsc/PetscHelpers.h"
58 static std::shared_ptr<PetscMatrix>
view( std::shared_ptr<Matrix> AmpMatrix );
66 static std::shared_ptr<const PetscMatrix>
constView( std::shared_ptr<const Matrix> AmpMatrix );
PetscMatrix is a bridge between AMP::LinearAlgebra::Matrix and the PETSc Vec data structure.
std::shared_ptr< Matrix > getManagedMat()
static std::shared_ptr< const PetscMatrix > constView(std::shared_ptr< const Matrix > AmpMatrix)
If needed, create a PETSc wrapper for AmpMatrix. Otherwise, return AmpMatrix.
const Mat & getNativeMat() const
std::shared_ptr< Matrix > d_matrix
PetscMatrix()
Empty constructor.
PetscMatrix(std::shared_ptr< Matrix > mat)
Default constructor.
const Mat & getMat() const
Obtain PETSc Mat for use in PETSc routines.
static std::shared_ptr< PetscMatrix > view(std::shared_ptr< Matrix > AmpMatrix)
If needed, create a PETSc wrapper for AmpMatrix. Otherwise, return AmpMatrix.
std::shared_ptr< const Matrix > getManagedMat() const
virtual ~PetscMatrix()
Destructor.
Mat & getMat()
Obtain PETSc Mat for use in PETSc routines.