abort if boundary widht is very wide (>100 points)

Create issue
Issue #1508 closed
Roland Haas created an issue

Currently if a user schedules the routine calling Boundary_RegisterGroupForBC in LEVEL mode (which is the correct mode), cctk_nghostzones is undefined and Carpet fills it with the deadbeef value (666). Passing 666 to Boundary_RegisterGroupForBC leads to silently incorrect results as it often prevents the BC from being applied at all (there is a check in many boundary routines that returns if the domain is too small, presumably to support 1 point wide 1d domains).

The attached patch checks the boundary width requested and aborts if the width is larger than 100. This is the same threshold that the symmetry thorns already use to abort a run.

This prevents a user error (seen it twice so far) and should not as far as I can tell affect any correct code (unless we ever actually encounter a boundary wider than 100 points in which case we are in trouble anyway).

Keyword: Boundary

Comments (5)

  1. Roland Haas reporter
    • removed comment

    We cannot forbid negative values in the "width" argument of SelectGroupForBC since negative values for this are magic and cause the boundary routine to look up the widths from the passed in table. This is documented in Boundary's documentation.tex. We could forbid it in the BOUNDARY_WIDTH table entry but I don't think anyone uses this right now.

  2. Log in to comment