Go to the documentation of this file.
18 #ifndef LIBMESH_DIAGONAL_MATRIX_H
19 #define LIBMESH_DIAGONAL_MATRIX_H
21 #include "libmesh/id_types.h"
22 #include "libmesh/sparse_matrix.h"
98 void clear()
override;
100 void zero()
override;
102 void close()
override;
117 const std::vector<numeric_index_type> & rows,
118 const std::vector<numeric_index_type> & cols)
override;
121 const std::vector<numeric_index_type> & dof_indices)
override;
131 bool closed()
const override;
139 void zero_rows(std::vector<numeric_index_type> & rows, T val = 0)
override;
149 #endif // LIBMESH_DIAGONAL_MATRIX_H
DiagonalMatrix(const Parallel::Communicator &comm)
Constructor; initializes the matrix to be empty, without any structure, i.e.
void zero_rows(std::vector< numeric_index_type > &rows, T val=0) override
Sets all row entries to 0 then puts diag_value in the diagonal entry.
numeric_index_type row_stop() const override
DiagonalMatrix & operator=(DiagonalMatrix &&)=default
The libMesh namespace provides an interface to certain functionality in the library.
const NumericVector< T > & diagonal() const
numeric_index_type m() const override
const Parallel::Communicator & comm() const
Defines a dense matrix for use in Finite Element-type computations.
void print_personal(std::ostream &os=libMesh::out) const override
Print the contents of the matrix to the screen in a package-personalized style, if available.
Diagonal matrix class whose underlying storage is a vector.
void set(const numeric_index_type i, const numeric_index_type j, const T value) override
Set the element (i,j) to value.
Provides a uniform interface to vector storage schemes for different linear algebra libraries.
bool closed() const override
void get_transpose(SparseMatrix< T > &dest) const override
Copies the transpose of the matrix into dest, which may be *this.
void get_diagonal(NumericVector< T > &dest) const override
Copies the diagonal part of the matrix into dest.
Real l1_norm() const override
Real linfty_norm() const override
numeric_index_type n() const override
dof_id_type numeric_index_type
void init() override
Initialize this matrix using the sparsity structure computed by dof_map.
std::unique_ptr< NumericVector< T > > _diagonal
Underlying diagonal matrix storage.
void zero() override
Set all entries to 0.
void close() override
Calls the SparseMatrix's internal assembly routines, ensuring that the values are consistent across p...
void add(const numeric_index_type i, const numeric_index_type j, const T value) override
Add value to the element (i,j).
T operator()(const numeric_index_type i, const numeric_index_type j) const override
void add_matrix(const DenseMatrix< T > &dm, const std::vector< numeric_index_type > &rows, const std::vector< numeric_index_type > &cols) override
Add the full matrix dm to the SparseMatrix.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
numeric_index_type row_start() const override
void clear() override
Restores the SparseMatrix<T> to a pristine state.