TODO ==== * Get rid of all global variables. * Break main() into smaller chunks; operations that are timed should become independent functions. * Dynamically allocate the big arrays. * Create a key-value config file reader to replace the external parameter files. * Remove all ifdef blocks, options should be selected in the config file. * Optional HDF5 output. * In the config file let choose number of digits for ASCII output and 32 or 64-bit floats for HDF5.