Test+Problem+Utility+Compilation

=Modifying and Recompiling the Test Problem Utilities= Test problem pages: Overview, CADAC, Data Access, Work Area Setup, Path Setup, Utilities, Grid Data, SPH Data, Running, Reporting, LOG

You need to copy, modify, and recompile the utilities if you need to produce MHD initial data that satisfies your own definition of div(B)=0. By compiling the utility source code yourself you are also free to, for example, change output routines. However, if this is the only purpose, please consider if it might not be easier to lift code snippets from the read routines in the source code files **io_grid.f90** or **io_sph.f90**, to read files in the formats that we provide, combining this with your own output routines to make the necessary data format conversion.


 * //Please check the LOG file for changes of the source code and binaries -- consider re-executing binaries or/and taking a new copy of the source code if relevant for your experiment!//**

To copy the utility source code from its public location, do (//use copy & paste to avoid typos!//) code mkdir -p ~/KITPcompare07/src cd ~/KITPcompare07/src tar cf - -C /gpfs-wan/projects/cadac/software/contrib/aake/codes/KITPcompare07 ./ | tar xf - code To compile the code and install the binaries do code make install code By default this puts the executable binaries in your ~/bin directory, where they will supersede the ones in the public bin (see the UNIX path setup). If you prefer some other location, do code make BIN=/some/other/bin install code

Modifying the utilities to produce div(B)=0
This may be done by replacing the derivative definitions in **ddxdn_add** and similar routines in the **derivs.f90** file with your own definitions. It should not be necessary to modify the rest of the program; the **divb_clean.f90** code should converge also with the modified derivative definitions, thus creating the desired initial conditions. Make sure to choose a centering of the data consistent with your code.

To compile on other machines / with other compilers
To compile with the **ifort** compiler, do code make COMPILER=ifort install code COMPILER can be "g95", "pathf90", "pgf90", etc. -- see the **Config/*.mk** files for compiler options; this is also where to edit or add default compiler options. To work permanently with a different compiler just edit the COMPILER=xlf line in the Makefile.

Testing the Utilities
To run a series of tests, which do code make tests code To clean up after the tests, do code make cleanest code
 * 1) creates low resolution MHD grid data and performs div(B) cleaning on it
 * 2) creates low resolution SPH data from the HD part of the MHD data
 * 3) converts the SPH data back to a new grid data file
 * 4) interpolates the new grid data to a different resolution