Reduction weight anomaly when using zero CoordBase::boundary_shiftout_*

Create issue
Issue #1221 new
Eloisa Bentivegna created an issue

When using a refinement level that covers the entire grid, and setting the CoordBase::boundary_shiftout_* parameters to zero, the following warning appears:

INFO (CarpetReduce): Simulation domain volume: 8000 INFO (CarpetReduce): Additional excised volume: 0 INFO (CarpetReduce): Reduction weight sum: 9141 WARNING level 1 in thorn CarpetReduce processor 0 host socket.local (line 137 of /Users/bennie/CactusTrees/TrueAMR/arrangements/Carpet/CarpetReduce/src/mask_test.c): -> Simulation domain volume and reduction weight sum differ

This can be reproduced using the attached parameter file. The problem seems to arise at the boundaries of the restricted region: I would expect the coarse grid to carry zero reduction weight everywhere (as it does if the shiftout is one), but the boundaries have a non-zero weight instead, which leads to double counting, and hence the difference between domain volume and weight sum.


Comments (13)

  1. Erik Schnetter
    • removed comment

    I believe this issue is unrelated to #1222. Looking at the weights, I see the effect you describe: coarse grid outer boundaries have non-zero weight where fine grid boundaries also have non-zero weight. This seems to be an error in setting up the boundary weights, which apparently doesn't take refined grids correctly into account.

  2. Erik Schnetter
    • removed comment

    After investigating, the reason for this problem seems to be that the regions do not "wrap around". That is, a fine grid abutting the right boundary does not influence the left boundary of the domain. To remedy this, one would need to teach the weight setup explicitly about periodic boundaries.

    Can you switch to cell centred grids? Would this work for you? These should not have this problems.

  3. Eloisa Bentivegna reporter
    • removed comment

    Yes, this problem occurs whether periodic boundaries are involved or not.

    I'm not sure cell-centred grids would work for me (possibly yes). It would be nice if the issue with the vertex-centred ones was solved though. Can I help in any way?

  4. Erik Schnetter
    • removed comment

    I believe now that the issue is simply that fine grid boundaries not taken into account when setting the weight for coarse grid boundaries. Thus coarse grid boundaries always have non-zero weight. This is probably a left-over assumption from when the fine grid was never near a boundary.

    If that is the case, then addressing it will be non-trivial.

  5. Eloisa Bentivegna reporter
    • removed comment

    I see. An observation is that the behavior is completely correct when using a shiftout of one (in that case all the coarse grid points are masked out), so perhaps it's not so hard to find out where this parameter makes a difference and fix it. I briefly attempted doing this before opening the ticket, but with no success. I'll give it another try.

  6. Erik Schnetter
    • removed comment

    I'm afraid it is not simple. With a shiftout of 1, this issue does not arise. If my reading of the code is correct, then we need to introduce a completely new mechanism for this, starting in CarpetLib/src/

  7. Eloisa Bentivegna reporter
    • removed comment

    OK. I'll consider switching to cell-centred grids, but I may return on this later.

  8. Erik Schnetter
    • removed comment

    Eloisa: Is this still an issue (if you use cell-centred grids)?

    Frank: No, this requires a non-trivial calculation to be corrected. This involves a special case that only occurs for periodic boundaries (vertex centring with boundary_shiftout=0).

  9. Eloisa Bentivegna reporter
    • removed comment

    I haven't tried cell-centred grids yet. In any case, I would leave this ticket open as a low-priority enhancement request, rather than closing it and forgetting about the fact that this setup is not supported.

  10. Log in to comment