Skip to content

fix(palace): omit BoundaryMode Target when set to auto - #199

Merged
vvahidd merged 1 commit into
mainfrom
fix/boundarymode-target-auto
Jul 26, 2026
Merged

fix(palace): omit BoundaryMode Target when set to auto#199
vvahidd merged 1 commit into
mainfrom
fix/boundarymode-target-auto

Conversation

@vvahidd

@vvahidd vvahidd commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

BoundaryModeConfig.to_palace_config() always emitted "Target", so the documented target=0 ("automatic shift") sentinel reached Palace as Target: 0.0. Palace 0.17.0 declares Solver.BoundaryMode.Target with exclusiveMinimum: 0.0, so schema validation fails and the solver aborts before the solve starts:

At ["Solver"]["BoundaryMode"]["Target"]: instance is below or equals minimum of 0.0
MFEM abort: Configuration file validation failed!

Target is optional — when omitted Palace derives the shift-and-invert target from material properties (k_n = (ω / c_min) × √1.1). So the fix is to guard the key, exactly as MaxSize already is a few lines below.

This only bit newer Palace builds: when BoundaryMode landed the schema had minimum: 0.0 (inclusive), which is why an older locally-built Palace accepts the same config that the released 0.17.0 rejects.

Verified by validating a real failing 2D job config against Palace v0.17.0's config-schema.json (urn:palace:schema:1-0-0): 1 error before, 0 after dropping Target.

Note: tests/palace/test_field_viz.py has 4 failures on this branch, but they reproduce unchanged on main — a pyvista API change removed the algorithm= kwarg from extract_surface(). Unrelated to this PR.

BoundaryModeConfig.to_palace_config() always emitted "Target", so the
documented target=0 ("automatic shift") sentinel reached Palace as
Target: 0.0. Palace 0.17.0 declares Solver.BoundaryMode.Target with
exclusiveMinimum 0.0, so config validation fails and the solver aborts
before the solve starts:

  At ["Solver"]["BoundaryMode"]["Target"]: instance is below or equals
  minimum of 0.0
  MFEM abort: Configuration file validation failed!

Target is optional; when omitted Palace derives the shift from material
properties. Guard the key the same way MaxSize already is.
@github-actions github-actions Bot added the bug Something isn't working label Jul 25, 2026
@vvahidd
vvahidd merged commit a91bf46 into main Jul 26, 2026
13 checks passed
@vvahidd
vvahidd deleted the fix/boundarymode-target-auto branch July 26, 2026 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant