Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bookkeeping of hydro-mc coupling in packet evolution #5920

Merged
merged 1 commit into from
May 2, 2024

Conversation

ffoucart
Copy link
Contributor

Proposed changes

Add computation of coupling between MC packet and fluid variables in EvolvePacketInElement. This is only bookkeeping for now, and not used to feedback on the fluid. We will also need to add contribution from the packets using the diffusion approximation after merging #5851

Upgrade instructions

None

Code review checklist

  • The code is documented and the documentation renders correctly. Run
    make doc to generate the documentation locally into BUILD_DIR/docs/html.
    Then open index.html.
  • The code follows the stylistic and code quality guidelines listed in the
    code review guide.
  • The PR lists upgrade instructions and is labeled bugfix or
    new feature if appropriate.

@@ -94,10 +94,23 @@ SPECTRE_TEST_CASE("Unit.Evolution.Particles.MonteCarloEvolution",
std::array<DataVector, 2>{{zero_dv, zero_dv}},
std::array<DataVector, 2>{{zero_dv, zero_dv}}};

// Set non-zero value that should nearly never lead
// to interaction, to get non-zero interaction terms.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll update the comment after code review -- but in fact, due to the use of a minimum value of 1.e-100 in the RNG when determining the time to the next event, we are explicitly guaranteed that no scattering / absorption will happen.

Copy link
Member

@kidder kidder left a comment

Choose a reason for hiding this comment

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

you can squash changes, but will need to wait until #5903 is merged in order to rebase so that you can get the proton mass from the correct place.

void draw_single_packet(gsl::not_null<double*> time,
gsl::not_null<std::array<double, 3>*> coord,
gsl::not_null<std::array<double, 3>*> momentum,
gsl::not_null<std::mt19937*> random_number_generator);
} // namespace detail


// Contribution to the neutrino-matter coupling terms from
Copy link
Member

Choose a reason for hiding this comment

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

Make this a doxygen comment with the first sentence as \brief and the rest as \details

@ffoucart
Copy link
Contributor Author

ffoucart commented May 2, 2024

Ok, rebased against develop, including #5903 .
I'm also realizing that I'll need to move the calculation of the coupling for the evolution along geodesics in a different file for #5927 to work... but I can deal with that in the relevant PR.

@kidder kidder merged commit 8f6d7ed into sxs-collaboration:develop May 2, 2024
22 checks passed
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.

2 participants