COMPILING THE CODE ================== This directory contains three separate codes for calculating the pure relativistic thermally averaged Gaunt factors, for merging the non-relativistic and relativistic Gaunt factors, and for calculating the frequency integrated Gaunt factors. To compile the programs, 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. To compile the code, execute the following commands in some suitable location tar xvfz gauntff_bhe.tar.gz cd gauntff_bhe make The program gauntff_bhe.cc is parallelized using MPI. The other two codes are regular scalar programs since these are much faster. 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 of the pure Bethe-Heitler-Elwert (BHE) Gaunt factors is rather CPU intensive due to the fact that high precision math routines are being used (with mantissas of 256 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_bhe.exe The number of ranks can be freely chosen (the number 32 shown above is just an example). One rank 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. The code is set up to generate the data files for all atomic numbers Z between 1 and 36. This can easily be modified by changing the loop statement on line 104 of gauntff_bhe.cc. The merging of the relativistic and non-relativistic data can be done with the program merge.exe. For this the pure BHE data files gauntff_bhe_Zxx.dat as well as the non-relativistic data file gauntff.dat (also available from this website) need to be present. Merging these files can be done by executing ./merge.exe gauntff_bhe_Zxx.dat > gauntff_merged_Zxx.dat where "xx" needs to be replaced by the atomic number you wish to process. Calculating the frequency integrated Gaunt factors can be done with the program gauntff_freqint_rel.exe. For this the merged relativistic data files gauntff_merged_Zxx.dat need to be present since the integral is evaluated by interpolation on the merged tabulated data. Calculating the data can be done by executing ./gauntff_freqint_rel.exe gauntff_merged_Zxx.dat > gauntff_freqint_Zxx.dat where "xx" needs to be replaced by the atomic number you wish to process. 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 these codes in a scientific publication, please refer to the following papers 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 van Hoof P.A.M., Ferland G.J., Williams R.J.R., Volk K., Chatzikos M., Lykins M., Porter R.L. Accurate determination of the free-free Gaunt factor, II -- relativistic Gaunt factors 2015, MNRAS, 449, 2112 CREDITS ======= Peter A.M. van Hoof Royal Observatory of Belgium Ringlaan 3 B-1180 Brussels Belgium p.vanhoof@oma.be