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:
@@ -47,9 +47,11 @@ def main(argv=None) -> int:
|
||||
ap.add_argument("--force-iterative", action="store_true",
|
||||
help="use the iterative solver (AMG-CG, or Jacobi-CG "
|
||||
"without pyamg) regardless of problem size")
|
||||
ap.add_argument("--adaptive", action="store_true",
|
||||
help="solve on the adaptive quadtree grid (coarse "
|
||||
"plane interiors)")
|
||||
ap.add_argument("--adaptive", action=argparse.BooleanOptionalAction,
|
||||
default=None,
|
||||
help="adaptive quadtree grid (coarse plane interiors); "
|
||||
"default: config (on). --no-adaptive forces the "
|
||||
"uniform reference grid")
|
||||
args = ap.parse_args(argv)
|
||||
|
||||
if args.cell_um is not None:
|
||||
@@ -58,8 +60,8 @@ def main(argv=None) -> int:
|
||||
config.INTERACTIVE = False
|
||||
if args.force_iterative:
|
||||
config.SPSOLVE_MAX_UNKNOWNS = 0
|
||||
if args.adaptive:
|
||||
config.ADAPTIVE_CELLS = True
|
||||
if args.adaptive is not None:
|
||||
config.ADAPTIVE_CELLS = args.adaptive
|
||||
|
||||
problem = load_problem(args.dump)
|
||||
if args.strip_buildup:
|
||||
|
||||
Reference in New Issue
Block a user