LLNL / SAMRAI

Structured Adaptive Mesh Refinement Application Infrastructure - a scalable C++ framework for block-structured AMR application development
https://computing.llnl.gov/projects/samrai
Other
220 stars 80 forks source link

level ghost fill pattern #223

Open nicolasaunai opened 1 year ago

nicolasaunai commented 1 year ago

This is somewhat related to the discussion in #170.

Using a basic schedule

algo->createSchedule(level, level->getNextCoarserHierarchyLevelNumber(), hierarchy),

it seems that the nodes exactly on the border of the coarse-to-fine boundary are overwritten. Even though we provide a VariableFillPattern that explicitly sets overwrite_interior=false.

170 says, calcluateOverlap methods is for overlaps within the same level of resolution.,

so I think what happens is that overlaps for coarse-to-fine areas are found by the Geometry setUpOverlap (?) which disregards our overwrite_interior trick.

I would like not to overwrite level border nodes, and assign only the "real" ghost nodes.

I had the idea of using two schedules, one restricted to the current level, with overwrite_interior set to false. And a second for level borders exclusively, and that would be done by using a PatchLevelBorderFillPattern.

But it seems that this fill pattern also lead to the overwritting of border nodes.

This is not clear to me because the doc says :

The fill boxes will consist of the ghost regions lying outside of the level interior

and comments in the code :

`

I was thus expecting the border node not to be overwritten.

Is that a bug or am I misunderstanding and that fill pattern intends to overwrite the border node? Can you help to adapt that fill pattern to a new one that would only leave real ghost nodes ?