Coupling#201
Open
ChasingNeutrons wants to merge 25 commits into
Open
Conversation
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.
This PR centres around a couplingAdmin, which controls communication with other physics solvers/external scripts. This allows for more standard coupling strategies, i.e., exchanging physics data before full convergence, rather than only at the end of a solve.
The couplingAdmin object is a property of particular physics packages. It is initialised by the input, where it is given a tally, to output, which fields will be updated and where to look for them, the frequency of exchanging data, maximum number of iterations before coupling ceases, etc. The admin does not have a very large interaction with the physics package other than making and attaching a tally and checking whether a physics update should be performed. If it is performed, the tallies associated with the admin are output (and flushed), and the admin waits until it has a signal from another solver/script. Signal is performed by creating/reading a file containing the signal. Nicer strategies can surely be used in future.
While doing this, I implemented a way of flushing tallies and I also fixed a bug that I introduced into the movement subroutines with fields. It is back to not being very elegant, but I don't have any more robust ideas for it at the moment.