openmc icon indicating copy to clipboard operation
openmc copied to clipboard

Fix for issue #3158 - Streamline use of CompositeSurface with SurfaceFilter

Open zoeprieto opened this issue 1 year ago • 0 comments

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, leaving SurfaceFilter as-is.

Additionally the following changes were made:

  • Added a method that is get_id_surfaces() to be able to write CompositeSurface surface 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)

zoeprieto avatar Oct 11 '24 17:10 zoeprieto