Skip to content

Commit 121ccf6

Browse files
committed
fix: use fixed RNG seeds in tests
1 parent 695fa27 commit 121ccf6

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

tests/fluxEngines/fluxEngines.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@ void checkSurfaceHeight(SmartPointer<viennaps::Domain<T, D>> &domain,
1818
const T height) {
1919
auto surfaceMesh = domain->getSurfaceMesh();
2020
for (const auto &node : surfaceMesh->nodes) {
21-
VC_TEST_ASSERT(std::abs(node[D - 1] - height) < 0.15);
21+
if (std::abs(node[D - 1] - height) >= 0.15) {
22+
std::cerr << "Dim " << D << ": ";
23+
std::cerr << "Node at " << node << " is not close to expected height "
24+
<< height << std::endl;
25+
}
26+
VC_TEST_ASSERT(std::abs(node[D - 1] - height) < 0.1);
2227
}
2328
}
2429

@@ -48,6 +53,7 @@ template <class T, int D> void RunTest() {
4853

4954
viennaps::RayTracingParameters rayParams;
5055
rayParams.rngSeed = 42;
56+
rayParams.useRandomSeeds = false;
5157

5258
viennaps::Process<T, D> process(domain, model);
5359
process.setFluxEngineType(engineType);

tests/intermediate/intermediate.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ template <class NumericType, int D> void RunTest() {
7979
RayTracingParameters rayTracing;
8080
rayTracing.raysPerPoint = rpp;
8181
rayTracing.smoothingNeighbors = smoothingNeighbors;
82+
rayTracing.rngSeed = 42;
83+
rayTracing.useRandomSeeds = false;
8284
process.setParameters(rayTracing);
8385

8486
AdvectionParameters advection;

0 commit comments

Comments
 (0)