#include <iostream>
#include "runner/konvergenz_runner.h"
void msd() {
    Konvergenz::runner(Compute::Force::harmonic_F, Compute::Type::msd,
                       Integratoren2d::Set1_Euler_f, "1Euler_msd_harmonic_konv.dat");
    Konvergenz::runner(Compute::Force::harmonic_F, Compute::Type::msd,
                       Integratoren2d::Set2_Heun_f, "2Heun_msd_harmonic_konv.dat");
    Konvergenz::runner(Compute::Force::harmonic_F, Compute::Type::msd,
                       Integratoren2d::Set3_Exact_f, "3Exact_msd_harmonic_konv.dat");
    Konvergenz::runner(Compute::Force::harmonic_F, Compute::Type::msd,
                       Integratoren2d::Set4_BDAS_f, "4BDAS_msd_harmonic_konv.dat");
    Konvergenz::runner(Compute::Force::harmonic_F, Compute::Type::msd,
                       Integratoren2d::Set5_MBD_f, "5MBD_msd_harmonic_konv.dat");
}
void oaf() {
    Konvergenz::runner(Compute::Force::harmonic_F, Compute::Type::oaf,
                       Integratoren2d::Set1_Euler_f, "1Euler_oaf_harmonic_konv.dat");
    Konvergenz::runner(Compute::Force::harmonic_F, Compute::Type::oaf,
                       Integratoren2d::Set2_Heun_f, "2Heun_oaf_harmonic_konv.dat");
    // Konvergenz::runner(Compute::Force::harmonic_F,
    // Integratoren2d::Set3_Exact_f,
    //                    "3Exact_oaf_harmonic_konv.dat");
    // Konvergenz::runner(Compute::Force::harmonic_F,
    // Integratoren2d::Set4_BDAS_f,
    //                   "4BDAS_oaf_harmonic_konv.dat");
    Konvergenz::runner(Compute::Force::harmonic_F, Compute::Type::oaf,
                       Integratoren2d::Set5_MBD_f, "5MBD_oaf_harmonic_konv.dat");
}
void time_harmonic(double length){
    Normal::runner(Compute::Force::harmonic_F, Integratoren2d::Set1_Euler_f,
                   "1_Euler_harmonic_"+std::to_string(length)+".dat", length);
    Normal::runner(Compute::Force::harmonic_F, Integratoren2d::Set2_Heun_f,
                   "2_Heun_harmonic_"+std::to_string(length)+".dat", length);
    Normal::runner(Compute::Force::harmonic_F, Integratoren2d::Set3_Exact_f,
                   "3_Exact_harmonic_"+std::to_string(length)+".dat", length);
    Normal::runner(Compute::Force::harmonic_F, Integratoren2d::Set4_BDAS_f,
                   "4_BDAS_harmonic_"+std::to_string(length)+".dat", length);
    Normal::runner(Compute::Force::harmonic_F, Integratoren2d::Set5_MBD_f,
                   "5_MBD_harmonic_"+std::to_string(length)+".dat", length);
}
void time_const(double length){
    Normal::runner(Compute::Force::const_F, Integratoren2d::Set1_Euler_f,
                   "1_Euler_const_"+std::to_string(length)+".dat", length);
    Normal::runner(Compute::Force::const_F, Integratoren2d::Set2_Heun_f,
                   "2_Heun_const_"+std::to_string(length)+".dat", length);
    Normal::runner(Compute::Force::const_F, Integratoren2d::Set3_Exact_f,
                   "3_Exact_const_"+std::to_string(length)+".dat", length);
    Normal::runner(Compute::Force::const_F, Integratoren2d::Set4_BDAS_f,
                   "4_BDAS_const_"+std::to_string(length)+".dat", length);
    Normal::runner(Compute::Force::const_F, Integratoren2d::Set5_MBD_f,
                   "5_MBD_const_"+std::to_string(length)+".dat", length);
}
void time_no_force(double length){
    Normal::runner(Compute::Force::zero_F, Integratoren2d::Set1_Euler_f,
                   "1_Euler_zero_"+std::to_string(length)+".dat", length);
    Normal::runner(Compute::Force::zero_F, Integratoren2d::Set2_Heun_f,
                   "2_Heun_zero_"+std::to_string(length)+".dat", length);
    Normal::runner(Compute::Force::zero_F, Integratoren2d::Set3_Exact_f,
                   "3_Exact_zero_"+std::to_string(length)+".dat", length);
    Normal::runner(Compute::Force::zero_F, Integratoren2d::Set4_BDAS_f,
                   "4_BDAS_zero_"+std::to_string(length)+".dat", length);
    Normal::runner(Compute::Force::zero_F, Integratoren2d::Set5_MBD_f,
                   "5_MBD_zero_"+std::to_string(length)+".dat", length);
}

constexpr int num_threads = 5;
int main() {
    // TIME
    std::cout<<"no_force"<<std::endl;
    time_no_force(1.0);
    time_no_force(3.0);
    std::cout<<"const_force"<<std::endl;
    time_const(1.0);
    time_const(3.0);
    std::cout<<"harmonic_force"<<std::endl;
    time_harmonic(1.0);
    time_harmonic(3.0);

    std::cout<<"convergence"<<std::endl;
    oaf();
    msd();
    return EXIT_SUCCESS;
}