COMPILING THE CODE ================== This directory contains the code for calculating the non-relativistic Gaunt factor. To compile the program, you need an MPI installation based on a recent g++ version (4.7.0 or later). You also need libgmp and libmpfr installed (including the devel packages). The code also needs libmpfrc++ written by Pavel Holoborodko. This library is included in the tarball since it is usually not available in Linux distros. Before compiling the program, you need to take a look at the file gauntff_nr.cc. Near the top are three preprocessor macros that you can define to choose which form of the Gaunt factor you wish to compute. #define GENERATE_NONAV 1 When this statement is uncommented, a table of non-averaged Gaunt factors will be created. This generates the file gauntff_nonav.dat available on http://data.nublado.org/gauntff #define GENERATE_THERM_AV 1 When this statement is uncommented, a table of thermally averaged Gaunt factors will be created. This generates the file gauntff.dat available on http://data.nublado.org/gauntff #define GENERATE_TOTAL 1 When this statement is uncommented, a table of total (frequency integrated) Gaunt factors will be created. This generates the file gauntff_freqint.dat available on http://data.nublado.org/gauntff Exactly one of these three statements needs to be uncommented. In the default setup a table of thermally averaged Gaunt factors will be created. To compile the code, execute the following commands in some suitable location tar xvfz gauntff_nr.tar.gz cd gauntff_nr make The code was tested with openMPI, which supplies a compiler wrapper called mpiCC. Other distros can be used too, but they may give another name to the wrapper (such as mpicxx). If this is the case with you distro, you can compile the code as follows make CXX=mpicxx You can clean up the files left behind by a compilation with the command make clean RUNNING THE CODE ================ The calculation are rather CPU intensive due to the fact that high precision math routines are being used (with mantissas up to 4096 bits). To keep the execution time within reasonable bounds, the code needs to be run on a multi-core machine or cluster using MPI. You can run the code as follows mpirun -np 32 ./gauntff_nr.exe > gauntff.dat The number of ranks can be freely chosen (the number 32 shown above is just an example), except when you are calculating the total Gaunt factor. In the latter case the number of ranks needs to be a multiple of 4. One rank (in the case of the total Gaunt factor, 4 ranks) will be reserved as a master rank for handing out jobs to the other ranks. The master rank will not do any real calculations itself. LICENSE ======= The code is distributed under the GNU GPL v3. The license text is available in the file license.txt included in this tarball. When you make use of the code in a scientific publication, please refer to the following paper van Hoof P.A.M., Williams R.J.R., Volk K., Chatzikos M., Ferland G.J., Lykins M., Porter R.L., Wang Y., Accurate determination of the free-free Gaunt factor, I -- non-relativistic Gaunt factors, 2014, MNRAS, 444, 420 CREDITS ======= Peter A.M. van Hoof Royal Observatory of Belgium Ringlaan 3 B-1180 Brussels Belgium p.vanhoof@oma.be