Reference documentation for deal.II version 8.5.1
sparse_mic.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2002 - 2015 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE at
12 // the top level of the deal.II distribution.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii__sparse_mic_h
17 #define dealii__sparse_mic_h
18 
19 #include <deal.II/lac/sparse_matrix.h>
20 #include <deal.II/lac/sparse_decomposition.h>
21 
22 DEAL_II_NAMESPACE_OPEN
23 
46 template <typename number>
47 class SparseMIC : public SparseLUDecomposition<number>
48 {
49 public:
54 
59  SparseMIC ();
60 
64  virtual ~SparseMIC();
65 
70  virtual void clear();
71 
76  typedef
79 
97  template <typename somenumber>
98  void initialize (const SparseMatrix<somenumber> &matrix,
99  const AdditionalData &parameters = AdditionalData());
100 
107  template <typename somenumber>
108  void vmult (Vector<somenumber> &dst,
109  const Vector<somenumber> &src) const;
110 
120  template <typename somenumber>
121  void Tvmult (Vector<somenumber> &dst,
122  const Vector<somenumber> &src) const;
123 
128  std::size_t memory_consumption () const;
129 
143  double,
144  << "The strengthening parameter " << arg1
145  << " is not greater or equal than zero!");
150  << "The diagonal element (" <<arg1<<","<<arg1<<") is "
151  << arg2 <<", but must be positive");
152 
154 private:
158  std::vector<number> diag;
159 
163  std::vector<number> inv_diag;
164 
169  std::vector<number> inner_sums;
170 
174  number get_rowsum (const size_type row) const;
175 };
176 
179 DEAL_II_NAMESPACE_CLOSE
180 
181 #endif // dealii__
SparseMatrix< number >::size_type size_type
#define DeclException2(Exception2, type1, type2, outsequence)
Definition: exceptions.h:576
std::vector< number > inner_sums
Definition: sparse_mic.h:169
void vmult(Vector< somenumber > &dst, const Vector< somenumber > &src) const
static ::ExceptionBase & ExcDecompositionNotStable(int arg1, double arg2)
void Tvmult(Vector< somenumber > &dst, const Vector< somenumber > &src) const
void initialize(const SparseMatrix< somenumber > &matrix, const AdditionalData &parameters=AdditionalData())
std::vector< number > diag
Definition: sparse_mic.h:158
virtual ~SparseMIC()
number get_rowsum(const size_type row) const
#define DeclException1(Exception1, type1, outsequence)
Definition: exceptions.h:564
unsigned int global_dof_index
Definition: types.h:88
#define DeclException0(Exception0)
Definition: exceptions.h:541
std::vector< number > inv_diag
Definition: sparse_mic.h:163
types::global_dof_index size_type
Definition: sparse_mic.h:53
virtual void clear()
std::size_t memory_consumption() const
static ::ExceptionBase & ExcInvalidStrengthening(double arg1)
static ::ExceptionBase & ExcStrengthenDiagonalTooSmall()
SparseLUDecomposition< number >::AdditionalData AdditionalData
Definition: sparse_mic.h:78