BD_Integratoren/test/test_Compute.cpp
2021-10-25 15:45:29 +02:00

22 lines
478 B
C++

//
// Created by jholder on 22.10.21.
//
#include "Compute.h"
#include <catch2/catch.hpp>
#include "Integratoren2d_forceless.h"
TEST_CASE("Compute") {
Rod2d rod(1.0);
Simulation sim(0.1, 1);
auto com = Compute(rod, Compute::Type::msd, 10, sim);
SECTION("Mean of same values") {
for (int i = 0; i < 100; ++i) {
com.eval(rod);
}
CHECK(com.getAgg().getNumPoints() == 10);
CHECK(com.getAgg().getMean() == 0.0);
}
}