#include "cell.h"
#include "boundary-types.h"
#include <stdlib.h>
#include "exit-codes.h"

#ifndef GRID
#define GRID

typedef struct {
  unsigned int iter; // iterations
  double time; // passed time
  boundary_condition_types lbt; // left boundary type
  boundary_condition_types rbt; // right --
  Cell1D lbc; // left boundary cell
  Cell1D rbc; // right --
  unsigned int N; // cells amount
  double h; // space step
  Cell1D* cells; 
} Grid1D;

Grid1D grid_cons (unsigned int N, double x0, double x1, boundary_condition_types lbt, boundary_condition_types rbt);
Cell1D* allocate_memory_for_grid(unsigned int amount);
Grid1D grid_skel (Grid1D grid);
int printGrid(Grid1D const& grid);
int printGridToFile(Grid1D const& grid);
#endif // GRID