-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Boundary conditions #56
Conversation
- Added structs for Boundary, BoundaryCondition, BoundaryDirection. - Added handling of grid boundary hitting event. - Added hard-coded default behaviour to all engines.
- Improvement of boundary condition structs to work with MCRT. - Fixed bug where boundary hit finding would not be tolerant of rounding. - Integration of boundary condition into engines and MCRT main. - Added supporting ray-plane intersect function to support changes. - Removed dependence of engine and travel upon output grid that stretches across whole domain. Making way for more flexible output in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor comments but otherwise this is a great change - the level of integration with the existing systems is great to see
src/geom/plane.rs
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A test for this function would be nice
Thanks for humoring my nitpicks! Merge away, Sam! |
- Started refactor of output with new `io` module. - Added volume output + tests. - Added plane output + tests.
It makes more sense for the `PhotonCollector` struct to be contained in the output module, so I have moved it there. I have changed references in the code to point to this new location.
This struct is intended as the new central object containing all of the output code for `mcrt`. It contains all of the other outputs. I am in the process of refactoring all of the output structs to work with this. - Added `Output` struct. - Added builder structs which support deserialisation from JSON to allow init from config. - Added supporting structs around output types to deserialise / integrate.
- Output struct in `io` module now implemented. - Added Builder structure to deserialise and build Output. - Added supporting deserialisation, config and builder structs for output types. - Added voxel distance calculation to output volume to support next steps. - Added `OutputRegistry` to support output linking.
This now means that the output parameters can be read in as part of the main JSON5 input for the MCRT software. I had added a redirect here, so it can be included either in the same file, or separate. Also added output section to display.
This function was previously using an invalid min finding iter-chain. It also now sensibly returns f64::INFINITY instead of a None in the case of distance to a voxel being None (no voxel boundaries in path of packet).
This commit adds new the new Output struct to the MCRT executable. Including implementing new types throughout the code and integrating into existing code. Some more specific comments on changes: - Modified engines and `travel` implementation to output into new objects. - Modified `mcrt` exec to use new output object. - Added extra implementations to clone output. - Added placeholder implementations of `Save` for `Output`.
These grids were too large and wouldn't compile on a computer with less RAM. I hadn't forgotten to change this back.
- Added saving to new `Output` struct. - Added saving to output plane struct. - Converted voxel distance measurement in engines to new system. - Fixed bug where killed photons would continue to propagate in all engines.
- Added Display implementations for supporting structs. - Fixed some warnings, mainly due to unneeded imports.
Removed the grid config and replaced with the boundary conditions. Many changes to support these changes. Added structs and types to support deserialisation and building. Integrated into the MCRT binary. Note, this commit breaks the fluorescence engine, but I think we can work around this.
The removal of the `grid` parameter also removed access to a consistent measurement grid over which to index into the shifts map in the fluorescence engine. However, I have engineered an alternate solution which indexes using the bounds of the simulation and takes from the res of the grid, potentially making this solution more flexible.
Implemented boundary conditions. Includes structures, supporting code and basic integration into MCRT code. Also includes some unit tests.