18#ifndef LIBMESH_PETSC_MATRIX_SHELL_MATRIX_H
19#define LIBMESH_PETSC_MATRIX_SHELL_MATRIX_H
21#include "libmesh/libmesh_config.h"
23#ifdef LIBMESH_HAVE_PETSC
25#include "libmesh/petsc_matrix_base.h"
26#include "libmesh/petsc_shell_matrix.h"
61 virtual void zero()
override;
62 virtual std::unique_ptr<SparseMatrix<T>>
zero_clone()
const override;
63 virtual std::unique_ptr<SparseMatrix<T>>
clone()
const override;
67 const std::vector<numeric_index_type> & rows,
68 const std::vector<numeric_index_type> & cols)
override;
70 const std::vector<numeric_index_type> & dof_indices)
override;
79 std::vector<numeric_index_type> & indices,
80 std::vector<T> & values)
const override;
Defines a dense matrix for use in Finite Element-type computations.
Provides a uniform interface to vector storage schemes for different linear algebra libraries.
This class provides a nice interface to the PETSc C-based data structures for parallel,...
virtual numeric_index_type n() const override
virtual numeric_index_type m() const override
This class allows to use a PETSc shell matrix as a PetscMatrix.
PetscMatrixShellMatrix(const Parallel::Communicator &comm_in)
virtual Real l1_norm() const override
virtual void get_transpose(SparseMatrix< T > &dest) const override
Copies the transpose of the matrix into dest, which may be *this.
virtual Real linfty_norm() const override
virtual std::unique_ptr< SparseMatrix< T > > zero_clone() const override
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 set(const numeric_index_type i, const numeric_index_type j, const T value) override
Set the element (i,j) to value.
virtual void init(const numeric_index_type m, const numeric_index_type n, const numeric_index_type m_l, const numeric_index_type n_l, const numeric_index_type=30, const numeric_index_type=10, const numeric_index_type blocksize=1) override
Initialize SparseMatrix with the specified sizes.
virtual SparseMatrix< T > & operator=(const SparseMatrix< T > &) override
This looks like a copy assignment operator, but note that, unlike normal copy assignment operators,...
virtual void init(ParallelType=PARALLEL) override
Initialize this matrix using the sparsity structure computed by dof_map.
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.
virtual void zero() override
Set all entries to 0.
virtual std::unique_ptr< SparseMatrix< T > > clone() const override
virtual T operator()(const numeric_index_type i, const numeric_index_type j) const override
virtual void get_row(numeric_index_type i, std::vector< numeric_index_type > &indices, std::vector< T > &values) const override
Get a row from the matrix.
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.
virtual bool require_sparsity_pattern() const override
virtual void get_diagonal(NumericVector< T > &dest) const override
Copies the diagonal part of the matrix into dest.
const bool _omit_constrained_dofs
Whether to omit constrained degrees of freedom.
bool _is_initialized
Flag indicating whether or not the matrix has been initialized.
The libMesh namespace provides an interface to certain functionality in the library.
ParallelType
Defines an enum for parallel data structure types.
dof_id_type numeric_index_type
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real