Skip to content

Conversation

@cn-skywalker
Copy link
Contributor

@cn-skywalker cn-skywalker commented Sep 10, 2025

Description

This pull request is a continuation of #3516 .

The original PR by @liangjg introduced a valuable new module, but it had merge conflicts with the latest main branch. I have resolved these conflicts in this branch.

Once this PR is merged, the original PR #3516 can be closed as its work is completed here.

Checklist

  • 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)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)

liangjg and others added 8 commits August 3, 2025 17:13
Updates the documentation for the geometry format to include new
attributes for TRISO particle and virtual lattice handling. These
attributes specify whether a cell contains a TRISO particle, whether
a virtual lattice is used, and the lattice's shape if applicable.
Introduces functionality to calculate distances and locate cells within virtual lattice geometries. Refactors existing geometry handling logic to reduce code duplication and improve maintainability.

Key updates include:
- Addition of `distance_in_virtual_lattice` and `find_cell_in_virtual_lattice` methods for specialized handling.
- Integration of virtual lattice checks in standard cell distance computations.
- Refactoring of repetitive code in surface crossing handlers for improved clarity.

Enhances support for TRISO particle geometries within virtual lattices, ensuring accurate material and cell identification during particle transport.
@cn-skywalker
Copy link
Contributor Author

@paulromano @gridley @amandalund Hi,When I tried to merge this code, I encountered the following errors in the GitHub automatic process :
File "/home/runner/work/openmc/openmc/openmc/lib/core.py", line 143 in calculate_volumes File "/home/runner/work/openmc/openmc/openmc/model/model.py", line 923 in calculate_volumes File "/home/runner/work/openmc/openmc/tests/unit_tests/dagmc/test_model.py", line 144 in test_model_differentiate_depletable_with_dagmc
This is weird because I haven 't changed the calculate_volumes function. And I did not install the dagmc library locally. Is there any suggestion that can help me further locate the error ? I will be very grateful!

@gridley
Copy link
Contributor

gridley commented Oct 25, 2025

According to the CI run, this is a formatting error. Even if you did not change a specific function within a file, if that file was incorrectly formatted before your change (grandfathered in from before CPP formatting was checked), then you change something else, I believe that may be a cause of your problem. However I'm not seeing any changes to core.py in this PR which is unusual.

Firstly I would suggest merging against the main branch or rebasing your changes on it. Secondly, make sure you have clang-format installed (it has to be the exact same version number!) then try running that on all the files that are having an issue. Lastly, this is the type of issue chatgpt or its brethren should be able to solve well, so that would be where I recommend you take any issues next.

Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants