|
dune-istl 2.11
|
Loading...
Searching...
No Matches
overlappingschwarz.hh
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
218 using OverlappingAssigner = OverlappingAssignerHelper<T, Dune::StoresColumnCompressed<T>::value>;
238 OverlappingAssignerHelper(std::size_t maxlength, const BCRSMatrix<K, Al>& mat_, const X& b_, Y& x_);
526 typedef typename std::decay_t<decltype(Impl::asVector(std::declval<T>()))>::field_type field_type;
531 static constexpr size_t n = std::decay_t<decltype(Impl::asVector(std::declval<T>()))>::dimension;
548 typedef typename std::decay_t<decltype(Impl::asVector(std::declval<T>()))>::field_type field_type;
553 static constexpr size_t n = std::decay_t<decltype(Impl::asVector(std::declval<T>()))>::dimension;
680 struct SeqOverlappingSchwarzApplier<SeqOverlappingSchwarz<M,X,SymmetricMultiplicativeSchwarzMode,TD,TA> >
697 using SeqOverlappingSchwarzAssembler = SeqOverlappingSchwarzAssemblerHelper<T,Dune::StoresColumnCompressed<T>::value>;
700 struct SeqOverlappingSchwarzAssemblerHelper< DynamicMatrixSubdomainSolver< BCRSMatrix< K, Al>, X, Y >,false>
705 static std::size_t assembleLocalProblems(const RowToDomain& rowToDomain, const matrix_type& mat,
716 static std::size_t assembleLocalProblems(const RowToDomain& rowToDomain, const matrix_type& mat,
726 static std::size_t assembleLocalProblems(const RowToDomain& rowToDomain, const matrix_type& mat,
797 typedef std::vector<subdomain_type, typename std::allocator_traits<TA>::template rebind_alloc<subdomain_type> > subdomain_vector;
800 typedef SLList<size_type, typename std::allocator_traits<TA>::template rebind_alloc<size_type> > subdomain_list;
803 typedef std::vector<subdomain_list, typename std::allocator_traits<TA>::template rebind_alloc<subdomain_list> > rowtodomain_vector;
809 typedef std::vector<slu, typename std::allocator_traits<TA>::template rebind_alloc<slu> > slu_vector;
898 for(iterator domain=(*indices)[row.index()].begin(); domain != (*indices)[row.index()].end(); ++domain) {
914 void OverlappingSchwarzInitializer<I,S,D>::countEntries(const Iter& row, const CIter& col) const
917 for(iterator domain=(*indices)[row.index()].begin(); domain != (*indices)[row.index()].end(); ++domain) {
918 typename std::map<size_type,size_type>::const_iterator v = indexMaps[*domain].find(col.index());
936 for(iterator domain=(*indices)[row.index()].begin(); domain!= (*indices)[row.index()].end(); ++domain) {
937 typename std::map<size_type,size_type>::const_iterator v = indexMaps[*domain].find(col.index());
1009 SeqOverlappingSchwarz<M,X,TM,TD,TA>::SeqOverlappingSchwarz(const matrix_type& mat_, const rowtodomain_vector& rowToDomain,
1143 std::size_t SeqOverlappingSchwarzAssemblerHelper<S<BCRSMatrix<T,A>>,true>::assembleLocalProblems(const RowToDomain& rowToDomain,
1198 std::size_t SeqOverlappingSchwarzAssemblerILUBase<M,X,Y>::assembleLocalProblems([[maybe_unused]] const RowToDomain& rowToDomain,
1237 typedef typename IteratorDirectionSelector<solver_vector,subdomain_vector,forward>::solver_iterator iterator;
1238 typedef typename IteratorDirectionSelector<solver_vector,subdomain_vector,forward>::domain_iterator
1243 domain_iterator domain=IteratorDirectionSelector<solver_vector,subdomain_vector,forward>::begin(subDomains);
1244 iterator solver = IteratorDirectionSelector<solver_vector,subdomain_vector,forward>::begin(solvers);
1251 for(; domain != IteratorDirectionSelector<solver_vector,subdomain_vector,forward>::end(subDomains); ++domain) {
1412 void OverlappingAssignerHelper<S<BCRSMatrix<T,A>>,true>::operator()(const size_type& domainIndex)
This file implements a vector space as a tensor product of a given vector space. The number of compon...
Classes for using SuperLU with ISTL matrices.
Classes for using UMFPack with ISTL matrices.
Define general preconditioner interface.
Implementation of the BCRSMatrix class.
Various local subdomain solvers based on ILU for SeqOverlappingSchwarz.
Templates characterizing the type of a solver.
void addRowNnz(const Iter &row)
Definition overlappingschwarz.hh:895
void apply(X &v, const X &d)
Apply one step of the preconditioner to the system A(v)=d.
Definition overlappingschwarz.hh:1234
X & lhs()
Get the local left hand side.
Definition overlappingschwarz.hh:1531
void calcColstart() const
Definition overlappingschwarz.hh:926
Y & rhs()
Get the local right hand side.
Definition overlappingschwarz.hh:1537
iterator end()
Definition overlappingschwarz.hh:989
void resetIndexForNextDomain()
Resets the local index to zero.
Definition overlappingschwarz.hh:1543
void copyValue(const Iter &row, const CIter &col) const
Definition overlappingschwarz.hh:933
void createMatrix() const
Definition overlappingschwarz.hh:947
iterator begin()
Definition overlappingschwarz.hh:1003
OverlappingSchwarzInitializer(InitializerList &il, const IndexSet &indices, const subdomain_vector &domains)
Definition overlappingschwarz.hh:887
IndexMap()
Definition overlappingschwarz.hh:955
OverlappingAssignerILUBase(std::size_t maxlength, const M &mat, const Y &b, X &x)
Constructor.
Definition overlappingschwarz.hh:1483
const_iterator find(size_type grow) const
Definition overlappingschwarz.hh:968
void operator()(const size_type &domain)
calculate one entry of the local defect.
Definition overlappingschwarz.hh:1503
SeqOverlappingSchwarz(const matrix_type &mat, const subdomain_vector &subDomains, field_type relaxationFactor=1, bool onTheFly_=true)
Construct the overlapping Schwarz method.
Definition overlappingschwarz.hh:1056
void deallocate()
Deallocates memory of the local vector.
Definition overlappingschwarz.hh:1496
void insert(size_type grow)
Definition overlappingschwarz.hh:960
void countEntries(const Iter &row, const CIter &col) const
Definition overlappingschwarz.hh:914
void apply(X &v, const X &d) override
Apply the preconditioner.
Definition overlappingschwarz.hh:1227
static std::size_t assembleLocalProblems(const RowToDomain &rowToDomain, const matrix_type &mat, Solvers &solvers, const SubDomains &domains, bool onTheFly)
Definition overlappingschwarz.hh:1198
void relaxResult(field_type relax)
relax the result.
Definition overlappingschwarz.hh:1519
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:1525
SeqOverlappingSchwarz(const matrix_type &mat, const rowtodomain_vector &rowToDomain, field_type relaxationFactor=1, bool onTheFly_=true)
Definition overlappingschwarz.hh:1009
int size() const
iterator end()
void insert(const T &v)
iterator begin()
void deallocate(pointer p, std::size_t n)
static constexpr size_type M()
virtual void operator()()=0
iterator(ParallelIndexSet< TG, TL, N > &indexSet, const Father &father)
const_iterator find(int proc) const
DVVerbType dvverb
constexpr HybridMultiIndex< T..., std::size_t > push_back(const HybridMultiIndex< T... > &tp, std::size_t i)
void resize(size_type n, value_type c=value_type())
size_type size() const
size_type capacity() const
Initializer for SuperLU Matrices representing the subdomains.
Definition overlappingschwarz.hh:47
Matrix::row_type::const_iterator CIter
Definition overlappingschwarz.hh:56
Matrix::const_iterator Iter
Definition overlappingschwarz.hh:55
IndexSet::size_type size_type
Definition overlappingschwarz.hh:59
I InitializerList
Definition overlappingschwarz.hh:52
AtomInitializer::Matrix Matrix
Definition overlappingschwarz.hh:54
InitializerList::value_type AtomInitializer
Definition overlappingschwarz.hh:53
D subdomain_vector
The vector type containing the subdomain to row index mapping.
Definition overlappingschwarz.hh:50
A::size_type size_type
The type for the index access and the size.
Definition bcrsmatrix.hh:498
row_type::ConstIterator ConstColIterator
Const iterator to the entries of a row.
Definition bcrsmatrix.hh:738
Exact subdomain solver using ILU(p) with appropriate p.
Definition ilusubdomainsolver.hh:78
Definition ilusubdomainsolver.hh:111
Sequential overlapping Schwarz preconditioner.
Definition overlappingschwarz.hh:755
X::field_type field_type
The field type of the preconditioner.
Definition overlappingschwarz.hh:783
SLList< size_type, typename std::allocator_traits< TA >::template rebind_alloc< size_type > > subdomain_list
The type for the row to subdomain mapping.
Definition overlappingschwarz.hh:800
std::vector< slu, typename std::allocator_traits< TA >::template rebind_alloc< slu > > slu_vector
The vector type containing subdomain solvers.
Definition overlappingschwarz.hh:809
SolverCategory::Category category() const override
Category of the preconditioner (see SolverCategory::Category)
Definition overlappingschwarz.hh:868
M matrix_type
The type of the matrix to precondition.
Definition overlappingschwarz.hh:760
TM Mode
The mode (additive or multiplicative) of the Schwarz method.
Definition overlappingschwarz.hh:778
void post(X &x) override
Postprocess the preconditioner.
Definition overlappingschwarz.hh:861
X range_type
The range type of the preconditioner.
Definition overlappingschwarz.hh:770
std::set< size_type, std::less< size_type >, typename std::allocator_traits< TA >::template rebind_alloc< size_type > > subdomain_type
The type for the subdomain to row index mapping.
Definition overlappingschwarz.hh:794
X domain_type
The domain type of the preconditioner.
Definition overlappingschwarz.hh:765
TD slu
The type for the subdomain solver in use.
Definition overlappingschwarz.hh:806
TA allocator
The allocator to use.
Definition overlappingschwarz.hh:789
std::vector< subdomain_type, typename std::allocator_traits< TA >::template rebind_alloc< subdomain_type > > subdomain_vector
The vector type containing the subdomain to row index mapping.
Definition overlappingschwarz.hh:797
void pre(X &x, X &b) override
Prepare the preconditioner.
Definition overlappingschwarz.hh:846
std::vector< subdomain_list, typename std::allocator_traits< TA >::template rebind_alloc< subdomain_list > > rowtodomain_vector
The vector type containing the row index to subdomain mapping.
Definition overlappingschwarz.hh:803
matrix_type::size_type size_type
The return type of the size method.
Definition overlappingschwarz.hh:786
Definition overlappingschwarz.hh:694
Tag that the tells the Schwarz method to be additive.
Definition overlappingschwarz.hh:120
Tag that tells the Schwarz method to be multiplicative.
Definition overlappingschwarz.hh:126
Tag that tells the Schwarz method to be multiplicative and symmetric.
Definition overlappingschwarz.hh:133
Exact subdomain solver using Dune::DynamicMatrix<T>::solve.
Definition overlappingschwarz.hh:140
std::remove_const< M >::type matrix_type
The matrix type the preconditioner is for.
Definition overlappingschwarz.hh:149
X::field_type field_type
Definition overlappingschwarz.hh:150
X domain_type
The domain type of the preconditioner.
Definition overlappingschwarz.hh:153
Y range_type
The range type of the preconditioner.
Definition overlappingschwarz.hh:155
void setSubMatrix(const M &BCRS, S &rowset)
Set the data of the local problem.
Definition overlappingschwarz.hh:184
void apply(DynamicVector< field_type > &v, DynamicVector< field_type > &d)
Apply the subdomain solver.
Definition overlappingschwarz.hh:162
std::remove_const< M >::type rilu_type
Definition overlappingschwarz.hh:151
Definition overlappingschwarz.hh:215
matrix_type::size_type size_type
Definition overlappingschwarz.hh:229
X::field_type field_type
Definition overlappingschwarz.hh:226
BCRSMatrix< K, Al > matrix_type
Definition overlappingschwarz.hh:225
Y range_type
Definition overlappingschwarz.hh:227
range_type::block_type block_type
Definition overlappingschwarz.hh:228
S< BCRSMatrix< T, A > >::range_type range_type
Definition overlappingschwarz.hh:315
range_type::block_type block_type
Definition overlappingschwarz.hh:317
range_type::field_type field_type
Definition overlappingschwarz.hh:316
matrix_type::size_type size_type
Definition overlappingschwarz.hh:319
BCRSMatrix< T, A > matrix_type
Definition overlappingschwarz.hh:314
Definition overlappingschwarz.hh:400
matrix_type::size_type size_type
Definition overlappingschwarz.hh:408
Y::field_type field_type
Definition overlappingschwarz.hh:404
Y::block_type block_type
Definition overlappingschwarz.hh:406
OverlappingAssignerHelper(std::size_t maxlength, const M &mat, const Y &b, X &x)
Constructor.
Definition overlappingschwarz.hh:493
OverlappingAssignerHelper(std::size_t maxlength, const M &mat, const Y &b, X &x)
Constructor.
Definition overlappingschwarz.hh:512
Definition overlappingschwarz.hh:520
std::decay_t< decltype(Impl::asVector(std::declval< T >()))>::field_type field_type
Definition overlappingschwarz.hh:526
A::size_type size_type
Definition overlappingschwarz.hh:525
Definition overlappingschwarz.hh:542
A::size_type size_type
Definition overlappingschwarz.hh:547
std::decay_t< decltype(Impl::asVector(std::declval< T >()))>::field_type field_type
Definition overlappingschwarz.hh:548
template meta program for choosing how to add the correction.
Definition overlappingschwarz.hh:572
AdditiveAdder< S, X > Adder
Definition overlappingschwarz.hh:577
MultiplicativeAdder< S, X > Adder
Definition overlappingschwarz.hh:583
MultiplicativeAdder< S, X > Adder
Definition overlappingschwarz.hh:589
Helper template meta program for application of overlapping Schwarz.
Definition overlappingschwarz.hh:605
static solver_iterator begin(solver_vector &sv)
Definition overlappingschwarz.hh:611
solver_vector::iterator solver_iterator
Definition overlappingschwarz.hh:607
static domain_iterator end(const subdomain_vector &sv)
Definition overlappingschwarz.hh:625
subdomain_vector::const_iterator domain_iterator
Definition overlappingschwarz.hh:609
static domain_iterator begin(const subdomain_vector &sv)
Definition overlappingschwarz.hh:620
T2 subdomain_vector
Definition overlappingschwarz.hh:608
static solver_iterator end(solver_vector &sv)
Definition overlappingschwarz.hh:616
T2 subdomain_vector
Definition overlappingschwarz.hh:636
static solver_iterator end(solver_vector &sv)
Definition overlappingschwarz.hh:644
solver_vector::reverse_iterator solver_iterator
Definition overlappingschwarz.hh:635
subdomain_vector::const_reverse_iterator domain_iterator
Definition overlappingschwarz.hh:637
static solver_iterator begin(solver_vector &sv)
Definition overlappingschwarz.hh:639
T1 solver_vector
Definition overlappingschwarz.hh:634
static domain_iterator begin(const subdomain_vector &sv)
Definition overlappingschwarz.hh:648
static domain_iterator end(const subdomain_vector &sv)
Definition overlappingschwarz.hh:653
Helper template meta program for application of overlapping Schwarz.
Definition overlappingschwarz.hh:669
smoother::range_type range_type
Definition overlappingschwarz.hh:671
static void apply(smoother &sm, range_type &v, const range_type &b)
Definition overlappingschwarz.hh:673
static void apply(smoother &sm, range_type &v, const range_type &b)
Definition overlappingschwarz.hh:685
SeqOverlappingSchwarz< M, X, SymmetricMultiplicativeSchwarzMode, TD, TA > smoother
Definition overlappingschwarz.hh:682
smoother::range_type range_type
Definition overlappingschwarz.hh:683
BCRSMatrix< K, Al > matrix_type
Definition overlappingschwarz.hh:702
BCRSMatrix< T, A > matrix_type
Definition overlappingschwarz.hh:713
Definition overlappingschwarz.hh:723
M matrix_type
Definition overlappingschwarz.hh:724
Definition overlappingschwarz.hh:1103
static int size(const Domain &d)
Definition overlappingschwarz.hh:1111
Base class for matrix free definition of preconditioners.
Definition preconditioner.hh:33
@ sequential
Category for sequential solvers.
Definition solvercategory.hh:25
T begin(T... args)
T end(T... args)
T endl(T... args)
T find(T... args)
T for_each(T... args)
T make_pair(T... args)
T max(T... args)
T resize(T... args)
T size(T... args)
T swap(T... args)
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8