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

Uncomment MC testing code #5928

Merged
merged 1 commit into from
Apr 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions tests/Unit/Evolution/Particles/MonteCarlo/Test_Scattering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,28 @@

#include "Framework/TestingFramework.hpp"

#include <algorithm>
#include <cmath>
#include <cstddef>
#include <optional>
#include <random>

#include "DataStructures/DataVector.hpp"
#include "DataStructures/Tensor/Tensor.hpp"
#include "DataStructures/Tensor/TypeAliases.hpp"
#include "Evolution/Particles/MonteCarlo/EvolvePackets.hpp"
#include "Evolution/Particles/MonteCarlo/Packet.hpp"
#include "Evolution/Particles/MonteCarlo/Scattering.hpp"
#include "Framework/TestHelpers.hpp"
#include "Parallel/Printf/Printf.hpp"
#include "Utilities/Gsl.hpp"
#include "Utilities/MakeWithValue.hpp"

namespace Frame {
struct ElementLogical;
struct Fluid;
struct Inertial;
} // namespace Frame

namespace {

Expand Down Expand Up @@ -88,7 +104,7 @@ void test_diffusion_params() {
0.999121) < epsilon_integral);
}

/*void test_diffusion() {
void test_diffusion() {
const Particles::MonteCarlo::DiffusionMonteCarloParameters diffusion_params;

MAKE_GENERATOR(generator);
Expand Down Expand Up @@ -239,7 +255,7 @@ void test_diffusion_params() {
neutrino_energy / rad;
Parallel::printf("%.5f %.5f %.5f %.5f 1\n", rad, cth, phi, pitch);
}
}*/
}

} // namespace

Expand All @@ -249,7 +265,8 @@ SPECTRE_TEST_CASE("Unit.Evolution.Particles.MonteCarloScattering",
test_diffusion_params();
// Not turned on by defaults... too long for automated tests,
// but useful framework to test diffusion regime.
/*if(false) {
// NOLINTNEXTLINE(readability-simplify-boolean-expr)
if ((false)) {
test_diffusion();
}*/
}
}
Loading