Skip to content

Bank surface source particles in all active cycles - #2592

Merged
paulromano merged 8 commits into
openmc-dev:developfrom
paulromano:surface-source-fix
Jul 14, 2023
Merged

paulromano merged 8 commits into
openmc-dev:developfrom
paulromano:surface-source-fix

Conversation

@paulromano

Copy link
Copy Markdown
Contributor

Description

Replaces #2505. @marquezj I tried to make a quick fix on your branch for the failing test (had to do with how many MPI processes were used) but ended up screwing things up. So sorry about that!!

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format 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)

@paulromano
paulromano requested a review from gridley July 11, 2023 18:06

@gridley gridley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just some optional suggestions.

Comment thread include/openmc/shared_array.h Outdated
Comment thread src/particle.cpp
if (surf->surf_source_ && simulation::current_batch == settings::n_batches) {
if (surf->surf_source_ && simulation::current_batch > settings::n_inactive &&
!simulation::surf_source_bank.full()) {
SourceSite site;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice if we had Particle::to_source_site, since this pattern is probably used elsewhere. Again, not necessary.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion! I'll look into doing this on a separate PR

@paulromano
paulromano enabled auto-merge (squash) July 14, 2023 18:32
@paulromano
paulromano merged commit c5f5511 into openmc-dev:develop Jul 14, 2023
apingegno pushed a commit to apingegno/openmc that referenced this pull request May 7, 2026
Co-authored-by: Jose Ignacio Marquez Damian <22483345+marquezj@users.noreply.github.com>
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