3 #ifndef DUNE_ISTL_OVERLAPPINGSCHWARZ_HH
4 #define DUNE_ISTL_OVERLAPPINGSCHWARZ_HH
10 #include <dune/common/dynmatrix.hh>
11 #include <dune/common/sllist.hh>
12 #include <dune/common/unused.hh>
35 template<
class M,
class X,
class TM,
class TD,
class TA>
36 class SeqOverlappingSchwarz;
41 template<
class I,
class S,
class D>
50 typedef typename AtomInitializer::Matrix
Matrix;
51 typedef typename Matrix::const_iterator
Iter;
52 typedef typename Matrix::row_type::const_iterator
CIter;
78 typedef std::map<size_type,size_type> Map;
79 typedef typename Map::iterator iterator;
80 typedef typename Map::const_iterator const_iterator;
86 const_iterator find(
size_type grow)
const;
92 const_iterator begin()
const;
96 const_iterator end()
const;
99 std::map<size_type,size_type> map_;
104 typedef typename InitializerList::iterator InitIterator;
105 typedef typename IndexSet::const_iterator IndexIteratur;
108 mutable std::vector<IndexMap> indexMaps;
135 template<
class M,
class X,
class Y>
139 template<
class K,
int n,
class Al,
class X,
class Y>
157 void apply (DynamicVector<field_type>& v, DynamicVector<field_type>& d)
159 assert(v.size() > 0);
160 assert(v.size() == d.size());
161 assert(
A.rows() <= v.size());
162 assert(
A.cols() <= v.size());
163 size_t sz =
A.rows();
167 v.resize(v.capacity());
168 d.resize(d.capacity());
181 size_t sz = rowset.size();
183 typedef typename S::const_iterator SIter;
185 for(SIter rowIdx = rowset.begin(), rowEnd=rowset.end();
186 rowIdx!= rowEnd; ++rowIdx, r++)
189 for(SIter colIdx = rowset.begin(), colEnd=rowset.end();
190 colIdx!= colEnd; ++colIdx, c++)
192 if (BCRS[*rowIdx].find(*colIdx) == BCRS[*rowIdx].
end())
194 for (
size_t i=0; i<n; i++)
196 for (
size_t j=0; j<n; j++)
198 A[r*n+i][c*n+j] = BCRS[*rowIdx][*colIdx][i][j];
208 template<
typename T,
bool tag>
217 const typename T::range_type& b,
typename T::range_type& x)
224 template<
class K,
int n,
class Al,
class X,
class Y>
253 void resetIndexForNextDomain();
260 DynamicVector<K> & lhs();
267 DynamicVector<K> & rhs();
280 void operator()(
const size_type& domainIndex);
299 DynamicVector<field_type> * rhs_;
302 DynamicVector<field_type> * lhs_;
310 std::size_t maxlength_;
313 #if HAVE_SUPERLU || HAVE_UMFPACK
314 template<
template<
class>
class S,
int n,
int m,
typename T,
typename A>
343 void resetIndexForNextDomain();
367 void operator()(
const size_type& domain);
394 std::size_t maxlength_;
399 template<
class M,
class X,
class Y>
482 template<
class M,
class X,
class Y>
501 template<
class M,
class X,
class Y>
519 template<
typename S,
typename T>
523 template<
typename S,
typename T,
typename A,
int n>
529 void operator()(
const size_type& domain);
539 template<
typename S,
typename T>
543 template<
typename S,
typename T,
typename A,
int n>
549 void operator()(
const size_type& domain);
567 template<
typename T,
class X,
class S>
571 template<
class X,
class S>
577 template<
class X,
class S>
583 template<
class X,
class S>
600 template<
typename T1,
typename T2,
bool forward>
628 template<
typename T1,
typename T2>
672 sm.template apply<true>(v, b);
676 template<
class M,
class X,
class TD,
class TA>
684 sm.template apply<true>(v, b);
685 sm.template apply<false>(v, b);
689 template<
class T,
bool tag>
699 template<
class K,
int n,
class Al,
class X,
class Y>
703 template<
class RowToDomain,
class Solvers,
class SubDomains>
704 static std::size_t assembleLocalProblems(
const RowToDomain& rowToDomain,
const matrix_type&
mat,
705 Solvers& solvers,
const SubDomains& domains,
709 template<
template<
class>
class S,
typename T,
typename A,
int m,
int n>
713 template<
class RowToDomain,
class Solvers,
class SubDomains>
714 static std::size_t assembleLocalProblems(
const RowToDomain& rowToDomain,
const matrix_type&
mat,
715 Solvers& solvers,
const SubDomains& domains,
719 template<
class M,
class X,
class Y>
723 template<
class RowToDomain,
class Solvers,
class SubDomains>
725 Solvers& solvers,
const SubDomains& domains,
729 template<
class M,
class X,
class Y>
734 template<
class M,
class X,
class Y>
790 typedef std::set<size_type, std::less<size_type>,
791 typename TA::template rebind<size_type>::other>
795 typedef std::vector<subdomain_type, typename TA::template rebind<subdomain_type>::other>
subdomain_vector;
798 typedef SLList<size_type, typename TA::template rebind<size_type>::other>
subdomain_list;
801 typedef std::vector<subdomain_list, typename TA::template rebind<subdomain_list>::other >
rowtodomain_vector;
807 typedef std::vector<slu, typename TA::template rebind<slu>::other>
slu_vector;
828 field_type relaxationFactor=1,
bool onTheFly_=
true);
842 field_type relaxationFactor=1,
bool onTheFly_=
true);
849 virtual void pre (X& x, X& b)
851 DUNE_UNUSED_PARAMETER(x);
852 DUNE_UNUSED_PARAMETER(b);
860 virtual void apply (X& v,
const X& d);
869 DUNE_UNUSED_PARAMETER(x);
872 template<
bool forward>
873 void apply(X& v,
const X& d);
881 typename M::size_type maxlength;
888 template<
class I,
class S,
class D>
892 : initializers(&il), indices(&idx), indexMaps(il.size()), domains(domains_)
896 template<
class I,
class S,
class D>
899 typedef typename IndexSet::value_type::const_iterator iterator;
900 for(iterator domain=(*indices)[row.index()].begin(); domain != (*indices)[row.index()].end(); ++domain) {
901 (*initializers)[*domain].addRowNnz(row, domains[*domain]);
902 indexMaps[*domain].insert(row.index());
906 template<
class I,
class S,
class D>
909 std::for_each(initializers->begin(), initializers->end(),
910 std::mem_fun_ref(&AtomInitializer::allocateMatrixStorage));
911 std::for_each(initializers->begin(), initializers->end(),
912 std::mem_fun_ref(&AtomInitializer::allocateMarker));
915 template<
class I,
class S,
class D>
918 typedef typename IndexSet::value_type::const_iterator iterator;
919 for(iterator domain=(*indices)[row.index()].begin(); domain != (*indices)[row.index()].end(); ++domain) {
920 typename std::map<size_type,size_type>::const_iterator v = indexMaps[*domain].find(col.index());
921 if(v!= indexMaps[*domain].end()) {
922 (*initializers)[*domain].countEntries(indexMaps[*domain].find(col.index())->second);
927 template<
class I,
class S,
class D>
930 std::for_each(initializers->begin(), initializers->end(),
931 std::mem_fun_ref(&AtomInitializer::calcColstart));
934 template<
class I,
class S,
class D>
937 typedef typename IndexSet::value_type::const_iterator iterator;
938 for(iterator domain=(*indices)[row.index()].begin(); domain!= (*indices)[row.index()].end(); ++domain) {
939 typename std::map<size_type,size_type>::const_iterator v = indexMaps[*domain].find(col.index());
940 if(v!= indexMaps[*domain].end()) {
941 assert(indexMaps[*domain].end()!=indexMaps[*domain].find(row.index()));
942 (*initializers)[*domain].copyValue(col, indexMaps[*domain].find(row.index())->second,
948 template<
class I,
class S,
class D>
951 std::vector<IndexMap>().swap(indexMaps);
952 std::for_each(initializers->begin(), initializers->end(),
953 std::mem_fun_ref(&AtomInitializer::createMatrix));
956 template<
class I,
class S,
class D>
961 template<
class I,
class S,
class D>
964 assert(map_.find(grow)==map_.end());
965 map_.insert(std::make_pair(grow,
row++));
968 template<
class I,
class S,
class D>
969 typename OverlappingSchwarzInitializer<I,S,D>::IndexMap::const_iterator
972 return map_.find(grow);
975 template<
class I,
class S,
class D>
976 typename OverlappingSchwarzInitializer<I,S,D>::IndexMap::iterator
979 return map_.find(grow);
982 template<
class I,
class S,
class D>
983 typename OverlappingSchwarzInitializer<I,S,D>::IndexMap::const_iterator
984 OverlappingSchwarzInitializer<I,S,D>::IndexMap::end()
const
989 template<
class I,
class S,
class D>
990 typename OverlappingSchwarzInitializer<I,S,D>::IndexMap::iterator
996 template<
class I,
class S,
class D>
997 typename OverlappingSchwarzInitializer<I,S,D>::IndexMap::const_iterator
1000 return map_.begin();
1003 template<
class I,
class S,
class D>
1004 typename OverlappingSchwarzInitializer<I,S,D>::IndexMap::iterator
1007 return map_.begin();
1010 template<
class M,
class X,
class TM,
class TD,
class TA>
1013 :
mat(mat_), relax(relaxationFactor), onTheFly(fly)
1015 typedef typename rowtodomain_vector::const_iterator RowDomainIterator;
1016 typedef typename subdomain_list::const_iterator DomainIterator;
1017 #ifdef DUNE_ISTL_WITH_CHECKING
1018 assert(rowToDomain.size()==mat.N());
1019 assert(rowToDomain.size()==mat.M());
1021 for(RowDomainIterator iter=rowToDomain.begin(); iter != rowToDomain.end(); ++iter)
1022 assert(iter->size()>0);
1027 for(RowDomainIterator iter=rowToDomain.begin(); iter != rowToDomain.end(); ++iter)
1028 for(DomainIterator d=iter->begin(); d != iter->end(); ++d)
1029 domains=std::max(domains, *d);
1032 solvers.resize(domains);
1033 subDomains.resize(domains);
1037 for(RowDomainIterator iter=rowToDomain.begin(); iter != rowToDomain.end(); ++iter, ++
row)
1038 for(DomainIterator d=iter->begin(); d != iter->end(); ++d)
1039 subDomains[*d].insert(row);
1041 #ifdef DUNE_ISTL_WITH_CHECKING
1043 typedef typename subdomain_vector::const_iterator iterator;
1044 for(iterator iter=subDomains.begin(); iter != subDomains.end(); ++iter) {
1045 typedef typename subdomain_type::const_iterator entry_iterator;
1046 Dune::dvverb<<
"domain "<<i++<<
":";
1047 for(entry_iterator entry = iter->begin(); entry != iter->end(); ++entry) {
1048 Dune::dvverb<<
" "<<*entry;
1050 Dune::dvverb<<std::endl;
1057 template<
class M,
class X,
class TM,
class TD,
class TA>
1062 :
mat(mat_), solvers(sd.size()), subDomains(sd), relax(relaxationFactor),
1065 typedef typename subdomain_vector::const_iterator DomainIterator;
1067 #ifdef DUNE_ISTL_WITH_CHECKING
1070 for(DomainIterator d=sd.begin(); d != sd.end(); ++d,++i) {
1072 assert(d->size()>0);
1073 typedef typename DomainIterator::value_type::const_iterator entry_iterator;
1074 Dune::dvverb<<
"domain "<<i<<
":";
1075 for(entry_iterator entry = d->begin(); entry != d->end(); ++entry) {
1076 Dune::dvverb<<
" "<<*entry;
1078 Dune::dvverb<<std::endl;
1088 for(DomainIterator domain=sd.begin(); domain != sd.end(); ++domain, ++domainId) {
1089 typedef typename subdomain_type::const_iterator iterator;
1090 for(iterator
row=domain->begin();
row != domain->end(); ++
row)
1091 rowToDomain[*
row].push_back(domainId);
1107 template<
typename T,
typename A,
int n,
int m>
1110 template<
class Domain>
1118 template<
class K,
int n,
class Al,
class X,
class Y>
1119 template<
class RowToDomain,
class Solvers,
class SubDomains>
1121 SeqOverlappingSchwarzAssemblerHelper< DynamicMatrixSubdomainSolver< BCRSMatrix< FieldMatrix<K,n,n>, Al>, X, Y >,
false>::
1122 assembleLocalProblems(
const RowToDomain& rowToDomain,
1125 const SubDomains& subDomains,
1128 DUNE_UNUSED_PARAMETER(onTheFly);
1129 DUNE_UNUSED_PARAMETER(rowToDomain);
1130 DUNE_UNUSED_PARAMETER(mat);
1131 DUNE_UNUSED_PARAMETER(solvers);
1132 typedef typename SubDomains::const_iterator DomainIterator;
1133 std::size_t maxlength = 0;
1137 for(DomainIterator domain=subDomains.begin(); domain!=subDomains.end(); ++domain)
1138 maxlength=std::max(maxlength, domain->size());
1144 #if HAVE_SUPERLU || HAVE_UMFPACK
1145 template<
template<
class>
class S,
typename T,
typename A,
int m,
int n>
1146 template<
class RowToDomain,
class Solvers,
class SubDomains>
1150 const SubDomains& subDomains,
1153 typedef typename S<BCRSMatrix<FieldMatrix<T,m,n>,
A> >::MatrixInitializer MatrixInitializer;
1154 typedef typename std::vector<MatrixInitializer>::iterator InitializerIterator;
1155 typedef typename SubDomains::const_iterator DomainIterator;
1156 typedef typename Solvers::iterator SolverIterator;
1157 std::size_t maxlength = 0;
1160 for(DomainIterator domain=subDomains.begin(); domain!=subDomains.end(); ++domain)
1161 maxlength=std::max(maxlength, domain->size());
1162 maxlength*=mat[0].
begin()->N();
1165 DomainIterator domain=subDomains.begin();
1168 std::vector<MatrixInitializer> initializers(subDomains.size());
1170 SolverIterator solver=solvers.begin();
1171 for(InitializerIterator initializer=initializers.begin(); initializer!=initializers.end();
1172 ++initializer, ++solver, ++domain) {
1176 *initializer=MatrixInitializer(solver->getInternalMatrix());
1181 RowToDomain, SubDomains> Initializer;
1183 Initializer initializer(initializers, rowToDomain, subDomains);
1188 for (SolverIterator solverIt = solvers.begin(); solverIt != solvers.end(); ++solverIt)
1190 assert(solverIt->getInternalMatrix().N() == solverIt->getInternalMatrix().M());
1191 maxlength = std::max(maxlength, solverIt->getInternalMatrix().N());
1199 template<
class M,
class X,
class Y>
1200 template<
class RowToDomain,
class Solvers,
class SubDomains>
1204 const SubDomains& subDomains,
1207 DUNE_UNUSED_PARAMETER(rowToDomain);
1208 typedef typename SubDomains::const_iterator DomainIterator;
1209 typedef typename Solvers::iterator SolverIterator;
1210 std::size_t maxlength = 0;
1213 for(DomainIterator domain=subDomains.begin(); domain!=subDomains.end(); ++domain)
1214 maxlength=std::max(maxlength, domain->size());
1217 SolverIterator solver=solvers.begin();
1218 for(DomainIterator domain=subDomains.begin(); domain!=subDomains.end();
1219 ++domain, ++solver) {
1220 solver->setSubMatrix(mat, *domain);
1221 maxlength=std::max(maxlength, domain->size());
1230 template<
class M,
class X,
class TM,
class TD,
class TA>
1236 template<
class M,
class X,
class TM,
class TD,
class TA>
1237 template<
bool forward>
1240 typedef slu_vector solver_vector;
1253 Adder adder(v, x, assigner, relax);
1257 std::for_each(domain->begin(), domain->end(), assigner);
1258 assigner.resetIndexForNextDomain();
1262 sdsolver.setSubMatrix(
mat, *domain);
1264 sdsolver.apply(assigner.lhs(), assigner.rhs());
1266 solver->apply(assigner.lhs(), assigner.rhs());
1271 std::for_each(domain->begin(), domain->end(), adder);
1272 assigner.resetIndexForNextDomain();
1277 assigner.deallocate();
1280 template<
class K,
int n,
class Al,
class X,
class Y>
1281 OverlappingAssignerHelper< DynamicMatrixSubdomainSolver< BCRSMatrix< FieldMatrix<K,n,n>, Al>, X, Y >,
false>
1283 const X& b_, Y& x_) :
1285 rhs_( new DynamicVector<
field_type>(maxlength, 42) ),
1286 lhs_( new DynamicVector<
field_type>(maxlength, -42) ),
1290 maxlength_(maxlength)
1293 template<
class K,
int n,
class Al,
class X,
class Y>
1302 template<
class K,
int n,
class Al,
class X,
class Y>
1305 ::resetIndexForNextDomain()
1310 template<
class K,
int n,
class Al,
class X,
class Y>
1318 template<
class K,
int n,
class Al,
class X,
class Y>
1326 template<
class K,
int n,
class Al,
class X,
class Y>
1334 template<
class K,
int n,
class Al,
class X,
class Y>
1343 assert(i<maxlength_);
1344 rhs()[i]=(*b)[domainIndex][j];
1351 for(col_iterator
col=(*
mat)[domainIndex].begin();
col!=(*mat)[domainIndex].end(); ++
col) {
1353 (*col).mv((*x)[
col.index()], tmp);
1356 assert(i<maxlength_);
1363 assert(i<maxlength_);
1364 rhs()[i]=(*b)[domainIndex][j];
1370 for(col_iterator
col=(*
mat)[domainIndex].begin();
col!=(*mat)[domainIndex].end(); ++
col) {
1372 rhs()[i]-=(*col)[j][k] * (*x)[
col.index()][k];
1379 template<
class K,
int n,
class Al,
class X,
class Y>
1386 assert(i<maxlength_);
1391 #if HAVE_SUPERLU || HAVE_UMFPACK
1393 template<
template<
class>
class S,
int n,
int m,
typename T,
typename A>
1401 x(&x_), i(0), maxlength_(maxlength)
1408 template<
template<
class>
class S,
int n,
int m,
typename T,
typename A>
1415 template<
template<
class>
class S,
int n,
int m,
typename T,
typename A>
1422 assert(i<maxlength_);
1423 rhs_[i]=(*b)[domainIndex][j];
1431 for(col_iterator
col=(*
mat)[domainIndex].begin();
col!=(*mat)[domainIndex].end(); ++
col) {
1433 (*col).mv((*x)[
col.index()], tmp);
1436 assert(i<maxlength_);
1444 template<
template<
class>
class S,
int n,
int m,
typename T,
typename A>
1448 assert(i<maxlength_);
1454 template<
template<
class>
class S,
int n,
int m,
typename T,
typename A>
1459 assert(i<maxlength_);
1464 template<
template<
class>
class S,
int n,
int m,
typename T,
typename A>
1470 template<
template<
class>
class S,
int n,
int m,
typename T,
typename A>
1477 template<
template<
class>
class S,
int n,
int m,
typename T,
typename A>
1486 template<
class M,
class X,
class Y>
1495 rhs_=
new Y(maxlength);
1496 lhs_ =
new X(maxlength);
1499 template<
class M,
class X,
class Y>
1506 template<
class M,
class X,
class Y>
1509 (*rhs_)[i]=(*b)[domainIndex];
1512 typedef typename matrix_type::ConstColIterator col_iterator;
1515 for(col_iterator
col=(*
mat)[domainIndex].begin();
col!=(*mat)[domainIndex].end(); ++
col) {
1516 (*col).mmv((*x)[
col.index()], (*rhs_)[i]);
1522 template<
class M,
class X,
class Y>
1528 template<
class M,
class X,
class Y>
1534 template<
class M,
class X,
class Y>
1540 template<
class M,
class X,
class Y>
1546 template<
class M,
class X,
class Y>
1552 template<
typename S,
typename T,
typename A,
int n>
1557 : v(&v_), x(&x_), assigner(&assigner_), relax(relax_)
1560 template<
typename S,
typename T,
typename A,
int n>
1564 assigner->assignResult((*v)[domainIndex]);
1568 template<
typename S,
typename T,
typename A,
int n>
1576 template<
typename S,
typename T,
typename A,
int n>
1581 : x(&x_), assigner(&assigner_), relax(relax_)
1583 DUNE_UNUSED_PARAMETER(v_);
1587 template<
typename S,
typename T,
typename A,
int n>
1591 assigner->relaxResult(relax);
1592 assigner->assignResult((*x)[domainIndex]);
1596 template<
typename S,
typename T,
typename A,
int n>
Y range_type
Definition: overlappingschwarz.hh:230
void calcColstart() const
Definition: overlappingschwarz.hh:928
static domain_iterator end(const subdomain_vector &sv)
Definition: overlappingschwarz.hh:622
void apply(DynamicVector< field_type > &v, DynamicVector< field_type > &d)
Apply the subdomain solver.
Definition: overlappingschwarz.hh:157
Row row
Definition: matrixmatrix.hh:345
Tag that the tells the schwarz method to be additive.
Definition: overlappingschwarz.hh:115
Classes for using SuperLU with ISTL matrices.
void operator()(const size_type &domain)
calculate one entry of the local defect.
Definition: overlappingschwarz.hh:1507
OverlappingAssignerHelper(std::size_t maxlength, const M &mat, const Y &b, X &x)
Constructor.
Definition: overlappingschwarz.hh:513
SLList< size_type, typename TA::template rebind< size_type >::other > subdomain_list
The type for the row to subdomain mapping.
Definition: overlappingschwarz.hh:798
virtual void pre(X &x, X &b)
Prepare the preconditioner.
Definition: overlappingschwarz.hh:849
Exact subdomain solver using ILU(p) with appropriate p.
Definition: ilusubdomainsolver.hh:74
void resetIndexForNextDomain()
Resets the local index to zero.
Definition: overlappingschwarz.hh:1547
Definition: overlappingschwarz.hh:213
template meta program for choosing how to add the correction.
Definition: overlappingschwarz.hh:568
Dune::remove_const< M >::type matrix_type
The matrix type the preconditioner is for.
Definition: overlappingschwarz.hh:145
AdditiveAdder< S, X > Adder
Definition: overlappingschwarz.hh:574
A::size_type size_type
The type for the index access and the size.
Definition: bcrsmatrix.hh:447
Definition: overlappingschwarz.hh:720
K field_type
Definition: overlappingschwarz.hh:146
iterator class for sequential access
Definition: basearray.hh:580
MultiplicativeAdder< S, X > Adder
Definition: overlappingschwarz.hh:580
Col col
Definition: matrixmatrix.hh:347
A::size_type size_type
Definition: overlappingschwarz.hh:546
Dune::remove_const< M >::type rilu_type
Definition: overlappingschwarz.hh:147
Base class for matrix free definition of preconditioners.
Definition: preconditioner.hh:26
M matrix_type
Definition: overlappingschwarz.hh:403
BCRSMatrix< FieldMatrix< T, n, m >, A > matrix_type
Definition: overlappingschwarz.hh:317
I InitializerList
Definition: overlappingschwarz.hh:48
A vector of blocks with memory management.
Definition: bvector.hh:252
T2 subdomain_vector
Definition: overlappingschwarz.hh:605
Sequential overlapping Schwarz preconditioner.
Definition: colcompmatrix.hh:157
void countEntries(const Iter &row, const CIter &col) const
Definition: overlappingschwarz.hh:916
void setSubMatrix(const M &BCRS, S &rowset)
Set the data of the local problem.
Definition: overlappingschwarz.hh:179
void relaxResult(field_type relax)
relax the result.
Definition: overlappingschwarz.hh:1523
void createMatrix() const
Definition: overlappingschwarz.hh:949
matrix_type::size_type size_type
Definition: overlappingschwarz.hh:232
Matrix & A
Definition: matrixmatrix.hh:216
void copyToColCompMatrix(F &initializer, const MRS &mrs)
Definition: colcompmatrix.hh:431
static std::size_t assembleLocalProblems(const RowToDomain &rowToDomain, const matrix_type &mat, Solvers &solvers, const SubDomains &domains, bool onTheFly)
Definition: overlappingschwarz.hh:1201
A sparse block matrix with compressed row storage.
Definition: bcrsmatrix.hh:412
Definition: colcompmatrix.hh:160
Tag that tells the Schwarz method to be multiplicative.
Definition: overlappingschwarz.hh:121
Iterator end()
Get iterator to one beyond last row.
Definition: bcrsmatrix.hh:630
virtual void post(X &x)
Postprocess the preconditioner.
Definition: overlappingschwarz.hh:867
void copyValue(const Iter &row, const CIter &col) const
Definition: overlappingschwarz.hh:935
SeqOverlappingSchwarz(const matrix_type &mat, const subdomain_vector &subDomains, field_type relaxationFactor=1, bool onTheFly_=true)
Construct the overlapping Schwarz method.
Definition: overlappingschwarz.hh:1058
Y::block_type block_type
Definition: overlappingschwarz.hh:407
K field_type
Definition: overlappingschwarz.hh:229
A::size_type size_type
Definition: overlappingschwarz.hh:526
std::vector< slu, typename TA::template rebind< slu >::other > slu_vector
The vector type containing subdomain solvers.
Definition: overlappingschwarz.hh:807
Various local subdomain solvers based on ILU for SeqOverlappingSchwarz.
OverlappingAssignerILUBase(std::size_t maxlength, const M &mat, const Y &b, X &x)
Constructor.
Definition: overlappingschwarz.hh:1487
X domain_type
The domain type of the preconditioner.
Definition: overlappingschwarz.hh:149
Templates characterizing the type of a solver.
Definition: solvertype.hh:27
static solver_iterator begin(solver_vector &sv)
Definition: overlappingschwarz.hh:608
static solver_iterator begin(solver_vector &sv)
Definition: overlappingschwarz.hh:636
Category for sequential solvers.
Definition: solvercategory.hh:21
std::set< size_type, std::less< size_type >, typename TA::template rebind< size_type >::other > subdomain_type
The type for the subdomain to row index mapping.
Definition: overlappingschwarz.hh:792
void assignResult(block_type &res)
Assigns the block to the current local index. At the same time the local defect is calculated for the...
Definition: overlappingschwarz.hh:1529
Helper template meta program for application of overlapping schwarz.
Definition: overlappingschwarz.hh:601
Classes for using UMFPack with ISTL matrices.
void addRowNnz(const Iter &row)
Definition: overlappingschwarz.hh:897
BCRSMatrix< FieldMatrix< T, m, n >, A > matrix_type
Definition: overlappingschwarz.hh:712
std::vector< subdomain_type, typename TA::template rebind< subdomain_type >::other > subdomain_vector
The vector type containing the subdomain to row index mapping.
Definition: overlappingschwarz.hh:795
Exact subdomain solver using Dune::DynamicMatrix<T>::solve.
Definition: overlappingschwarz.hh:136
range_type::block_type block_type
Definition: overlappingschwarz.hh:320
static domain_iterator begin(const subdomain_vector &sv)
Definition: overlappingschwarz.hh:617
void allocate()
Definition: overlappingschwarz.hh:907
static void apply(smoother &sm, range_type &v, const range_type &b)
Definition: overlappingschwarz.hh:670
Matrix & mat
Definition: matrixmatrix.hh:343
X & lhs()
Get the local left hand side.
Definition: overlappingschwarz.hh:1535
Definition: overlappingschwarz.hh:690
TA allocator
The allocator to use.
Definition: overlappingschwarz.hh:787
static solver_iterator end(solver_vector &sv)
Definition: overlappingschwarz.hh:641
TD slu
The type for the subdomain solver in use.
Definition: overlappingschwarz.hh:804
Initializer for SuperLU Matrices representing the subdomains.
Definition: overlappingschwarz.hh:42
AtomInitializer::Matrix Matrix
Definition: overlappingschwarz.hh:50
The category the precondtioner is part of.
Definition: overlappingschwarz.hh:811
T2 subdomain_vector
Definition: overlappingschwarz.hh:633
D subdomain_vector
The vector type containing the subdomain to row index mapping.
Definition: overlappingschwarz.hh:46
solver_vector::reverse_iterator solver_iterator
Definition: overlappingschwarz.hh:632
Definition: matrixutils.hh:25
TM Mode
The mode (additive or multiplicative) of the Schwarz method.
Definition: overlappingschwarz.hh:776
X range_type
The range type of the preconditioner.
Definition: overlappingschwarz.hh:768
smoother::range_type range_type
Definition: overlappingschwarz.hh:680
InitializerList::value_type AtomInitializer
Definition: overlappingschwarz.hh:49
static domain_iterator begin(const subdomain_vector &sv)
Definition: overlappingschwarz.hh:645
static domain_iterator end(const subdomain_vector &sv)
Definition: overlappingschwarz.hh:650
range_type::field_type field_type
Definition: overlappingschwarz.hh:319
SeqOverlappingSchwarz< M, X, SymmetricMultiplicativeSchwarzMode, TD, TA > smoother
Definition: overlappingschwarz.hh:679
subdomain_vector::const_reverse_iterator domain_iterator
Definition: overlappingschwarz.hh:634
range_type::block_type block_type
Definition: overlappingschwarz.hh:231
smoother::range_type range_type
Definition: overlappingschwarz.hh:668
Definition: ilusubdomainsolver.hh:107
static int size(const Domain &d)
Definition: overlappingschwarz.hh:1111
static solver_iterator end(solver_vector &sv)
Definition: overlappingschwarz.hh:613
Define general preconditioner interface.
Iterator begin()
Get iterator to first row.
Definition: bcrsmatrix.hh:624
solver_vector::iterator solver_iterator
Definition: overlappingschwarz.hh:604
T1 solver_vector
Definition: overlappingschwarz.hh:603
Implementation of the BCRSMatrix class.
M matrix_type
Definition: overlappingschwarz.hh:722
M matrix_type
The type of the matrix to precondition.
Definition: overlappingschwarz.hh:758
matrix_type::size_type size_type
Definition: overlappingschwarz.hh:322
virtual void apply(X &v, const X &d)
Apply the precondtioner.
Definition: overlappingschwarz.hh:1231
S IndexSet
Definition: overlappingschwarz.hh:54
Y range_type
The range type of the preconditioner.
Definition: overlappingschwarz.hh:151
BCRSMatrix< FieldMatrix< K, n, n >, Al > matrix_type
Definition: overlappingschwarz.hh:228
Definition: overlappingschwarz.hh:520
Definition: overlappingschwarz.hh:400
Matrix::row_type::const_iterator CIter
Definition: overlappingschwarz.hh:52
This file implements a vector space as a tensor product of a given vector space. The number of compon...
Tag that tells the Schwarz method to be multiplicative and symmetric.
Definition: overlappingschwarz.hh:128
Definition: overlappingschwarz.hh:1105
IndexSet::size_type size_type
Definition: overlappingschwarz.hh:55
Y & rhs()
Get the local right hand side.
Definition: overlappingschwarz.hh:1541
Matrix::const_iterator Iter
Definition: overlappingschwarz.hh:51
BCRSMatrix< FieldMatrix< K, n, n >, Al > matrix_type
Definition: overlappingschwarz.hh:702
Definition: overlappingschwarz.hh:209
std::vector< subdomain_list, typename TA::template rebind< subdomain_list >::other > rowtodomain_vector
The vector type containing the row index to subdomain mapping.
Definition: overlappingschwarz.hh:801
Helper template meta program for application of overlapping schwarz.
Definition: overlappingschwarz.hh:665
T1 solver_vector
Definition: overlappingschwarz.hh:631
Definition: overlappingschwarz.hh:540
static void apply(smoother &sm, range_type &v, const range_type &b)
Definition: overlappingschwarz.hh:682
S< BCRSMatrix< FieldMatrix< T, n, m >, A > >::range_type range_type
Definition: overlappingschwarz.hh:318
OverlappingAssigner(std::size_t maxlength, const typename T::matrix_type &mat, const typename T::range_type &b, typename T::range_type &x)
Definition: overlappingschwarz.hh:216
void deallocate()
Deallocates memory of the local vector.
Definition: overlappingschwarz.hh:1500
OverlappingSchwarzInitializer(InitializerList &il, const IndexSet &indices, const subdomain_vector &domains)
Definition: overlappingschwarz.hh:889
OverlappingAssignerHelper(std::size_t maxlength, const M &mat, const Y &b, X &x)
Constructor.
Definition: overlappingschwarz.hh:494
MultiplicativeAdder< S, X > Adder
Definition: overlappingschwarz.hh:586
X domain_type
The domain type of the preconditioner.
Definition: overlappingschwarz.hh:763
matrix_type::size_type size_type
The return type of the size method.
Definition: overlappingschwarz.hh:784
matrix_type::size_type size_type
Definition: overlappingschwarz.hh:409
T smoother
Definition: overlappingschwarz.hh:667
X::field_type field_type
The field type of the preconditioner.
Definition: overlappingschwarz.hh:781
M::field_type field_type
Definition: overlappingschwarz.hh:405
subdomain_vector::const_iterator domain_iterator
Definition: overlappingschwarz.hh:606