This merge request adds the functionality to perform adaptive mesh refinement (AMR) in 2D for the discontinuous Galerkin method with hanging nodes.
At this point we are not feature complete, but the most important basic functionality is implemented. Especially 3D and parallel support is (yet) missing. The implementation is designed with these extensions in mind.
Most important changes:
PrimitiveID tree structure
Extended the internal representation to model tree-like relationships between IDs. Children of IDs can be created, ensuring that no duplicate IDs are created even in parallel settings. This is vital to parallel/distributed AMR. Similar to what is done in walberla's BlockID class but tailored to the requirements in HyTeG.
Macro-primitives can now be refined, creating a hierarchy with potentially hanging nodes. The storage is now organized in a tree-like structure. Methods have been implemented that allow refinement while maintaining a 2:1 balance among neighboring volume macros.
The VolumeDoFFunction has been extended to support the ghost-layer allocation and communication mechanisms required for DG AMR. Also various new indexing functions allow for translation of indices between macro- and micro-refinement levels.
The DGOperator was augmented to take care of correct element integration and ghost-layer accesses so that AMR is now seamlessly integrated into the matrix-vector multiplication and sparse assembly.