Dune Core Modules (2.4.1)

owneroverlapcopy.hh
Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3#ifndef DUNE_ISTL_OWNEROVERLAPCOPY_HH
4#define DUNE_ISTL_OWNEROVERLAPCOPY_HH
5
6#include <new>
7#include <iostream>
8#include <vector>
9#include <list>
10#include <map>
11#include <set>
12
13#include "cmath"
14
15// MPI header
16#if HAVE_MPI
17#include <mpi.h>
18#endif
19
20
21#include <dune/common/tuples.hh>
23
24#if HAVE_MPI
29#endif
30
31#include "solvercategory.hh"
32#include "istlexception.hh"
35
36template<int dim, template<class,class> class Comm>
37void testRedistributed(int s);
38
39
40namespace Dune {
41
58 {
59 enum AttributeSet {
60 owner=1, overlap=2, copy=3
61 };
62 };
63
75 template <class G, class L>
77 {
78 public:
80 typedef G GlobalIdType;
81
83 typedef L LocalIdType;
84
91 typedef tuple<GlobalIdType,LocalIdType,int> IndexTripel;
98 typedef tuple<int,GlobalIdType,int> RemoteIndexTripel;
99
106 {
107 if (get<2>(x)!=OwnerOverlapCopyAttributeSet::owner &&
108 get<2>(x)!=OwnerOverlapCopyAttributeSet::overlap &&
109 get<2>(x)!=OwnerOverlapCopyAttributeSet::copy)
110 DUNE_THROW(ISTLError,"OwnerOverlapCopyCommunication: global index not in index set");
111 localindices.insert(x);
112 }
113
120 {
121 if (get<2>(x)!=OwnerOverlapCopyAttributeSet::owner &&
122 get<2>(x)!=OwnerOverlapCopyAttributeSet::overlap &&
123 get<2>(x)!=OwnerOverlapCopyAttributeSet::copy)
124 DUNE_THROW(ISTLError,"OwnerOverlapCopyCommunication: global index not in index set");
125 remoteindices.insert(x);
126 }
127
132 const std::set<IndexTripel>& localIndices () const
133 {
134 return localindices;
135 }
136
141 const std::set<RemoteIndexTripel>& remoteIndices () const
142 {
143 return remoteindices;
144 }
145
149 void clear ()
150 {
151 localindices.clear();
152 remoteindices.clear();
153 }
154
155 private:
157 std::set<IndexTripel> localindices;
159 std::set<RemoteIndexTripel> remoteindices;
160 };
161
162
163#if HAVE_MPI
164
171 template <class GlobalIdType, class LocalIdType=int>
173 {
174 template<typename M, typename G, typename L>
175 friend void loadMatrixMarket(M&,
176 const std::string&,
178 bool);
179 // used types
182 typedef typename std::set<IndexTripel>::const_iterator localindex_iterator;
183 typedef typename std::set<RemoteIndexTripel>::const_iterator remoteindex_iterator;
184 typedef typename OwnerOverlapCopyAttributeSet::AttributeSet AttributeSet;
186 public:
190 typedef typename RI::RemoteIndex RX;
192 typedef Dune::Interface IF;
197 protected:
198
199
201 template<typename T>
203 {
204 typedef typename CommPolicy<T>::IndexedType V;
205
206 static V gather(const T& a, std::size_t i)
207 {
208 return a[i];
209 }
210
211 static void scatter(T& a, V v, std::size_t i)
212 {
213 a[i] = v;
214 }
215 };
216 template<typename T>
217 struct AddGatherScatter
218 {
219 typedef typename CommPolicy<T>::IndexedType V;
220
221 static V gather(const T& a, std::size_t i)
222 {
223 return a[i];
224 }
225
226 static void scatter(T& a, V v, std::size_t i)
227 {
228 a[i] += v;
229 }
230 };
231
232 void buildOwnerOverlapToAllInterface () const
233 {
234 if (OwnerOverlapToAllInterfaceBuilt)
235 OwnerOverlapToAllInterface.free();
236 typedef Combine<EnumItem<AttributeSet,OwnerOverlapCopyAttributeSet::owner>,EnumItem<AttributeSet,OwnerOverlapCopyAttributeSet::overlap>,AttributeSet> OwnerOverlapSet;
237 typedef Combine<OwnerOverlapSet,EnumItem<AttributeSet,OwnerOverlapCopyAttributeSet::copy>,AttributeSet> AllSet;
238 OwnerOverlapSet sourceFlags;
239 AllSet destFlags;
240 OwnerOverlapToAllInterface.build(ri,sourceFlags,destFlags);
241 OwnerOverlapToAllInterfaceBuilt = true;
242 }
243
244 void buildOwnerToAllInterface () const
245 {
246 if (OwnerToAllInterfaceBuilt)
247 OwnerToAllInterface.free();
248 OwnerSet sourceFlags;
249 AllSet destFlags;
250 OwnerToAllInterface.build(ri,sourceFlags,destFlags);
251 OwnerToAllInterfaceBuilt = true;
252 }
253
254 void buildOwnerCopyToAllInterface () const
255 {
256 if (OwnerCopyToAllInterfaceBuilt)
257 OwnerCopyToAllInterface.free();
258 typedef Combine<EnumItem<AttributeSet,OwnerOverlapCopyAttributeSet::owner>,EnumItem<AttributeSet,OwnerOverlapCopyAttributeSet::copy>,AttributeSet> OwnerCopySet;
259 typedef Combine<OwnerCopySet,EnumItem<AttributeSet,OwnerOverlapCopyAttributeSet::overlap>,AttributeSet> AllSet;
260 OwnerCopySet sourceFlags;
261 AllSet destFlags;
262 OwnerCopyToAllInterface.build(ri,sourceFlags,destFlags);
263 OwnerCopyToAllInterfaceBuilt = true;
264 }
265
266 void buildOwnerCopyToOwnerCopyInterface () const
267 {
268 if (OwnerCopyToOwnerCopyInterfaceBuilt)
269 OwnerCopyToOwnerCopyInterface.free();
270 typedef Combine<EnumItem<AttributeSet,OwnerOverlapCopyAttributeSet::owner>,EnumItem<AttributeSet,OwnerOverlapCopyAttributeSet::copy>,AttributeSet> OwnerCopySet;
271 OwnerCopySet sourceFlags;
272 OwnerCopySet destFlags;
273 OwnerCopyToOwnerCopyInterface.build(ri,sourceFlags,destFlags);
274 OwnerCopyToOwnerCopyInterfaceBuilt = true;
275 }
276
277 void buildCopyToAllInterface () const
278 {
279 if (CopyToAllInterfaceBuilt)
280 CopyToAllInterface.free();
281 CopySet sourceFlags;
282 AllSet destFlags;
283 CopyToAllInterface.build(ri,sourceFlags,destFlags);
284 CopyToAllInterfaceBuilt = true;
285 }
286
287 public:
288
293 category = set;
294 }
295
301 return category;
302 }
303
304 const CollectiveCommunication<MPI_Comm>& communicator() const
305 {
306 return cc;
307 }
308
315 template<class T>
316 void copyOwnerToAll (const T& source, T& dest) const
317 {
318 if (!OwnerToAllInterfaceBuilt)
319 buildOwnerToAllInterface ();
320 BC communicator;
321 communicator.template build<T>(OwnerToAllInterface);
322 communicator.template forward<CopyGatherScatter<T> >(source,dest);
323 communicator.free();
324 }
325
332 template<class T>
333 void copyCopyToAll (const T& source, T& dest) const
334 {
335 if (!CopyToAllInterfaceBuilt)
336 buildCopyToAllInterface ();
337 BC communicator;
338 communicator.template build<T>(CopyToAllInterface);
339 communicator.template forward<CopyGatherScatter<T> >(source,dest);
340 communicator.free();
341 }
342
349 template<class T>
350 void addOwnerOverlapToAll (const T& source, T& dest) const
351 {
352 if (!OwnerOverlapToAllInterfaceBuilt)
353 buildOwnerOverlapToAllInterface ();
354 BC communicator;
355 communicator.template build<T>(OwnerOverlapToAllInterface);
356 communicator.template forward<AddGatherScatter<T> >(source,dest);
357 communicator.free();
358 }
359
366 template<class T>
367 void addOwnerCopyToAll (const T& source, T& dest) const
368 {
369 if (!OwnerCopyToAllInterfaceBuilt)
370 buildOwnerCopyToAllInterface ();
371 BC communicator;
372 communicator.template build<T>(OwnerCopyToAllInterface);
373 communicator.template forward<AddGatherScatter<T> >(source,dest);
374 communicator.free();
375 }
376
383 template<class T>
384 void addOwnerCopyToOwnerCopy (const T& source, T& dest) const
385 {
386 if (!OwnerCopyToOwnerCopyInterfaceBuilt)
387 buildOwnerCopyToOwnerCopyInterface ();
388 BC communicator;
389 communicator.template build<T>(OwnerCopyToOwnerCopyInterface);
390 communicator.template forward<AddGatherScatter<T> >(source,dest);
391 communicator.free();
392 }
393
394
402 template<class T1, class T2>
403 void dot (const T1& x, const T1& y, T2& result) const
404 {
405 // set up mask vector
406 if (mask.size()!=static_cast<typename std::vector<double>::size_type>(x.size()))
407 {
408 mask.resize(x.size());
409 for (typename std::vector<double>::size_type i=0; i<mask.size(); i++)
410 mask[i] = 1;
411 for (typename PIS::const_iterator i=pis.begin(); i!=pis.end(); ++i)
412 if (i->local().attribute()!=OwnerOverlapCopyAttributeSet::owner)
413 mask[i->local().local()] = 0;
414 }
415 result = T2(0.0);
416
417 for (typename T1::size_type i=0; i<x.size(); i++)
418 result += x[i]*(y[i])*mask[i];
419 result = cc.sum(result);
420 return;
421 }
422
429 template<class T1>
430 double norm (const T1& x) const
431 {
432 // set up mask vector
433 if (mask.size()!=static_cast<typename std::vector<double>::size_type>(x.size()))
434 {
435 mask.resize(x.size());
436 for (typename std::vector<double>::size_type i=0; i<mask.size(); i++)
437 mask[i] = 1;
438 for (typename PIS::const_iterator i=pis.begin(); i!=pis.end(); ++i)
439 if (i->local().attribute()!=OwnerOverlapCopyAttributeSet::owner)
440 mask[i->local().local()] = 0;
441 }
442 typename T1::field_type result = typename T1::field_type(0.0);
443 for (typename T1::size_type i=0; i<x.size(); i++)
444 result += x[i].two_norm2()*mask[i];
445 return static_cast<double>(sqrt(cc.sum(result)));
446 }
447
449
452
455
459
465 {
466 return pis;
467 }
468
474 {
475 return ri;
476 }
477
483 {
484 return pis;
485 }
486
487
493 {
494 return ri;
495 }
496
497 void buildGlobalLookup()
498 {
499 if(globalLookup_) {
500 if(pis.seqNo()==oldseqNo)
501 // Nothing changed!
502 return;
503 delete globalLookup_;
504 }
505
506 globalLookup_ = new GlobalLookupIndexSet(pis);
507 oldseqNo = pis.seqNo();
508 }
509
510 void buildGlobalLookup(std::size_t size)
511 {
512 if(globalLookup_) {
513 if(pis.seqNo()==oldseqNo)
514 // Nothing changed!
515 return;
516 delete globalLookup_;
517 }
518 globalLookup_ = new GlobalLookupIndexSet(pis, size);
519 oldseqNo = pis.seqNo();
520 }
521
522 void freeGlobalLookup()
523 {
524 delete globalLookup_;
525 globalLookup_=0;
526 }
527
528 const GlobalLookupIndexSet& globalLookup() const
529 {
530 assert(globalLookup_ != 0);
531 return *globalLookup_;
532 }
533
539 template<class T1>
540 void project (T1& x) const
541 {
542 for (typename PIS::const_iterator i=pis.begin(); i!=pis.end(); ++i)
543 if (i->local().attribute()==OwnerOverlapCopyAttributeSet::copy)
544 x[i->local().local()] = 0;
545 }
546
558 bool freecomm_ = false)
559 : comm(comm_), cc(comm_), pis(), ri(pis,pis,comm_),
560 OwnerToAllInterfaceBuilt(false), OwnerOverlapToAllInterfaceBuilt(false),
561 OwnerCopyToAllInterfaceBuilt(false), OwnerCopyToOwnerCopyInterfaceBuilt(false),
562 CopyToAllInterfaceBuilt(false), globalLookup_(0), category(cat_),
563 freecomm(freecomm_)
564 {}
565
575 : comm(MPI_COMM_WORLD), cc(MPI_COMM_WORLD), pis(), ri(pis,pis,MPI_COMM_WORLD),
576 OwnerToAllInterfaceBuilt(false), OwnerOverlapToAllInterfaceBuilt(false),
577 OwnerCopyToAllInterfaceBuilt(false), OwnerCopyToOwnerCopyInterfaceBuilt(false),
578 CopyToAllInterfaceBuilt(false), globalLookup_(0), category(cat_), freecomm(false)
579 {}
580
589 MPI_Comm comm_,
591 bool freecomm_ = false)
592 : comm(comm_), cc(comm_), OwnerToAllInterfaceBuilt(false),
593 OwnerOverlapToAllInterfaceBuilt(false), OwnerCopyToAllInterfaceBuilt(false),
594 OwnerCopyToOwnerCopyInterfaceBuilt(false), CopyToAllInterfaceBuilt(false),
595 globalLookup_(0), category(cat_), freecomm(freecomm_)
596 {
597 // set up an ISTL index set
598 pis.beginResize();
599 for (localindex_iterator i=indexinfo.localIndices().begin(); i!=indexinfo.localIndices().end(); ++i)
600 {
601 if (get<2>(*i)==OwnerOverlapCopyAttributeSet::owner)
602 pis.add(get<0>(*i),LI(get<1>(*i),OwnerOverlapCopyAttributeSet::owner,true));
603 if (get<2>(*i)==OwnerOverlapCopyAttributeSet::overlap)
604 pis.add(get<0>(*i),LI(get<1>(*i),OwnerOverlapCopyAttributeSet::overlap,true));
605 if (get<2>(*i)==OwnerOverlapCopyAttributeSet::copy)
606 pis.add(get<0>(*i),LI(get<1>(*i),OwnerOverlapCopyAttributeSet::copy,true));
607 // std::cout << cc.rank() << ": adding index " << get<0>(*i) << " " << get<1>(*i) << " " << get<2>(*i) << std::endl;
608 }
609 pis.endResize();
610
611 // build remote indices WITHOUT communication
612 // std::cout << cc.rank() << ": build remote indices" << std::endl;
613 ri.setIndexSets(pis,pis,cc);
614 if (indexinfo.remoteIndices().size()>0)
615 {
616 remoteindex_iterator i=indexinfo.remoteIndices().begin();
617 int p = get<0>(*i);
618 RILM modifier = ri.template getModifier<false,true>(p);
619 typename PIS::const_iterator pi=pis.begin();
620 for ( ; i!=indexinfo.remoteIndices().end(); ++i)
621 {
622 // handle processor change
623 if (p!=get<0>(*i))
624 {
625 p = get<0>(*i);
626 modifier = ri.template getModifier<false,true>(p);
627 pi=pis.begin();
628 }
629
630 // position to correct entry in parallel index set
631 while (pi->global()!=get<1>(*i) && pi!=pis.end())
632 ++pi;
633 if (pi==pis.end())
634 DUNE_THROW(ISTLError,"OwnerOverlapCopyCommunication: global index not in index set");
635
636 // insert entry
637 // std::cout << cc.rank() << ": adding remote index " << get<0>(*i) << " " << get<1>(*i) << " " << get<2>(*i) << std::endl;
638 if (get<2>(*i)==OwnerOverlapCopyAttributeSet::owner)
639 modifier.insert(RX(OwnerOverlapCopyAttributeSet::owner,&(*pi)));
640 if (get<2>(*i)==OwnerOverlapCopyAttributeSet::overlap)
641 modifier.insert(RX(OwnerOverlapCopyAttributeSet::overlap,&(*pi)));
642 if (get<2>(*i)==OwnerOverlapCopyAttributeSet::copy)
643 modifier.insert(RX(OwnerOverlapCopyAttributeSet::copy,&(*pi)));
644 }
645 }else{
646 // Force remote indices to be synced!
647 ri.template getModifier<false,true>(0);
648 }
649 }
650
651 // destructor: free memory in some objects
653 {
654 ri.free();
655 if (OwnerToAllInterfaceBuilt) OwnerToAllInterface.free();
656 if (OwnerOverlapToAllInterfaceBuilt) OwnerOverlapToAllInterface.free();
657 if (OwnerCopyToAllInterfaceBuilt) OwnerCopyToAllInterface.free();
658 if (OwnerCopyToOwnerCopyInterfaceBuilt) OwnerCopyToOwnerCopyInterface.free();
659 if (CopyToAllInterfaceBuilt) CopyToAllInterface.free();
660 if (globalLookup_) delete globalLookup_;
661 if (freecomm==true)
662 if(comm!=MPI_COMM_NULL)
663 {
664#ifdef MPI_2
665 // If it is possible to query whether MPI_Finalize
666 // was called, only free the communicator before
667 // calling MPI_Finalize.
668 int wasFinalized = 0;
669 MPI_Finalized( &wasFinalized );
670 if(!wasFinalized)
671#endif
672 MPI_Comm_free(&comm);
673 }
674 }
675
676 private:
678 {}
679 MPI_Comm comm;
680 CollectiveCommunication<MPI_Comm> cc;
681 PIS pis;
682 RI ri;
683 mutable IF OwnerToAllInterface;
684 mutable bool OwnerToAllInterfaceBuilt;
685 mutable IF OwnerOverlapToAllInterface;
686 mutable bool OwnerOverlapToAllInterfaceBuilt;
687 mutable IF OwnerCopyToAllInterface;
688 mutable bool OwnerCopyToAllInterfaceBuilt;
689 mutable IF OwnerCopyToOwnerCopyInterface;
690 mutable bool OwnerCopyToOwnerCopyInterfaceBuilt;
691 mutable IF CopyToAllInterface;
692 mutable bool CopyToAllInterfaceBuilt;
693 mutable std::vector<double> mask;
694 int oldseqNo;
695 GlobalLookupIndexSet* globalLookup_;
697 bool freecomm;
698 };
699
700#endif
701
702
705} // end namespace
706
707#endif
A set containing everything.
Definition: enumset.hh:43
A communicator that uses buffers to gather and scatter the data to be send or received.
Definition: communicator.hh:452
void free()
Free the allocated memory (i.e. buffers and message information.
Specialization of CollectiveCommunication for MPI.
Definition: mpicollectivecommunication.hh:146
T sum(T &in) const
Compute the sum of the argument over all processes and return the result in every process....
Definition: mpicollectivecommunication.hh:179
A set combining two other sets.
Definition: enumset.hh:110
A constant random access iterator for the Dune::ArrayList class.
Definition: arraylist.hh:379
A set consisting only of one item.
Definition: enumset.hh:60
derive error class from the base class in common
Definition: istlexception.hh:16
Information about the index distribution.
Definition: owneroverlapcopy.hh:77
tuple< GlobalIdType, LocalIdType, int > IndexTripel
A triple describing a local index.
Definition: owneroverlapcopy.hh:91
void addRemoteIndex(const RemoteIndexTripel &x)
Add a new remote index triple to the set of remote indices.
Definition: owneroverlapcopy.hh:119
G GlobalIdType
The type of the global index.
Definition: owneroverlapcopy.hh:80
const std::set< IndexTripel > & localIndices() const
Get the set of indices local to the process.
Definition: owneroverlapcopy.hh:132
const std::set< RemoteIndexTripel > & remoteIndices() const
Get the set of remote indices.
Definition: owneroverlapcopy.hh:141
L LocalIdType
The type of the local index.
Definition: owneroverlapcopy.hh:83
void clear()
Remove all indices from the sets.
Definition: owneroverlapcopy.hh:149
tuple< int, GlobalIdType, int > RemoteIndexTripel
A triple describing a remote index.
Definition: owneroverlapcopy.hh:98
void addLocalIndex(const IndexTripel &x)
Add a new index triple to the set of local indices.
Definition: owneroverlapcopy.hh:105
Communication interface between remote and local indices.
Definition: interface.hh:207
A class setting up standard communication for a two-valued attribute set with owner/overlap/copy sema...
Definition: owneroverlapcopy.hh:173
OwnerOverlapCopyCommunication(const IndexInfoFromGrid< GlobalIdType, LocalIdType > &indexinfo, MPI_Comm comm_, SolverCategory::Category cat_=SolverCategory::overlapping, bool freecomm_=false)
Constructor.
Definition: owneroverlapcopy.hh:588
double norm(const T1 &x) const
Compute the global euclidian norm of a vector.
Definition: owneroverlapcopy.hh:430
void addOwnerCopyToOwnerCopy(const T &source, T &dest) const
Communicate values from owner and copy data points to owner and copy data points and add them to thos...
Definition: owneroverlapcopy.hh:384
RemoteIndices & remoteIndices()
Get the underlying remote indices.
Definition: owneroverlapcopy.hh:492
const ParallelIndexSet & indexSet() const
Get the underlying parallel index set.
Definition: owneroverlapcopy.hh:464
void addOwnerOverlapToAll(const T &source, T &dest) const
Communicate values from owner data points to all other data points and add them to those values.
Definition: owneroverlapcopy.hh:350
Dune::RemoteIndices< PIS > RemoteIndices
The type of the remote indices.
Definition: owneroverlapcopy.hh:454
void project(T1 &x) const
Set vector to zero at copy dofs.
Definition: owneroverlapcopy.hh:540
void copyCopyToAll(const T &source, T &dest) const
Communicate values from copy data points to all other data points.
Definition: owneroverlapcopy.hh:333
Dune::GlobalLookupIndexSet< ParallelIndexSet > GlobalLookupIndexSet
The type of the reverse lookup of indices.
Definition: owneroverlapcopy.hh:458
OwnerOverlapCopyCommunication(MPI_Comm comm_, SolverCategory::Category cat_=SolverCategory::overlapping, bool freecomm_=false)
Construct the communication without any indices.
Definition: owneroverlapcopy.hh:556
ParallelIndexSet & indexSet()
Get the underlying parallel index set.
Definition: owneroverlapcopy.hh:482
void dot(const T1 &x, const T1 &y, T2 &result) const
Compute a global dot product of two vectors.
Definition: owneroverlapcopy.hh:403
OwnerOverlapCopyCommunication(SolverCategory::Category cat_=SolverCategory::overlapping)
Construct the communication without any indices using MPI_COMM_WORLD.
Definition: owneroverlapcopy.hh:574
void setSolverCategory(SolverCategory set)
Set right Solver Category (default is overlapping).
Definition: owneroverlapcopy.hh:292
void copyOwnerToAll(const T &source, T &dest) const
Communicate values from owner data points to all other data points.
Definition: owneroverlapcopy.hh:316
const RemoteIndices & remoteIndices() const
Get the underlying remote indices.
Definition: owneroverlapcopy.hh:473
friend void loadMatrixMarket(M &, const std::string &, OwnerOverlapCopyCommunication< G, L > &, bool)
Load a parallel matrix/vector stored in matrix market format.
Definition: matrixmarket.hh:1031
void addOwnerCopyToAll(const T &source, T &dest) const
Communicate values from owner and copy data points to all other data points and add them to those val...
Definition: owneroverlapcopy.hh:367
SolverCategory::Category getSolverCategory() const
Get Solver Category.
Definition: owneroverlapcopy.hh:300
Dune::ParallelIndexSet< GlobalIdType, LI, 512 > ParallelIndexSet
The type of the parallel index set.
Definition: owneroverlapcopy.hh:451
An index present on the local process with an additional attribute flag.
Definition: plocalindex.hh:47
Modifier for adding and/or deleting remote indices from the remote index list.
Definition: remoteindices.hh:544
void insert(const RemoteIndex &index)
Insert an index to the list.
Definition: remoteindices.hh:1606
Information about an index residing on another processor.
Definition: remoteindices.hh:66
void setIndexSets(const ParallelIndexSet &source, const ParallelIndexSet &destination, const MPI_Comm &comm, const std::vector< int > &neighbours=std::vector< int >())
Set the index sets and communicator we work with.
Definition: remoteindices.hh:973
void free()
Free the index lists.
Definition: remoteindices.hh:1423
Implements an utility class that provides collective communication methods for sequential programs.
Provides utility classes for syncing distributed data via MPI communication.
Classes for building sets out of enumeration values.
void beginResize()
Indicate that the index set is to be resized.
void build(const R &remoteIndices, const T1 &sourceFlags, const T2 &destFlags)
Builds the interface.
Definition: interface.hh:459
void add(const GlobalIndex &global)
Add an new index to the set.
iterator begin()
Get an iterator over the indices positioned at the first index.
iterator end()
Get an iterator over the indices positioned after the last index.
void endResize()
Indicate that the resizing finishes.
int seqNo() const
Get the internal sequence number.
void free()
Frees memory allocated during the build.
Definition: interface.hh:490
#define DUNE_THROW(E, m)
Definition: exceptions.hh:243
Provides a map between global and local indices.
Provides classes for reading and writing MatrixMarket Files with an extension for parallel matrices.
Implements an utility class that provides MPI's collective communication methods.
Dune namespace.
Definition: alignment.hh:10
Classes describing a distributed indexset.
V::value_type IndexedType
The type we get at each index with operator[].
Definition: communicator.hh:139
Attribute set for overlapping schwarz.
Definition: owneroverlapcopy.hh:58
gather/scatter callback for communcation
Definition: owneroverlapcopy.hh:203
Categories for the solvers.
Definition: solvercategory.hh:18
Category
Definition: solvercategory.hh:19
@ overlapping
Category for ovelapping solvers.
Definition: solvercategory.hh:25
Fallback implementation of the std::tuple class.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 22, 23:30, 2024)