1
0
Fork 0
mirror of https://github.com/gwm17/catima.git synced 2024-11-30 05:58:50 -05:00
catima/examples/ls_coefficients.cpp

34 lines
814 B
C++
Raw Normal View History

2017-07-27 05:39:44 -04:00
/**
2018-01-22 13:36:50 -05:00
* this example program print out Lindhard - Soerrensen coefficients
2017-07-27 05:39:44 -04:00
*/
#include "catima/catima.h"
#include "catima/storage.h"
#include <iostream>
2018-01-22 13:36:50 -05:00
#include <stdlib.h>
2017-07-27 05:39:44 -04:00
using std::cout;
using std::endl;
2018-01-22 13:36:50 -05:00
int main(int argc, char** argv){
catima::Projectile p(238.0,92); // define projectile
if(argc>2){
double a = atof(argv[1]);
int z = atoi(argv[2]);
if(a>0 && z>0 && z<120){
p.A = a;
p.Z = z;
}
}
cout<<"projectile: A = "<<p.A<<", Z = "<<p.Z<<"\n";
auto energies = catima::EnergyTable<100>(1,5); // get energy table, energies log distributed between 10^1 and 10000^5;
2017-07-27 05:39:44 -04:00
for(double T:energies){
auto ls = catima::bethek_lindhard(p(T));
auto lsX = catima::bethek_lindhard_X(p(T));
cout<<"T "<<T<<", Delta LS = "<<ls<<", X = "<<lsX<<endl;
}
return 0;
}