Skip to content

Commit

Permalink
Uncomment MC testing code
Browse files Browse the repository at this point in the history
It takes too long to run in the automated tests, but we should still
ensure it compiles.
  • Loading branch information
wthrowe committed Apr 19, 2024
1 parent 6645460 commit df73e55
Showing 1 changed file with 21 additions and 4 deletions.
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();
}*/
}
}

0 comments on commit df73e55

Please sign in to comment.