#include <armadillo>

namespace dG_global
{
  extern std::string directoryname, filename, N_string, mesh_size_parameter_string;

  // lokalni aproximace
  extern int N, N_p, N_fp, N_faces;

  // lokalni operatory
  extern arma::vec r, s, t;
  extern arma::mat V, invV;
  extern arma::mat M, invM;
  extern arma::mat V_r, V_s, V_t;
  extern arma::mat D_r, D_s, D_t;
  extern arma::mat D_r_weak, D_s_weak, D_t_weak;
  extern arma::umat Fmask;
  extern arma::mat LIFT;

  // prostorova diskretizace
  extern double mesh_size_parameter;

  // informace o siti
  extern double NODETOL;
  extern arma::mat P;
  extern arma::rowvec Px, Py, Pz;
  extern int N_v;
  extern arma::umat E;
  extern int K;
  extern arma::mat x, y, z;
  extern arma::mat r_x, r_y, r_z;
  extern arma::mat s_x, s_y, s_z;
  extern arma::mat t_x, t_y, t_z;
  extern arma::mat J;
  extern arma::mat Fx, Fy, Fz;
  extern arma::mat n_x, n_y, n_z;
  extern arma::mat surfJ, Fscale;
  extern arma::umat EtoE, EtoF;
  extern arma::uvec mapM, vmapM;
  extern arma::uvec mapP, vmapP;
  extern arma::uvec mapB, vmapB;
  extern arma::uvec mapI, vmapI;
  extern arma::uvec mapO, vmapO;

  // casova diskretizace
  extern double T;
  extern double dt;
  extern int N_steps;
  extern arma::vec dtscale;

  // koeficienty RK metody
  extern arma::vec rk4a, rk4b, rk4c;

  void SetRKMethodCoefficients();
  void DiscretizationParamatersToStrings();
  
  void GeometricFactors1D();
  void Normals1D();
  void Connectivity1D();
  void BuildMaps1D();
  void StartUp1D();
  
  void GeometricFactors2D();
  void Normals2D();
  void Connectivity2D();
  void BuildMaps2D();
  void StartUp2D();
  void dtscale2D();
  
  void GeometricFactors3D();
  void Normals3D();
  void Connectivity3D();
  void BuildMaps3D();
  void StartUp3D();
  void dtscale3D();
}
