class InterGridMap< MeshType >
This class provides a map between two grids which are derived from the same coarse grid. For each cell iterator of the source map, it provides the respective cell iterator on the destination map, through its
Usually, the two grids will be refined differently. Then, the value returned for an iterator on the source grid will be either:
The same cell on the destination grid, if it exists there;
The most refined cell of the destination grid from which the pendant of the source cell could be obtained by refinement. This cell is always active and has a refinement level less than that of the source cell.
Keys for this map are all cells on the source grid, whether active or not.
For example, consider these two one-dimensional grids:
* Grid 1:
* 1 2 3 4
* Grid 2:
* 1 2 3 4
(Cell numbers are only given as an example and will not correspond to real cell iterator's indices.) The mapping from grid 1 to grid 2 will then be as follows:
* Cell on grid 1 Cell on grid 2
* 1 ------------------> 1
* 2 ------------------> 1
* 3 ------------------> 2
* 4 ------------------> mother cell of cells 3 and 4
* (a non-active cell, not shown here)
Besides the mappings shown here, the non-active cells on grid 1 are also valid keys. For example, the mapping for the mother cell of cells 1 and 2 on the first grid will point to cell 1 on the second grid.
- Template Parameters
|MeshType||This class may be used with any class that satisfies the MeshType concept. The extension to other classes offering iterator functions and some minor additional requirements is simple.|
Note that this class could in principle be based on the C++
std::map<Key,Value> data type. Instead, it uses another data format which is more effective both in terms of computing time for access as well as with regard to memory consumption.
In practice, use of this class is as follows:
endc = dof_handler_1.end();
for (; cell!=endc; ++cell)
Note that the template parameters to this class have to be given as
InterGridMap<DoFHandler<2> >, which here is DoFHandler (and could equally well be Triangulation, PersistentTriangulation, or hp::DoFHandler).
- Wolfgang Bangerth, 1999
Definition at line 45 of file dof_tools.h.