21 lines
472 B
C++
21 lines
472 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);
|
|
}
|
|
}
|