3#ifndef DUNE_ISTL_ILUSUBDOMAINSOLVER_HH
4#define DUNE_ISTL_ILUSUBDOMAINSOLVER_HH
7#include <dune/common/typetraits.hh>
32 template<
class M,
class X,
class Y>
73 template<
class M,
class X,
class Y>
79 typedef typename std::remove_const<M>::type
rilu_type;
106 template<
class M,
class X,
class Y>
146 template<
class M,
class X,
class Y>
152 typedef typename M::size_type size_type;
153 typedef std::map<typename S::value_type,size_type> IndexMap;
154 typedef typename IndexMap::iterator
IMIter;
159 typedef typename S::const_iterator
SIter;
168 ILU.setBuildMode(matrix_type::row_wise);
171 typedef typename matrix_type::CreateIterator CIter;
173 std::size_t offset=0;
180 for(
typename matrix_type::ConstColIterator
col=A[*
rowIdx].begin(),
187 offset=std::max(offset,(std::size_t)std::abs((
int)(
guess->second-
rowCreator.index())));
194 typename matrix_type::iterator
iluRow=ILU.begin();
201 for(
typename matrix_type::ConstColIterator
col=A[*
rowIdx].begin(),
216 template<
class M,
class X,
class Y>
220 this->copyToLocalMatrix(A,
rowSet);
224 template<
class M,
class X,
class Y>
228 std::size_t offset=copyToLocalMatrix(A,
rowSet);
230 RILU.setBuildMode(matrix_type::row_wise);
A dynamic dense block matrix class.
std::size_t copyToLocalMatrix(const M &A, S &rowset)
Copy the local part of the global matrix to ILU.
Definition ilusubdomainsolver.hh:148
void setSubMatrix(const M &A, S &rowset)
Set the data of the local problem.
Definition ilusubdomainsolver.hh:226
void setSubMatrix(const M &A, S &rowset)
Set the data of the local problem.
Definition ilusubdomainsolver.hh:218
Col col
Definition matrixmatrix.hh:347
void bilu_backsolve(const M &A, X &v, const Y &d)
LU backsolve with stored inverse.
Definition ilu.hh:96
void bilu_decomposition(const M &A, int n, M &ILU)
Definition ilu.hh:156
void bilu0_decomposition(M &A)
compute ILU decomposition of A. A is overwritten by its decomposition
Definition ilu.hh:35
Definition basearray.hh:19
Statistics about compression achieved in implicit mode.
Definition bcrsmatrix.hh:81
base class encapsulating common algorithms of ILU0SubdomainSolver and ILUNSubdomainSolver.
Definition ilusubdomainsolver.hh:33
matrix_type ILU
The ILU0 decomposition of the matrix, or the local matrix.
Definition ilusubdomainsolver.hh:64
X domain_type
The domain type of the preconditioner.
Definition ilusubdomainsolver.hh:38
virtual ~ILUSubdomainSolver()
Definition ilusubdomainsolver.hh:50
Y range_type
The range type of the preconditioner.
Definition ilusubdomainsolver.hh:40
std::remove_const< M >::type matrix_type
The matrix type the preconditioner is for.
Definition ilusubdomainsolver.hh:36
virtual void apply(X &v, const Y &d)=0
Apply the subdomain solver.
Exact subdomain solver using ILU(p) with appropriate p.
Definition ilusubdomainsolver.hh:75
X domain_type
The domain type of the preconditioner.
Definition ilusubdomainsolver.hh:81
Y range_type
The range type of the preconditioner.
Definition ilusubdomainsolver.hh:83
std::remove_const< M >::type rilu_type
Definition ilusubdomainsolver.hh:79
std::remove_const< M >::type matrix_type
The matrix type the preconditioner is for.
Definition ilusubdomainsolver.hh:78
void apply(X &v, const Y &d)
Apply the subdomain solver.
Definition ilusubdomainsolver.hh:90
Definition ilusubdomainsolver.hh:108
X domain_type
The domain type of the preconditioner.
Definition ilusubdomainsolver.hh:114
std::remove_const< M >::type matrix_type
The matrix type the preconditioner is for.
Definition ilusubdomainsolver.hh:111
std::remove_const< M >::type rilu_type
Definition ilusubdomainsolver.hh:112
void apply(X &v, const Y &d)
Apply the subdomain solver.
Definition ilusubdomainsolver.hh:122
Y range_type
The range type of the preconditioner.
Definition ilusubdomainsolver.hh:116