openmc
openmc copied to clipboard
Fix for issue #3158 - Streamline use of CompositeSurface with SurfaceFilter
Description
This is a preliminary solution to issue #3158. The solution b) proposed in the issue was chosen:
- Adding a
CompositeSurfaces.get_surfaces()method that returns a list of the objects surface objects to make it simpler to create the desired filter, leavingSurfaceFilteras-is.
Additionally the following changes were made:
- Added a method that is
get_id_surfaces()to be able to writeCompositeSurfacesurface source files. - Added a preliminary test in tests/unit_tests/test_filters.py.
Fixes #3158
Checklist
- [x] I have performed a self-review of my own code
- [ ] I have run clang-format (version 15) on any C++ source files (if applicable)
- [ ] I have followed the style guidelines for Python source files (if applicable)
- [ ] I have made corresponding changes to the documentation (if applicable)
- [x] I have added tests that prove my fix is effective or that my feature works (if applicable)