Reference documentation for deal.II version 8.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
sparse_mic.h
1 // ---------------------------------------------------------------------
2 // @f$Id: sparse_mic.h 30036 2013-07-18 16:55:32Z maier @f$
3 //
4 // Copyright (C) 2002 - 2013 by the deal.II authors
5 //
6 // This file is part of the deal.II library.
7 //
8 // The deal.II library is free software; you can use it, redistribute
9 // it, and/or modify it under the terms of the GNU Lesser General
10 // Public License as published by the Free Software Foundation; either
11 // version 2.1 of the License, or (at your option) any later version.
12 // The full text of the license can be found in the file LICENSE at
13 // the top level of the deal.II distribution.
14 //
15 // ---------------------------------------------------------------------
16 
17 #ifndef __deal2__sparse_mic_h
18 #define __deal2__sparse_mic_h
19 
20 #include <deal.II/lac/sparse_matrix.h>
21 #include <deal.II/lac/sparse_decomposition.h>
22 
23 DEAL_II_NAMESPACE_OPEN
24 
46 template <typename number>
47 class SparseMIC : public SparseLUDecomposition<number>
48 {
49 public:
54 
60  SparseMIC ();
61 
69 
73  virtual ~SparseMIC();
74 
81  virtual void clear();
82 
89  typedef
92 
99  void reinit (const SparsityPattern &sparsity) DEAL_II_DEPRECATED;
100 
132  template <typename somenumber>
133  void initialize (const SparseMatrix<somenumber> &matrix,
134  const AdditionalData &parameters = AdditionalData());
135 
141  template <typename somenumber>
142  void decompose (const SparseMatrix<somenumber> &matrix,
143  const double strengthen_diagonal=0.) DEAL_II_DEPRECATED;
144 
153  template <typename somenumber>
154  void vmult (Vector<somenumber> &dst,
155  const Vector<somenumber> &src) const;
156 
162  std::size_t memory_consumption () const;
163 
170  DeclException0 (ExcStrengthenDiagonalTooSmall);
174  DeclException1 (ExcInvalidStrengthening,
175  double,
176  << "The strengthening parameter " << arg1
177  << " is not greater or equal than zero!");
181  DeclException2(ExcDecompositionNotStable, int, double,
182  << "The diagonal element (" <<arg1<<","<<arg1<<") is "
183  << arg2 <<", but must be positive");
184 
186 private:
191  std::vector<number> diag;
192 
197  std::vector<number> inv_diag;
198 
205  std::vector<number> inner_sums;
206 
211  number get_rowsum (const size_type row) const;
212 };
213 
216 DEAL_II_NAMESPACE_CLOSE
217 
218 #endif // __deal2__
void initialize(const SparseMatrix< somenumber > &matrix, const AdditionalData &parameters=AdditionalData())
std::vector< number > inner_sums
Definition: sparse_mic.h:205
DeclException1(ExcInvalidStrengthening, double,<< "The strengthening parameter "<< arg1<< " is not greater or equal than zero!")
std::vector< number > diag
Definition: sparse_mic.h:191
void reinit(const SparsityPattern &sparsity) DEAL_II_DEPRECATED
DeclException2(ExcDecompositionNotStable, int, double,<< "The diagonal element ("<< arg1<<","<< arg1<<") is "<< arg2<<", but must be positive")
unsigned int global_dof_index
Definition: types.h:100
std::size_t memory_consumption() const
void vmult(Vector< somenumber > &dst, const Vector< somenumber > &src) const
BlockCompressedSparsityPattern CompressedBlockSparsityPattern DEAL_II_DEPRECATED
std::vector< number > inv_diag
Definition: sparse_mic.h:197
types::global_dof_index size_type
Definition: sparse_mic.h:53
virtual void clear()
number get_rowsum(const size_type row) const
void decompose(const SparseMatrix< somenumber > &matrix, const double strengthen_diagonal=0.) DEAL_II_DEPRECATED
virtual ~SparseMIC()
DeclException0(ExcStrengthenDiagonalTooSmall)
SparseLUDecomposition< number >::AdditionalData AdditionalData
Definition: sparse_mic.h:91