Go to the documentation of this file.
20 #ifndef LIBMESH_SHELL_MATRIX_H
21 #define LIBMESH_SHELL_MATRIX_H
25 #include "libmesh/libmesh_common.h"
26 #include "libmesh/reference_counted_object.h"
27 #include "libmesh/libmesh.h"
28 #include "libmesh/id_types.h"
29 #include "libmesh/parallel_object.h"
30 #include "libmesh/dof_map.h"
31 #include "libmesh/enum_solver_package.h"
32 #include "libmesh/auto_ptr.h"
33 #include "libmesh/parallel.h"
39 template <
typename T>
class NumericVector;
51 class ShellMatrix :
public ReferenceCountedObject<ShellMatrix<T>>,
58 ShellMatrix (
const Parallel::Communicator & comm_in);
64 static std::unique_ptr<ShellMatrix<T>>
65 build(
const Parallel::Communicator &
comm,
90 const NumericVector<T> & arg)
const = 0;
96 const NumericVector<T> & arg)
const = 0;
101 virtual void get_diagonal (NumericVector<T> & dest)
const = 0;
110 virtual void clear () { libmesh_error_msg (
"Not implemented yet"); }
112 virtual void init () { libmesh_error_msg (
"Not implemented yet"); }
125 template <
typename T>
133 template <
typename T>
142 #endif // LIBMESH_SHELL_MATRIX_H
Generic shell matrix, i.e.
SolverPackage
Defines an enum for various linear solver packages.
ShellMatrix(const Parallel::Communicator &comm_in)
Constructor; does nothing.
virtual void get_diagonal(NumericVector< T > &dest) const =0
Copies the diagonal part of the matrix into dest.
The libMesh namespace provides an interface to certain functionality in the library.
virtual numeric_index_type n() const =0
const Parallel::Communicator & comm() const
SolverPackage default_solver_package()
virtual void vector_mult(NumericVector< T > &dest, const NumericVector< T > &arg) const =0
Multiplies the matrix with arg and stores the result in dest.
const DofMap * _dof_map
The DofMap object associated with this object.
void attach_dof_map(const DofMap &dof_map)
Get a pointer to the DofMap to use.
virtual ~ShellMatrix()
Destructor.
dof_id_type numeric_index_type
This class handles the numbering of degrees of freedom on a mesh.
static std::unique_ptr< ShellMatrix< T > > build(const Parallel::Communicator &comm, const SolverPackage solver_package=libMesh::default_solver_package())
Builds a ShellMatrix<T> using the linear solver package specified by solver_package.
virtual void vector_mult_add(NumericVector< T > &dest, const NumericVector< T > &arg) const =0
Multiplies the matrix with arg and adds the result to dest.
An object whose state is distributed along a set of processors.
virtual numeric_index_type m() const =0