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 887fdb7
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 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,7 @@ 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) {
if ((false)) {

Check failure on line 268 in tests/Unit/Evolution/Particles/MonteCarlo/Test_Scattering.cpp

View workflow job for this annotation

GitHub Actions / Clang-tidy (Debug)

redundant boolean literal in if statement condition

Check failure on line 268 in tests/Unit/Evolution/Particles/MonteCarlo/Test_Scattering.cpp

View workflow job for this annotation

GitHub Actions / Clang-tidy (Release)

redundant boolean literal in if statement condition
test_diffusion();
}*/
}
}

0 comments on commit 887fdb7

Please sign in to comment.