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 std::unique_ptr< NumericVector< T > > zero_clone() const =0
Provides a uniform interface to vector storage schemes for different linear algebra libraries...
This class combines any number of shell matrices to a single shell matrix by summing them together...
The libMesh namespace provides an interface to certain functionality in the library.
virtual numeric_index_type n() const override
virtual void zero()=0
Set all entries to zero.
virtual numeric_index_type m() const override
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.
dof_id_type numeric_index_type
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
virtual void vector_mult(NumericVector< T > &dest, const NumericVector< T > &arg) const override
Multiplies the matrix with arg and stores the result in dest.
virtual void get_diagonal(NumericVector< T > &dest) const override
Copies the diagonal part of the matrix into dest.