18 #ifndef LIBMESH_PETSC_MFFD_MATRIX_H 19 #define LIBMESH_PETSC_MFFD_MATRIX_H 21 #include "libmesh/libmesh_config.h" 23 #ifdef LIBMESH_HAVE_PETSC 25 #include "libmesh/petsc_matrix_base.h" 69 virtual void zero()
override;
70 virtual std::unique_ptr<SparseMatrix<T>>
zero_clone()
const override;
71 virtual std::unique_ptr<SparseMatrix<T>>
clone()
const override;
75 const std::vector<numeric_index_type> & rows,
76 const std::vector<numeric_index_type> & cols)
override;
78 const std::vector<numeric_index_type> & dof_indices)
override;
87 std::vector<numeric_index_type> & indices,
88 std::vector<T> & values)
const override;
103 template <
typename T>
111 template <
typename T>
124 template <
typename T>
131 template <
typename T>
138 template <
typename T>
145 template <
typename T>
146 std::unique_ptr<SparseMatrix<T>>
152 template <
typename T>
153 std::unique_ptr<SparseMatrix<T>>
156 libmesh_not_implemented();
159 template <
typename T>
166 template <
typename T>
173 template <
typename T>
176 const std::vector<numeric_index_type> &,
177 const std::vector<numeric_index_type> &)
182 template <
typename T>
189 template <
typename T>
196 template <
typename T>
203 template <
typename T>
210 template <
typename T>
217 template <
typename T>
224 template <
typename T>
231 template <
typename T>
238 template <
typename T>
241 std::vector<numeric_index_type> &,
242 std::vector<T> &)
const 249 #endif // LIBMESH_HAVE_PETSC 250 #endif // LIBMESH_SPARSE_SHELL_MATRIX_H 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.
This class provides a nice interface to the PETSc C-based data structures for parallel, sparse matrices.
virtual numeric_index_type m() const override
virtual void get_diagonal(NumericVector< T > &dest) const override
Copies the diagonal part of the matrix into dest.
Provides a uniform interface to vector storage schemes for different linear algebra libraries...
virtual void zero() override
Set all entries to 0.
The libMesh namespace provides an interface to certain functionality in the library.
virtual Real l1_norm() const override
auto l1_norm(const NumericVector< T > &vec)
dof_id_type numeric_index_type
void init(triangulateio &t)
Initializes the fields of t to nullptr/0 as necessary.
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 std::unique_ptr< SparseMatrix< T > > zero_clone() const override
virtual Real linfty_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 void init(const numeric_index_type, const numeric_index_type, const numeric_index_type, const numeric_index_type, const numeric_index_type=30, const numeric_index_type=10, const numeric_index_type=1) override
Initialize SparseMatrix with the specified sizes.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void add(const numeric_index_type i, const numeric_index_type j, const T value) override
Add value to the element (i,j).
PetscMFFDMatrix & operator=(Mat m)
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 std::unique_ptr< SparseMatrix< T > > clone() const override
Defines a dense matrix for use in Finite Element-type computations.
PetscMFFDMatrix(Mat m, const Parallel::Communicator &comm_in)
Constructor.
ParallelType
Defines an enum for parallel data structure types.
This class allows to use a PETSc shell matrix as a PetscMatrix.