Adaptive grid on by default; finer auto cell size under it

ADAPTIVE_CELLS defaults to True (dialog checkbox stays; untick or
--no-adaptive for the uniform reference grid). With the adaptive grid
the auto cell sizer targets TARGET_CELLS_ADAPTIVE (8M fine cells,
~2x finer h) since unknowns no longer scale with the fine cell count -
memory of the masks/field arrays is the new bound.

The test suite pins ADAPTIVE_CELLS off via an autouse conftest fixture:
the exact-value tests define the uniform reference grid; adaptive tests
opt in per test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
janik
2026-07-15 17:57:12 +07:00
parent a2a8a9d702
commit 07ab59baad
7 changed files with 56 additions and 16 deletions
+11
View File
@@ -1,4 +1,15 @@
import os
import sys
import pytest
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
@pytest.fixture(autouse=True)
def _uniform_grid_default(monkeypatch):
"""The exact-value test suite is the UNIFORM reference grid; the
adaptive default (config.ADAPTIVE_CELLS = True) is pinned off here.
Adaptive tests opt back in per test via monkeypatch."""
from fill_resistance import config
monkeypatch.setattr(config, "ADAPTIVE_CELLS", False)