Skip to content

Conversation

@ChasingNeutrons
Copy link
Collaborator

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.

Copy link
Member

@valeriaRaffuzzi valeriaRaffuzzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me - it's a good tradeoff in the meantime and hopefully it doesn't break anything down the line in multi-physics.
Could complete the tests, but that's pretty much it.


! Check value
@assertEqual([9.6_defReal, -8.0_defReal, 9.7_defReal], fieldT % at(p), TOL)
@assertEqual([9.6_defReal, -8.0_defReal, 9.7_defReal], fieldT % atP(p), TOL)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one does do both atP and at. It can't be done for the UFS field and WW field though because they only define atP and give a fatalError for at.

ChasingNeutrons and others added 2 commits December 13, 2025 17:15
Co-authored-by: valeriaRaffuzzi <108435337+valeriaRaffuzzi@users.noreply.github.com>
@ChasingNeutrons ChasingNeutrons merged commit 8b7d593 into CambridgeNuclear:main Dec 13, 2025
5 checks passed
@ChasingNeutrons ChasingNeutrons deleted the fixWW branch December 13, 2025 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants