Skip to content

Resolve merge conflicts for PR #3516 - Implement Virtual Lattice Method for Efficient Simulation of Dispersed Fuels#3566

Open
cn-skywalker wants to merge 14 commits intoopenmc-dev:developfrom
cn-skywalker:virtual_lattice_0.15.2
Open

Resolve merge conflicts for PR #3516 - Implement Virtual Lattice Method for Efficient Simulation of Dispersed Fuels#3566
cn-skywalker wants to merge 14 commits intoopenmc-dev:developfrom
cn-skywalker:virtual_lattice_0.15.2

Conversation

@cn-skywalker
Copy link
Copy Markdown
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 cn-skywalker force-pushed the virtual_lattice_0.15.2 branch 2 times, most recently from 0a29402 to 02fe13b Compare September 27, 2025 15:34
@cn-skywalker
Copy link
Copy Markdown
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
Copy Markdown
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!

@cn-skywalker cn-skywalker reopened this Dec 19, 2025
@shkaald
Copy link
Copy Markdown

shkaald commented Feb 12, 2026

Hi! @cn-skywalker how is it going with this! Really interested in this feature...

@cn-skywalker
Copy link
Copy Markdown
Contributor Author

cn-skywalker commented Feb 12, 2026

Hi @shkaald, this feature has already been implemented and merged into the develop branch. We are currently waiting for the merge approval.

You can directly download and test it from this branch:
https://github.com/cn-skywalker/openmc/tree/virtual_lattice_0.15.2

For the implementation details, please refer to:
[1] Liang J, Li R, Liu Z. Virtual lattice method for efficient Monte Carlo transport simulation of dispersion nuclear fuels[J]. Computer Physics Communications, 2024, 295: 108985. DOI:10.1016/j.cpc.2023.108985.

Feel free to give it a try and let us know if you have any feedback or questions.

@cn-skywalker cn-skywalker force-pushed the virtual_lattice_0.15.2 branch from d6d41c9 to 2b371c6 Compare April 10, 2026 05:24
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.

4 participants