Finite Element Domain Decomposition Library
FEDDLib
Loading...
Searching...
No Matches
BlockMap_decl.hpp
1#ifndef BlockMap_DECL_hpp
2#define BlockMap_DECL_hpp
3
4#include "feddlib/core/FEDDCore.hpp"
5#include "feddlib/core/General/DefaultTypeDefs.hpp"
6#include "MultiVector.hpp"
7
16
17namespace FEDD {
37template <class LO = default_lo, class GO = default_go, class NO = default_no>
38class BlockMap {
39
40public:
41
42 typedef BlockMap<LO,GO,NO> BlockMap_Type;
43 typedef Teuchos::RCP<BlockMap_Type> BlockMapPtr_Type;
44
45 typedef Map<LO,GO,NO> Map_Type;
46 typedef typename Map_Type::MapPtr_Type MapPtr_Type;
47 typedef typename Map_Type::MapConstPtr_Type MapConstPtr_Type;
48
49 typedef typename Map_Type::Comm_Type Comm_Type;
50 typedef typename Map_Type::CommPtr_Type CommPtr_Type;
51 typedef typename Map_Type::CommConstPtr_Type CommConstPtr_Type;
52
53 BlockMap();
54
58 BlockMap(UN size);
59
60 ~BlockMap();
61
62 void resize(UN size);
63
67 void addBlock(MapConstPtr_Type map, int i);
68
70 void merge();
71
72 void print();
73
74 void info();
75
76 std::string getUnderlyingLib( ) const;
77
80 MapConstPtr_Type getMergedMap();
81
84 CommConstPtr_Type getComm();
85
86 CommPtr_Type getCommNonConst();
87
88 MapPtr_Type getBlock(UN i);
89
90 MapConstPtr_Type getBlock(UN i) const;
91
92 UN size() const { return blockMap_.size(); };
93private:
94
95 Teuchos::Array<MapPtr_Type> blockMap_;
96 MapPtr_Type mergedMap_;
97};
98}
99
100#endif
CommConstPtr_Type getComm()
Get underlying communicator.
Definition BlockMap_def.hpp:127
BlockMap(UN size)
Initializing block maps with the size of system (i.e. 2 for Stokes problem). As systems are distribut...
Definition BlockMap_def.hpp:23
void merge()
Merging the map of different blocks together. Relevant for monolithic solving/precondtioning.
Definition BlockMap_def.hpp:55
MapConstPtr_Type getMergedMap()
Getting merged map of block maps.
Definition BlockMap_def.hpp:120
void addBlock(MapConstPtr_Type map, int i)
Adding map to corresponding block i. Block i is row-wise distrubted according to the underlying map.
Definition BlockMap_def.hpp:42
Definition Map_decl.hpp:36
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement.cpp:5