20#ifndef LIBMESH_SUM_SHELL_MATRIX_H
21#define LIBMESH_SUM_SHELL_MATRIX_H
24#include "libmesh/libmesh_common.h"
25#include "libmesh/reference_counted_object.h"
26#include "libmesh/libmesh.h"
27#include "libmesh/shell_matrix.h"
Provides a uniform interface to vector storage schemes for different linear algebra libraries.
Generic shell matrix, i.e.
This class combines any number of shell matrices to a single shell matrix by summing them together.
SumShellMatrix(const Parallel::Communicator &comm_in)
Constructor; initializes an empty sum.
virtual void vector_mult(NumericVector< T > &dest, const NumericVector< T > &arg) const override
Multiplies the matrix with arg and stores the result in dest.
std::vector< ShellMatrix< T > * > matrices
A vector of pointers to the summands.
virtual numeric_index_type n() const override
virtual void get_diagonal(NumericVector< T > &dest) const override
Copies the diagonal part of the matrix into dest.
virtual void vector_mult_add(NumericVector< T > &dest, const NumericVector< T > &arg) const override
Multiplies the matrix with arg and adds the result to dest.
virtual ~SumShellMatrix()
Destructor.
virtual numeric_index_type m() const override
The libMesh namespace provides an interface to certain functionality in the library.
dof_id_type numeric_index_type