#include "./core/omp_config.h"

#include "./utils/utils.h"
#include "./numerics/numerics.h"
#include "./decomp/decomp.h"


#include "./modules/mesh/mesh.h"
#include "modules/fluids/fluids.h"



//#include <iostream>
//#include <stdexcept>
//#include <chrono>





int main(int argc, char const *argv[])
{    
    utils::Vd a = utils::linspace<double>(1, 10, 10, true);
    a.print();
    mesh::Mesh1D<double> mesh(a);
    mesh.generate_vertices(0.5, 10.5);
    double Gamma = 1.0;

    
    utils::Md A;
    utils::Vd b, s(10,1);


    core::Configs<double>& cfg = core::Configs<double>::defaults();
    cfg.grid = core::GridKind::Uniform;
    cfg.left = {core::FDKind::Forward, core::BCKind::Neumann, 0.0};
    cfg.right = {core::FDKind::Backward, core::BCKind::Neumann, 0.0};
    cfg.solver    = core::SolverKind::LU;


    fluids::Diffusion1D<double> diffusion(cfg, mesh, Gamma);
    diffusion.assemble(A, b, s);

    
    return 0;
}