See branch feature/twist-free-alugrid
I am getting closer to complete the twist-free dune-alugrid. It has a lot of changes, but has been rebased to a recent status, so a merge should not be a problem.
- Orientation of 3d cube grids
- write and build from stream
- remove duplicates (not needed)
- rework picture comments/documentation
- periodic elements
Short summary of what happened until now:
- removed all dune2alugrid and similar calls
- removed all twist calls
- replaced the reference element by the dune reference element and all corresponding mappings
- also all topological mappings are now purely dune - there are multiple duplicates
- introduced an isRear_ variable on all classes, that derive from hasFace, that indicates for each face, whether it is rear or front. The only meaning that is has, is to tell whether to choose the rear or front part of the myneighbour structure. Geometric information, such as, where the outer normal points is removed from this variable.
- Also added a method bool isRear(int) which replaces the twist < 0 call in many situations
- changed the macro grid builder to not orientate the faces and calculate twist. Instead the isRear components are now calculated in the gridfactory
- correctElementOrientation in the gridfactory now computes the isRear value of all faces inside each element and also either calls bisectioncompatibility for tetras or the mesh-consistency (from marcel koch) for cubes - this means that recreateboundaryIds now almost always has to be called
- recoded the choice of the refinement edge in bisection based on the previous refinement edges. So we do not store the vtxOrder anymore. Also longest edge bisection is now possible
- adjusted all cube,tetra refinement methods to be twist-free
- started parallelization by adding isRear to the communication as an additional char
Description of the open problems
- Orientation of 3d cube grids
- The algorithm from Marcel Koch yields edge-consistent (i.e. no twists on edges) cube meshes with positive volume. For the implementation we want face-consistent (i.e. no twists on faces, implies edge-consistency) meshes, but we do not get positive volume anymore
- So there are two options: 1. Use the algorithm from marcel and add face-consistency, 2. Rewrite the algorithm myself
- I have added the isRear information to some read/write methods and the backup/restore, but it is still missing somewhere
- Testing is difficult, as the easy cases work
- Write/build grid from stream was disabled during adaptiation of the macro grid builder and the grid factory, because i did not have a test case
- During the process a lot of static information has been duplicated, like from which face to get vertex 0 and similar. This can be removed. Also there are now methods, that always behave the same as there are no more twists. So they could be manually inlined to reduce the code size.
- The pictures for adaptivity and for the mappings are not up to date anymore. I updated some, but not all.
- Periodic elements need to be completely adjusted everywhere throughout both the impl, and 3d folder, as I did not work on them at all. The changes should be very similar to those already done.
- Performance bottlenecks should be identified, if any.