#include <LocalToGlobalMap.h>
|
| static constexpr int | RankGlobalTreeNumber = -1 |
| |
| static constexpr int | NoDegreeOfFreedom = -1 |
| | Is used by enumeration such that boundary Dirichlet points, for example, have a properly initialised number, even though they do not carry an unknown.
|
| |
Definition at line 20 of file LocalToGlobalMap.h.
◆ Type
◆ LocalToGlobalMap()
Creates an empty map for tree treeNumber.
The code creates one global map per rank. This one has the tree number -1 tied to it. Afterwards, the code runs through its local subdomains. For this, each observer/sweep creates an instance of this object, builds up its local map. After that, they merge() this local map into the global one.
- Parameters
-
| treeNumber | Number of tree where this map is constructed or RankGlobalTreeNumber if it is the global map on this rank |
◆ computeLocalToGlobalMap()
| void petsc::LocalToGlobalMap::computeLocalToGlobalMap |
( |
| ) |
|
Compute global to local map.
This operation is called once after all the indices are handed out.
◆ getGlobalIndex()
| int petsc::LocalToGlobalMap::getGlobalIndex |
( |
const std::pair< int, int > & |
index, |
|
|
Type |
type |
|
) |
| |
Maps the local index onto a global index.
Pass in the combination of tree number and local index and return the global index according to the map.
◆ getIndicesPerSubtree()
| int petsc::LocalToGlobalMap::getIndicesPerSubtree |
( |
int |
treeNumber | ) |
const |
should only be called from main tree, ie with treenumber = -1
- Parameters
-
| Number | of tree where this map is constructed. |
- Returns
- the number of vertices within the tree labelled treeNumber
◆ getTotalNumberOfCells()
| int petsc::LocalToGlobalMap::getTotalNumberOfCells |
( |
| ) |
const |
◆ getTotalNumberOfIndices()
| int petsc::LocalToGlobalMap::getTotalNumberOfIndices |
( |
| ) |
const |
◆ getTreeNumber()
| int petsc::LocalToGlobalMap::getTreeNumber |
( |
| ) |
const |
◆ increaseCountOfFacetType()
| void petsc::LocalToGlobalMap::increaseCountOfFacetType |
( |
Type |
type, |
|
|
int |
count |
|
) |
| |
◆ merge()
Merge two maps.
This operation accepts a second map, and merges otherMap into the local map. Usually, the method is called for map -1, i.e. the map that is held for the rank as a whole and is given the map of a subdomain.
We add an argument of "Type", an enum that denotes which kind of L2GM we are merging in. So, in the global map, we keep a count of how many vertices, cells and faces we saw.
This will allow us to later enumerate the facets one after another.
◆ reserveIndex()
| int petsc::LocalToGlobalMap::reserveIndex |
( |
int |
cardinality | ) |
|
Reserve some indices for unknowns and return the first one.
◆ setTreeNumber()
| void petsc::LocalToGlobalMap::setTreeNumber |
( |
int |
treeNumber | ) |
|
◆ _indicesPerSubtree
| std::map<int,int> petsc::LocalToGlobalMap::_indicesPerSubtree |
|
private |
keeps track of the number of indices per subtree.
used for computing local to global map.
Definition at line 133 of file LocalToGlobalMap.h.
◆ _log
◆ _numberOfCells
| int petsc::LocalToGlobalMap::_numberOfCells |
|
private |
◆ _numberOfFaces
| int petsc::LocalToGlobalMap::_numberOfFaces |
|
private |
◆ _numberOfSubtrees
| int petsc::LocalToGlobalMap::_numberOfSubtrees |
|
private |
◆ _numberOfVertices
| int petsc::LocalToGlobalMap::_numberOfVertices |
|
private |
◆ _totalNumberOfIndices
| int petsc::LocalToGlobalMap::_totalNumberOfIndices |
|
private |
◆ _treeNumber
| int petsc::LocalToGlobalMap::_treeNumber |
|
private |
◆ NoDegreeOfFreedom
| constexpr int petsc::LocalToGlobalMap::NoDegreeOfFreedom = -1 |
|
staticconstexpr |
Is used by enumeration such that boundary Dirichlet points, for example, have a properly initialised number, even though they do not carry an unknown.
Definition at line 34 of file LocalToGlobalMap.h.
◆ RankGlobalTreeNumber
| constexpr int petsc::LocalToGlobalMap::RankGlobalTreeNumber = -1 |
|
staticconstexpr |
The documentation for this class was generated from the following file: