// // Created by jholder on 21.10.21. // #include #include #include "Data/Simulation.h" #include "tools/vec_trafos.h" TEST_CASE("Simulation") { Simulation sim(0.1, 1234); SECTION("Checking Simulation with non periodic settings") { pos_type pos_Inside {10,10}; pos_type pos_Outside {200,200}; CHECK(pos_Inside == sim.boundaryPos(pos_Inside)); CHECK(pos_Outside == sim.boundaryPos(pos_Outside)); CHECK(pos_Outside-pos_Inside == sim.boundaryDistance(pos_Inside,pos_Outside)); } SECTION("Checking Simulation with periodic settings") { pos_type pos_Inside {10,10}; pos_type pos_Outside {200,200}; pos_type per_pos_Outside {100,100}; sim.set_xBorder(100); sim.set_yBorder(100); CHECK(pos_Inside == sim.boundaryPos(pos_Inside)); CHECK(per_pos_Outside == sim.boundaryPos(pos_Outside)); //CHECK(pos_Outside-pos_Inside == sim.boundaryDistance(pos_Inside,pos_Outside)); } }