30 lines
770 B
C++
30 lines
770 B
C++
//
|
|
// Created by jholder on 24.10.21.
|
|
//
|
|
|
|
#define CATCH_CONFIG_MAIN
|
|
#define CATCH_CONFIG_ENABLE_BENCHMARKING
|
|
|
|
#include <catch2/catch.hpp>
|
|
#include "Integratoren/Integratoren2d.h"
|
|
#include "Data/Rod2d.hpp"
|
|
|
|
TEST_CASE("Euler - Baseline", "[benchmark]") {
|
|
Rod2d rod(1.0);
|
|
Simulation sim(0.01, Catch::rngSeed());
|
|
BENCHMARK("Euler without force") {
|
|
Integratoren2d::Set1_Euler(rod, sim);
|
|
};
|
|
BENCHMARK("Heun without force") {
|
|
Integratoren2d::Set2_Heun(rod, sim);
|
|
};
|
|
BENCHMARK("Exact without force") {
|
|
Integratoren2d::Set3_Exact(rod, sim);
|
|
};
|
|
BENCHMARK("BDAS without force") {
|
|
Integratoren2d::Set4_BDAS(rod, sim);
|
|
};
|
|
BENCHMARK("MBD without force") {
|
|
Integratoren2d::Set5_MBD(rod, sim);
|
|
};
|
|
} |