Multipatch: validate fine block before modulo, raw-core GPU checks, README usage
FixedPatchSet2D.fine_layout rejects non-positive, float, bool or wrong-length block sizes with ValueError before any modulo (was ZeroDivisionError/TypeError). The face gap-4 GPU test now checks raw owner cores directly by kind/covered for every patch (ACTIVE finite, OUTER/holes/covered NaN; INNER not asserted), not only the masked download and reversed-order parity. README documents the body-free multipatch call, scope and level-wide fine shape. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0397b6ebb7
commit
6301887093
4 files changed
+47
-5
No files matched your search
@@ -237,7 +237,11 @@ class FixedPatchSet2D:
|
||||
def fine_layout(self, block):
|
||||
"""Sparse non-periodic layout storing exactly the patch supports."""
|
||||
from .blocks import BlockLayout2D
|
||||
by, bx = block
|
||||
block = tuple(block)
|
||||
if len(block) != 2 or any(isinstance(v, (bool, np.bool_)) or not isinstance(v, Integral)
|
||||
or v <= 0 for v in block):
|
||||
raise ValueError("fine block must be two positive integers (by, bx)")
|
||||
by, bx = map(int, block)
|
||||
origins = set()
|
||||
for p in self.patches:
|
||||
y0, x0 = p.fine_level_origin
|
||||
|
||||
Reference in new issue
Block a user