Reason
XDG is a library that enables efficient unstructured mesh geometry queries for particle transport codes. A PR was recently opened in OpenMC to add support for XDG-based mesh tallies, showing a substantial improvement in performance vs MOAB unstructured mesh tallies. XDG supports both MOAB and libMesh as mesh backends, offering potential performance improvements compared to the usual libMesh unstructured mesh tallies in Cardinal. A major advantage of using XDG for mesh tallies is support for tracklength estimators, which libMesh tallies do not support. There are some disadvantages to XDG-based mesh tallies. At present they only support meshes containing exclusively TET4 elements, and cannot have a mesh scaling factor applied (this is easy to add once the initial implementation is in-place in OpenMC).
Given the advantages over normal libMesh tallies, support for XDG tallies should be added to Cardinal once the XDG PR is merged into OpenMC. This should be optional as the limitations of XDG mesh tallies are fairly severe for some Cardinal users.
Design
XDG will be added as an optional dependency to Cardinal. This requires modification of the buildsystem to build XDG, and to build/link Embree if either XDG (with the flag ENABLE_XDG=yes) or Double-Down are enabled by the user. At runtime, XDG tally support should be selectable in a MeshTally (with use_xdg=true).
Impact
Mesh tally performance enhancements and support for tracklength estimators in mesh tallies (with some limitations).
Reason
XDG is a library that enables efficient unstructured mesh geometry queries for particle transport codes. A PR was recently opened in OpenMC to add support for XDG-based mesh tallies, showing a substantial improvement in performance vs MOAB unstructured mesh tallies. XDG supports both MOAB and libMesh as mesh backends, offering potential performance improvements compared to the usual libMesh unstructured mesh tallies in Cardinal. A major advantage of using XDG for mesh tallies is support for tracklength estimators, which libMesh tallies do not support. There are some disadvantages to XDG-based mesh tallies. At present they only support meshes containing exclusively TET4 elements, and cannot have a mesh scaling factor applied (this is easy to add once the initial implementation is in-place in OpenMC).
Given the advantages over normal libMesh tallies, support for XDG tallies should be added to Cardinal once the XDG PR is merged into OpenMC. This should be optional as the limitations of XDG mesh tallies are fairly severe for some Cardinal users.
Design
XDG will be added as an optional dependency to Cardinal. This requires modification of the buildsystem to build XDG, and to build/link Embree if either XDG (with the flag
ENABLE_XDG=yes) or Double-Down are enabled by the user. At runtime, XDG tally support should be selectable in aMeshTally(withuse_xdg=true).Impact
Mesh tally performance enhancements and support for tracklength estimators in mesh tallies (with some limitations).