DOLFIN-X
DOLFIN-X C++ interface
|
10 #include "PETScOperator.h"
18 class SparsityPattern;
19 class VectorSpaceBasis;
37 explicit PETScMatrix(Mat A,
bool inc_ref_count =
true);
71 void set(
const PetscScalar* block, std::size_t m,
const PetscInt* rows,
72 std::size_t n,
const PetscInt* cols);
75 void add_local(
const PetscScalar* block, std::size_t m,
const PetscInt* rows,
76 std::size_t n,
const PetscInt* cols);
Norm
Norm types.
Definition: utils.h:34
PETScMatrix(MPI_Comm comm, const SparsityPattern &sparsity_pattern)
Create holder of a PETSc Mat object from a sparsity pattern.
Definition: PETScMatrix.cpp:23
Linear algebra interface.
Definition: DiscreteOperators.h:19
void apply(AssemblyType type)
Finalize assembly of tensor. The following values are recognized for the mode parameter:
Definition: PETScMatrix.cpp:85
This class provides a sparsity pattern data structure that can be used to initialize sparse matrices.
Definition: SparsityPattern.h:36
void add_local(const PetscScalar *block, std::size_t m, const PetscInt *rows, std::size_t n, const PetscInt *cols)
Add block of values using local indices.
Definition: PETScMatrix.cpp:45
void set_options_prefix(std::string options_prefix)
Sets the prefix used by PETSc when searching the options database.
Definition: PETScMatrix.cpp:104
PETScMatrix & operator=(const PETScMatrix &A)=delete
Assignment operator (deleted)
~PETScMatrix()=default
Destructor.
void set_nullspace(const la::VectorSpaceBasis &nullspace)
Attach nullspace to matrix (typically used by Krylov solvers when solving singular systems)
Definition: PETScMatrix.cpp:124
void set_from_options()
Call PETSc function MatSetFromOptions on the PETSc Mat object.
Definition: PETScMatrix.cpp:118
void set(const PetscScalar *block, std::size_t m, const PetscInt *rows, std::size_t n, const PetscInt *cols)
Set block of values using global indices.
Definition: PETScMatrix.cpp:35
It is a simple wrapper for a PETSc matrix pointer (Mat). Its main purpose is to assist memory managem...
Definition: PETScMatrix.h:27
void set_near_nullspace(const la::VectorSpaceBasis &nullspace)
Attach 'near' nullspace to matrix (used by preconditioners, such as smoothed aggregation algerbraic m...
Definition: PETScMatrix.cpp:145
This class defines a basis for vector spaces, typically used for expressing nullspaces of singular op...
Definition: VectorSpaceBasis.h:21
This class is a base class for matrices that can be used in PETScKrylovSolver.
Definition: PETScOperator.h:22
std::string get_options_prefix() const
Returns the prefix used by PETSc when searching the options database.
Definition: PETScMatrix.cpp:110
AssemblyType
Assembly type FINAL - corresponds to PETSc MAT_FINAL_ASSEMBLY FLUSH - corresponds to PETSc MAT_FLUSH_...
Definition: PETScMatrix.h:57
double norm(la::Norm norm_type) const
Return norm of matrix.
Definition: PETScMatrix.cpp:56