alex-mcdaniel / RX-DMFIT

A tool used for calculating the expected secondary emission from DM annihilation and placing constraints on dark matter properties, incorporating important astrophysics including the diffusion of charged particles, relevant radiative energy losses, and magnetic field modelling.
12 stars 5 forks source link

Issue compiling examples #5

Open Hyperthetical opened 2 years ago

Hyperthetical commented 2 years ago

Hi,

When I run make example1 or make example2

I get the following error:

pIC.cpp: In static member function ‘static double Target::SL_profile(double)’: pIC.cpp:67:9: error: ‘r_b_cm’ was not declared in this scope 67 | r_b_cm = r_b*kpc2cm; | ^~~~~~ pIC.cpp:68:9: error: ‘r_d_cm’ was not declared in this scope 68 | r_d_cm = r_d*kpc2cm; | ^~~~~~ make: *** [makefile:20: example1] Error 1

Any suggestion as to what is happening?

alex-mcdaniel commented 2 years ago

Yes this looks like its caused by an error in the variable declaration in lines 67 and 68 of pIC.cpp. The lines :

r_b_cm = r_b*kpc2cm;
r_d_cm = r_d*kpc2cm;

should instead read:

double r_b_cm = r_b*kpc2cm;
double r_d_cm = r_d*kpc2cm;

This was a recent modification and has now been changed in the master code. Give it a try with this fixed and if there are any other issues let me know.