Field interface to accept particles or coords #182
Merged
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.
The interface of the field was changed in the creation of Weight Windows/Uniform Fission Sites. This complicates using fields in geometry as it requires sending particle information into geometry, which makes it complicated to use, e.g., pieceConstantFields during tracking.
This proposal expands the field interface to allow them to accept both coordinates (in their original spirit) and particles (maintaining their use in support of WWs and UFS). This adds an 'atP' function to get the field value at the phase space coordinates of the particle, rather than just at the position.
There might be some other alternative where, e.g., a WW object is defined containing an energy map over fields. I'm not against that being considered in future, but I think this is reasonable to enable multiphysics meanwhile.