LifeV
|
This class is used to store maps that will be used for block defined problems. More...
#include <MapVector.hpp>
Private Attributes | |
std::vector< map_Type > | M_vector |
Public Types | |
typedef MapType | map_Type |
Type of the map. More... | |
Constructors & Destructor | |
MapVector () | |
Empty constructor. More... | |
MapVector (const MapVector< map_Type > &otherMapVector) | |
Copy constructor. More... | |
MapVector (const map_Type &map) | |
Constructor with one map. More... | |
MapVector (const map_Type &map1, const map_Type &map2) | |
Constructor with two maps. More... | |
MapVector (const MapVector< map_Type > &vector, const map_Type &map) | |
Concatenation constructor. More... | |
~MapVector () | |
Destructor. More... | |
Operators | |
MapVector< map_Type > | operator= (const MapVector< map_Type > &vector) |
Assignement operator. More... | |
const map_Type & | operator[] (UInt i) const |
Access to the ith map (read only) More... | |
map_Type & | operator[] (UInt i) |
Access to the ith map (read-write) More... | |
MapVector< map_Type > | operator| (const map_Type &map) const |
Juxtaposition operator for a vector of maps and a map. More... | |
Methods | |
UInt | nbMap () const |
Returns the number of maps stored. More... | |
UInt | mapSize (UInt i) const |
Returns the size of the ith map stored (global number of ids) More... | |
void | showMe (std::ostream &output=std::cout) const |
Display internal state. More... | |
map_Type | totalMap () const |
Return the map made by concatenating all the maps of the vector. More... | |
void | addMap (const map_Type &newMap) |
Add a map into this vector (at the end of the vector) More... | |
Get Methods | |
const map_Type & | map (const UInt &i) const |
Getter for the ith map stored. More... | |
This class is used to store maps that will be used for block defined problems.
This class consists in a collection of maps (e.g. LifeV::MapEpetra) to represent a problem made of several blocks.
When a system is made of several blocks (like a Stokes problem, with the velocity block and pressure block), one might want to use a block matrix and block vector. This class represents the "map" to construct block structures.
There are two operators to work with the maps: the "+" and the "|" operators. The "+" can be used to fusion two maps to create a bigger map (see the documentation of the related maps). The "|" is used to separate two maps for two different blocks. Starting from two maps (or a map and a vector of maps), it creates a vector of maps.
Between the operators "+" and "|", the "+" has a higher priority, meaning that all the "+" are evaluated before the "|" are. However, it is strongly recommanded to use brackets (some compilers might issue warnings if brackets are not used).
Example of valid template argument
Definition at line 61 of file MapVector.hpp.
typedef MapType map_Type |
Type of the map.
Definition at line 70 of file MapVector.hpp.
MapVector | ( | ) |
Empty constructor.
Definition at line 196 of file MapVector.hpp.
Copy constructor.
otherMapVector | The vector of maps to copy |
Definition at line 202 of file MapVector.hpp.
Constructor with one map.
This constructor builds a MapVector with only the map given in arguement.
map | The map to be put in the vector |
Definition at line 208 of file MapVector.hpp.
Constructor with two maps.
The MapVector is filled with the two maps given in argument.
map1 | The first map of the vector |
map2 | The second map of the vector |
Definition at line 214 of file MapVector.hpp.
Concatenation constructor.
This constructor copies the maps in vector and adds the map to it.
vector | The vector to copy |
map | The map to add to vector |
Definition at line 223 of file MapVector.hpp.
~MapVector | ( | ) |
Destructor.
Definition at line 231 of file MapVector.hpp.
Assignement operator.
Definition at line 241 of file MapVector.hpp.
const MapType & operator[] | ( | UInt | i | ) | const |
Access to the ith map (read only)
Definition at line 250 of file MapVector.hpp.
MapType & operator[] | ( | UInt | i | ) |
Access to the ith map (read-write)
Definition at line 259 of file MapVector.hpp.
Juxtaposition operator for a vector of maps and a map.
Definition at line 268 of file MapVector.hpp.
UInt nbMap | ( | ) | const |
Returns the number of maps stored.
Definition at line 280 of file MapVector.hpp.
Returns the size of the ith map stored (global number of ids)
Definition at line 288 of file MapVector.hpp.
void showMe | ( | std::ostream & | output = std::cout | ) | const |
Display internal state.
Definition at line 297 of file MapVector.hpp.
MapType totalMap | ( | ) | const |
Return the map made by concatenating all the maps of the vector.
Definition at line 305 of file MapVector.hpp.
void addMap | ( | const map_Type & | newMap | ) |
Add a map into this vector (at the end of the vector)
Definition at line 320 of file MapVector.hpp.
const MapType & map | ( | const UInt & | i | ) | const |
Getter for the ith map stored.
Definition at line 332 of file MapVector.hpp.
|
private |
Definition at line 186 of file MapVector.hpp.