/** ## Short intro This page is to explain the equidistant averaging function. Notes on convergence in time and space can be respectively found [here](equidistant_time.c) and [here](equidistant_space.c). Note that the convergence in space is carried out only for a constant high resolution grid, since the errors of the low grid values will dominate the higher resolution ones. Having a combination of resolutions is left as an exercise. ## The functions /** NOTE: Very much in progress. These functions are geared towards equidistant diagnostics. The level for which diagnostics are done can be specified. Values will be linearly interpolated if necesarry. So far this function works with MPI and only works in 3D. Short description of what they do: //void equi_diag(scalar s, int lvl, int diagi) { adds values to the equifield array } //void equi_output_ascii (scalar s, char * fname, int lvl, int diagi) { outputs equifield array to ascii file fname in the format: place = x*n*n + y*n + z data is devided by diagi to average } //void equi_output_binary(scalar s, char * fname, int lvl, int diagi)i { outputs equifield to file binary fname in the format: place = x*n*n + y*n + z } //void equi_import_binary (scalar s, char * fname, int lvl) { imports data written by the equi_output_binary(...) function data is read into scalar s, no interpolation is used. } TODO implement 2D TODO walking average since values in equifield could get big, or divide before summing? TODO multiple fields at once? */ double *equifield = NULL; // The diagnostics field int equi_diag (scalar s, int lvl, int diagi){ int len = 1; int n = 1<