text: #include"utils.h"
  #include<algorithm> 
  #include<cmath> 
  
  int main() {
      //__________________________________________________________________
      std::string filename = {"parameters.dat"};
      double x0,xe;
      double t0,te;
      double Nx,Nt;
      double k,cp,rho;
      double initial_u;
      double bc1,bc2;
      std::ofstream output("results.dat");
  
      auto initial_condition = [](double x) {
          return sin(M_PI*x);
      };
      //__________________________________________________________________
      initialize_problem(filename,x0,xe,Nx,t0,te,Nt,k,cp,rho,initial_u,bc1,bc2);
      //print_parameters(x0,xe,Nx,t0,te,Nt,k,cp,rho,initial_u,bc1,bc2);
      //__________________________________________________________________
      Discrete<double> x_o(x0,xe,Nx);
      Discrete<double> t_o(t0,te,Nt);
      auto x = x_o.get_domain();
      auto t = t_o.get_domain();
      //__________________________________________________________________
      std::vector<double> u; 
      for(auto i:x){
          u.push_back(initial_condition(i));
      }
      //__________________________________________________________________
      u[0] = bc1;
      u.back() = bc2;
      //__________________________________________________________________
      // Printing to file the initial state of the system 
      for (auto i=0;i<x.size();++i){
          output << t[0] << " " << x[i] << " " << u[i] << std::endl;
      }
      //__________________________________________________________________
      double dt = t[1] - t[0];
      double dx = x[1] - x[0];
      double cournant = dt/(dx*dx);
      //std::cout << dx  << " " << dt << " " << cournant << std::endl;
      std::vector<double> u_new = u;
      for(auto i=1;i<Nt;++i){
          for(auto j=1;j<Nx-1;++j){
              u_new[j] = u[j] + cournant * (u[j+1] + u[j-1] - 2*u[j]);
              output << t[i] << " " << x[j] << " " << u_new[j] << std::endl;
          }
          u = u_new;
      }
      std::cout << "Solutions have been written successfully." << std::endl;
      output.close();
  }