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.
Ok, here is a first attempt. I have nearly certainly forgotten some important things. I apologise that this is a big one. Please give brutal comments, especially on the structure.
I've tried to rewrite random ray mostly to be more easily extensible to the several variants we will want to have in future. This should also allow reusing machinery that is common to eigenvalue and fixed source calculations. As such, there are some placeholders for future modification and for fixed source.
This has resulted in a much leaner physics package. However, there are three meaningfully new files. First is dataRR - this basically holds nuclear data in a way which is convenient for RR (e.g., facilitating vectorisation) with access procedures. Second is rayHandling - this does things like placing rays in the geometry (perhaps this could be done more neatly using a uniform source for sampling), moving rays, and doing the transport sweep. Finally, and most significantly, is arraysRR. This contains all of the arrays which are necessary for a random ray calculation: current flux, previous flux, accumulated flux, source, etc. This is where most of the action is - normalising fluxes, calculating sources, accumulating fluxes, calculating k; anything that means walking over all of the arrays.
As we discussed, I also modified the physics packages to allow for neat integration tests.
There are also a few other modifications, such as moving slice/voxelPlot from geometry to visualiser.
If the shape looks decent I'll add in the documentation.