jannisteunissen / octree-mg

MPI geometric multigrid solver for quadtree/octree grids
26 stars 7 forks source link

how is the 2:1 balance implemented #1

Closed Watchmojo closed 1 year ago

Watchmojo commented 1 year ago

Hi

According to the paper on this code, 2:1 balance is imposed. Could you please whice subroutine implemented the 2:1 balance?

Thanks

jannisteunissen commented 1 year ago

Let me clarify: 2:1 balance is supposed to be there when this module is used, as it does not contain routines for adding or removing refinement. When it is coupled to MPI-AMRVAC, it simply uses the mesh from MPI-AMRVAC, which is always 2:1 balanced.

If you are interested in how to achieve 2:1 balance more generally, maybe have a look at the routine ensure_two_one_balance in this other code: https://github.com/MD-CWI/afivo/blob/master/src/m_af_core.f90

Watchmojo commented 1 year ago

Thank you for the clarification. I thought a similar subroutine/mechanism of `ensure_two_one_balance' was included in the octree_mg module.

Thank you for sharing the library.