16 #ifndef dealii_diagonal_matrix_h 17 #define dealii_diagonal_matrix_h 20 #include <deal.II/lac/vector.h> 21 #include <deal.II/lac/vector_operation.h> 23 DEAL_II_NAMESPACE_OPEN
47 template <
typename VectorType = Vector<
double>>
51 using value_type =
typename VectorType::value_type;
52 using size_type =
typename VectorType::size_type;
64 reinit(
const VectorType &vec);
118 operator()(
const size_type i,
const size_type j)
const;
130 operator()(
const size_type i,
const size_type j);
143 template <
typename number2>
145 add(
const size_type row,
146 const size_type n_cols,
147 const size_type *col_indices,
148 const number2 * values,
149 const bool elide_zero_values =
true,
150 const bool col_indices_are_sorted =
false);
159 add(
const size_type i,
const size_type j,
const value_type value);
165 vmult(VectorType &dst,
const VectorType &src)
const;
173 Tvmult(VectorType &dst,
const VectorType &src)
const;
181 vmult_add(VectorType &dst,
const VectorType &src)
const;
189 Tvmult_add(VectorType &dst,
const VectorType &src)
const;
218 template <
typename VectorType>
227 template <
typename VectorType>
231 return diagonal.memory_consumption();
236 template <
typename VectorType>
245 template <
typename VectorType>
249 dst.reinit(diagonal);
254 template <
typename VectorType>
263 template <
typename VectorType>
272 template <
typename VectorType>
281 template <
typename VectorType>
282 typename VectorType::size_type
290 template <
typename VectorType>
291 typename VectorType::size_type
299 template <
typename VectorType>
300 typename VectorType::value_type
302 const size_type j)
const 311 template <
typename VectorType>
312 typename VectorType::value_type &
322 template <
typename VectorType>
323 template <
typename number2>
326 const size_type n_cols,
327 const size_type *col_indices,
328 const number2 * values,
332 for (size_type i = 0; i < n_cols; ++i)
333 if (col_indices[i] == row)
339 template <
typename VectorType>
343 const value_type value)
351 template <
typename VectorType>
361 template <
typename VectorType>
370 template <
typename VectorType>
373 const VectorType &src)
const 382 template <
typename VectorType>
385 const VectorType &src)
const 393 DEAL_II_NAMESPACE_CLOSE
std::size_t memory_consumption() const
VectorType & get_vector()
void Tvmult(VectorType &dst, const VectorType &src) const
void compress(VectorOperation::values operation)
static ::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
value_type operator()(const size_type i, const size_type j) const
void add(const size_type row, const size_type n_cols, const size_type *col_indices, const number2 *values, const bool elide_zero_values=true, const bool col_indices_are_sorted=false)
void vmult(VectorType &dst, const VectorType &src) const
#define Assert(cond, exc)
void initialize_dof_vector(VectorType &dst) const
void reinit(const VectorType &vec)
void vmult_add(VectorType &dst, const VectorType &src) const
void Tvmult_add(VectorType &dst, const VectorType &src) const