23 #ifndef __PETSC_BASE_MATRIX_H 24 #define __PETSC_BASE_MATRIX_H 35 #include <dolfin/common/types.h> 36 #include <dolfin/common/Variable.h> 37 #include "PETScObject.h" 38 #include "PETScVector.h" 66 std::size_t
size(std::size_t dim)
const;
70 std::pair<std::int64_t, std::int64_t>
size()
const;
73 std::pair<std::int64_t, std::int64_t>
local_range(std::size_t dim)
const;
93 virtual std::string
str(
bool verbose)
const 94 {
return "No str function for this PETSc matrix operator."; }
Mat mat() const
Return PETSc Mat pointer.
Definition: PETScBaseMatrix.h:86
Common base class for DOLFIN variables.
Definition: Variable.h:35
~PETScBaseMatrix()
Destructor.
Definition: PETScBaseMatrix.cpp:45
PETScBaseMatrix()
Constructor.
Definition: PETScBaseMatrix.h:54
Definition: PETScBaseMatrix.h:49
Definition: PETScObject.h:33
virtual std::string str(bool verbose) const
Return informal string representation (pretty-print)
Definition: PETScBaseMatrix.h:93
void init_vector(GenericVector &z, std::size_t dim) const
Definition: PETScBaseMatrix.cpp:106
MPI_Comm mpi_comm() const
Return the MPI communicator.
Definition: PETScBaseMatrix.cpp:141
std::pair< std::int64_t, std::int64_t > size() const
Definition: PETScBaseMatrix.cpp:79
This class defines a common interface for vectors.
Definition: GenericVector.h:47
std::pair< std::int64_t, std::int64_t > local_range(std::size_t dim) const
Return local range along dimension dim.
Definition: PETScBaseMatrix.cpp:89