I am working on implementation of AMR for my finite volume code. Let me use a 2-D mesh to describe my question.
Starting with SINGLE initial cell (let the mesh refine level k = 0) as a root of a quad-tree, and keeping splitting the cell into 4, 16, 64... sub-cells for k = 1, 2, 3...during refinement is simple and works well for a SQUARE domain (length:width = 1:1) (case 1 in the figure).
What if the mesh domain is a RECTANGLE domain (aspect ratio > 1, e.g., cases 2)? In this case, quartering of the initial prolate cell can only generate more prolate sub-cells, which is bad because almost all numerical methods (FDM/FVM/FEM) favor a mesh formed from (near) square cells.
To avoid aspect ratio issue during refinement, I think of using a forest with MORE initial cells (case 3). In this mothed, combined data structures of array and quad-tree is used, and features
- initial generation of a coarse mesh to fit the domain (aspect ratio of which can be >>1), with square cells (or cell with aspect ratio ~1) which then serve as roots of quad-tree of its sub-cells;
- the root cells forming the initial coarse mesh can be stored in a array with number of cells kept constant;
- sub-cells are stored in a quad-tree under each of the root cells above, and can be frequently added/removed during AMR.
Pros: easier to fit domain with any aspect ratio.
Cons: more complex traverse of cells/sub-cells.
Is my solution practicable? Any suggetion?