Go to the documentation of this file.
21 #include "libmesh/sum_shell_matrix.h"
22 #include "libmesh/numeric_vector.h"
23 #include "libmesh/int_range.h"
35 libmesh_assert_equal_to (matrices[i]->m(), n_rows);
49 libmesh_assert_equal_to (matrices[i]->n(), n_cols);
61 this->vector_mult_add(dest,arg);
71 matrices[i]->vector_mult_add(dest, arg);
79 std::unique_ptr<NumericVector<T>> a = dest.
zero_clone();
82 matrices[i]->get_diagonal(*a);
virtual void zero()=0
Set all entries to zero.
virtual void vector_mult(NumericVector< T > &dest, const NumericVector< T > &arg) const override
Multiplies the matrix with arg and stores the result in dest.
IntRange< std::size_t > index_range(const std::vector< T > &vec)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
virtual void get_diagonal(NumericVector< T > &dest) const override
Copies the diagonal part of the matrix into dest.
The libMesh namespace provides an interface to certain functionality in the library.
Provides a uniform interface to vector storage schemes for different linear algebra libraries.
dof_id_type numeric_index_type
virtual numeric_index_type m() const override
This class combines any number of shell matrices to a single shell matrix by summing them together.
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 std::unique_ptr< NumericVector< T > > zero_clone() const =0
virtual numeric_index_type n() const override