[RL] Add periodic boundary conditions to all grid-based competition modules#403
Open
Lgz-tud wants to merge 5 commits into
Open
[RL] Add periodic boundary conditions to all grid-based competition modules#403Lgz-tud wants to merge 5 commits into
Lgz-tud wants to merge 5 commits into
Conversation
Collaborator
|
Very cool! Do you think it's possible to define the periodic boundary only once? <resources>
<periodic_boundary> True</periodic_boundary>
<aboveground>
<type> Default </type>
</aboveground>
<belowground>
<type> Default </type>
</belowground>
</resources> |
Lgz-tud
added a commit
that referenced
this pull request
May 11, 2026
Read the optional <periodic_boundary> tag once at the <resources> level and propagate it to both above- and below-ground module configs. Defining the tag inside <aboveground> or <belowground> now raises a clear ValueError. Updates docs (ResourceModel, AsymmetricZOI, SymmetricZOI, SaltFeedbackBucket) and migrates the FON_PBC_CI benchmark XML. Addresses review comment in PR #403.
Collaborator
Author
|
Thanks for the suggestion — agreed, defining it once at the level is much cleaner.
|
mcwimm
reviewed
Jun 5, 2026
| "prj_file": args, | ||
| "required": ["type", "domain", "x_1", "x_2", "y_1", "y_2", "x_resolution", "y_resolution"], | ||
| "optional": ["allow_interpolation", "backend_type"], | ||
| "optional": ["allow_interpolation", "backend_type", "periodic_boundary"], |
Collaborator
There was a problem hiding this comment.
Shouldn't "periodic_boundary" be removed from the tag dictionaries of all resource modules?
Move PBC (periodic boundary conditions) support from FON into the shared ResourceModel base class so all grid-based competition modules can reuse it. Changes: - ResourceModel.makeGrid() now stores domain size (_lx, _ly) and parses the optional <periodic_boundary> XML tag - ResourceModel.wrapDistance() applies minimum image convention - FON: refactored to use base class PBC infrastructure - AsymmetricZOI, SymmetricZOI, SaltFeedbackBucket: added PBC support via the new wrapDistance() helper All 53 existing benchmarks pass unchanged.
Update ResourceModel.md, AsymmetricZOI.md, SymmetricZOI.md, and SaltFeedbackBucket.md with periodic_boundary attribute descriptions, usage notes, and XML examples.
Read the optional <periodic_boundary> tag once at the <resources> level and propagate it to both above- and below-ground module configs. Defining the tag inside <aboveground> or <belowground> now raises a clear ValueError. Updates docs (ResourceModel, AsymmetricZOI, SymmetricZOI, SaltFeedbackBucket) and migrates the FON_PBC_CI benchmark XML. Addresses review comment in PR #403.
Match the convention applied in PR #400 (FON.md). Linking to the package path lets users jump directly to the generated documentation.
6afe065 to
da1c2bb
Compare
Since periodic_boundary is now configured once at the <resources> level and injected into every resource module's tag tree by XMLtoProject, the per-module tag dictionaries should no longer list it as an optional tag. Move the responsibility into the base class ResourceModel.getInputParameters, which auto-appends periodic_boundary to the optional list for any sub-class. Addresses Marie's review comment on PR #403.
Collaborator
Author
|
Two changes since @mcwimm last review:
All benchmarks pass. Ready for re-review. |
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.
Summary
Part of #401
ResourceModel.makeGrid()now stores domain size (_lx,_ly) and parses the optional<periodic_boundary>XML tag. NewwrapDistance(dx, dy)method applies the minimum image convention.<periodic_boundary>True</periodic_boundary>in its XML config. Distance calculations are wrapped viawrapDistance().Usage
Add to any grid-based resource module's XML config: