fix(palace): omit BoundaryMode Target when set to auto - #199
Merged
Conversation
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.
vvahidd
requested review from
cdaunt,
flaport,
joamatab and
nikosavola
as code owners
July 25, 2026 04:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BoundaryModeConfig.to_palace_config()always emitted"Target", so the documentedtarget=0("automatic shift") sentinel reached Palace asTarget: 0.0. Palace 0.17.0 declaresSolver.BoundaryMode.TargetwithexclusiveMinimum: 0.0, so schema validation fails and the solver aborts before the solve starts:Targetis 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 asMaxSizealready 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 droppingTarget.Note:
tests/palace/test_field_viz.pyhas 4 failures on this branch, but they reproduce unchanged onmain— a pyvista API change removed thealgorithm=kwarg fromextract_surface(). Unrelated to this PR.