Go to the documentation of this file.
20 #ifndef LIBMESH_LASPACK_MATRIX_H
21 #define LIBMESH_LASPACK_MATRIX_H
23 #include "libmesh/libmesh_config.h"
25 #ifdef LIBMESH_HAVE_LASPACK
28 #include "libmesh/sparse_matrix.h"
41 template <
typename T>
class DenseMatrix;
104 virtual void init ()
override;
106 virtual void clear ()
override;
108 virtual void zero ()
override;
110 virtual void close ()
override;
122 const T
value)
override;
126 const T
value)
override;
129 const std::vector<numeric_index_type> & rows,
130 const std::vector<numeric_index_type> & cols)
override;
133 const std::vector<numeric_index_type> & dof_indices)
override;
147 virtual Real l1_norm ()
const override { libmesh_not_implemented();
return 0.; }
176 std::vector<numeric_index_type>
_csr;
182 std::vector<std::vector<numeric_index_type>::const_iterator>
_row_start;
198 #endif // #ifdef LIBMESH_HAVE_LASPACK
199 #endif // #ifdef LIBMESH_LASPACK_MATRIX_H
LaspackMatrix(const Parallel::Communicator &comm)
Constructor; initializes the matrix to be empty, without any structure, i.e.
LaspackMatrix & operator=(const LaspackMatrix &)=delete
The libMesh namespace provides an interface to certain functionality in the library.
std::vector< std::vector< numeric_index_type >::const_iterator > _row_start
The start of each row in the compressed row index data structure.
const Parallel::Communicator & comm() const
Defines a dense matrix for use in Finite Element-type computations.
virtual void set(const numeric_index_type i, const numeric_index_type j, const T value) override
Set the element (i,j) to value.
virtual void update_sparsity_pattern(const SparsityPattern::Graph &) override
Updates the matrix sparsity pattern.
Provides a uniform interface to vector storage schemes for different linear algebra libraries.
virtual void clear() override
Restores the SparseMatrix<T> to a pristine state.
virtual 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.
numeric_index_type pos(const numeric_index_type i, const numeric_index_type j) const
This class provides a nice interface to the Laspack C-based data structures for serial vectors.
virtual T operator()(const numeric_index_type i, const numeric_index_type j) const override
virtual void get_transpose(SparseMatrix< T > &dest) const override
Copies the transpose of the matrix into dest, which may be *this.
virtual void add(const numeric_index_type i, const numeric_index_type j, const T value) override
Add value to the element (i,j).
virtual void close() override
Calls the SparseMatrix's internal assembly routines, ensuring that the values are consistent across p...
The LaspackMatrix class wraps a QMatrix object from the Laspack library.
virtual void zero() override
Set all entries to 0.
dof_id_type numeric_index_type
virtual Real linfty_norm() const override
virtual bool closed() const override
virtual numeric_index_type row_start() const override
virtual void get_diagonal(NumericVector< T > &dest) const override
Copies the diagonal part of the matrix into dest.
virtual Real l1_norm() const override
virtual void init() override
Initialize this matrix using the sparsity structure computed by dof_map.
QMatrix _QMat
The Laspack sparse matrix pointer.
This class provides an interface to Laspack iterative solvers that is compatible with the libMesh Lin...
virtual numeric_index_type m() const override
std::vector< numeric_index_type > _csr
The compressed row indices.
virtual 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.
bool _closed
Flag indicating if the matrix has been closed yet.
virtual numeric_index_type row_stop() const override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void print(std::ostream &os=libMesh::out, const bool sparse=false) const
Print the contents of the matrix to the screen in a uniform style, regardless of matrix/solver packag...
virtual numeric_index_type n() const override
virtual bool need_full_sparsity_pattern() const override
The LaspackMatrix needs the full sparsity pattern.