mirror of
https://github.com/gwm17/catima.git
synced 2024-11-22 18:28:51 -05:00
minor warnings
This commit is contained in:
parent
ac6e0569a2
commit
94cc227db0
|
@ -26,7 +26,7 @@ set(CMAKE_CXX_STANDARD 14)
|
|||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR
|
||||
"${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
set(warnings "-Wall -Wextra -Werror")
|
||||
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Werror -Wno-sign-compare -Wno-unused-parameter")
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
|
|
|
@ -67,13 +67,14 @@ int main( int argc, char * argv[] )
|
|||
if(e.count("min")>0 && e.count("max")>0 && (e.count("num")>0 || e.count("step")>0)){
|
||||
double emin = e["min"].get<double>();
|
||||
double emax = e["max"].get<double>();
|
||||
int num;
|
||||
int num=0;
|
||||
if(e.count("step")){
|
||||
num = 1+(emax-emin)/e["step"].get<int>();
|
||||
}
|
||||
if(e.count("num")){
|
||||
num = e["num"].get<int>();
|
||||
}
|
||||
if(num>2)
|
||||
energies = linspace_vector(emin,emax,num);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -456,7 +456,7 @@ double sezi_dedx_e(const Projectile &p, const Target &t){
|
|||
return se;
|
||||
}
|
||||
else{ // heavy ion
|
||||
double h1,h2,h3,h4;
|
||||
double h1,h4;
|
||||
double a,q,b;
|
||||
double l1,l0,l;
|
||||
double YRmin = 0.130; // YRmin = VR / ZP**0.67 <= 0.13 OR VR <= 1.0
|
||||
|
@ -817,8 +817,10 @@ double z_eff_Schiwietz(double pz, double beta, double tz){
|
|||
}
|
||||
|
||||
double z_eff_atima14(double pz, double T, double tz){
|
||||
double qmean = 0.0;
|
||||
#ifdef GLOBAL
|
||||
double qpb;
|
||||
double qhigh,qwinger,qglobal,qmean=0;
|
||||
double qhigh,qwinger,qglobal;
|
||||
double c1 = 1.4;
|
||||
double c2 = 0.28;
|
||||
double c3 = 0.04;
|
||||
|
@ -826,7 +828,6 @@ double z_eff_atima14(double pz, double T, double tz){
|
|||
double gamma = gamma_from_T(T);
|
||||
double emax, emin;
|
||||
qpb = z_eff_Pierce_Blann(pz,beta);
|
||||
#ifdef GLOBAL
|
||||
|
||||
if(T>30.0 && T<1500.0 && pz>28){
|
||||
qglobal = z_eff_global(pz,T,tz);
|
||||
|
|
|
@ -29,7 +29,6 @@ bool operator==(const Config &a, const Config&b){
|
|||
|
||||
double dedx(Projectile &p, double T, const Material &mat, const Config &c){
|
||||
double sum = 0;
|
||||
double w=0;
|
||||
if(T<=0)return 0.0;
|
||||
|
||||
sum += dedx_n(p,mat);
|
||||
|
@ -108,7 +107,6 @@ std::vector<double> dedx_from_range(Projectile &p, const std::vector<double> &T,
|
|||
}
|
||||
|
||||
double range_straggling(Projectile &p, double T, const Material &t, const Config &c){
|
||||
double r=0;
|
||||
auto data = _storage.Get(p,t,c);
|
||||
Interpolator range_straggling_spline(energy_table.values,data.range_straggling.data(),energy_table.num);
|
||||
return sqrt(range_straggling_spline(T));
|
||||
|
@ -133,7 +131,6 @@ double da2de(Projectile &p, double T, const Material &t, const Config &c){
|
|||
}
|
||||
|
||||
double angular_straggling_from_E(Projectile &p, double T, double Tout, const Material &t, const Config &c){
|
||||
double r=0;
|
||||
auto data = _storage.Get(p,t,c);
|
||||
Interpolator angular_straggling_spline(energy_table.values,data.angular_variance.data(),energy_table.num);
|
||||
return sqrt(angular_straggling_spline(T) - angular_straggling_spline(Tout));
|
||||
|
@ -151,7 +148,6 @@ double energy_straggling_from_E(Projectile &p, double T, double Tout,const Mater
|
|||
double energy_out(double T, double thickness, Interpolator &range_spline){
|
||||
constexpr double epsilon = 1E-5;
|
||||
int counter = 0;
|
||||
double lo=0,hi=T;
|
||||
double range;
|
||||
double dedx;
|
||||
double e,r;
|
||||
|
@ -381,7 +377,6 @@ DataPoint calculate_DataPoint(Projectile p, const Material &t, const Config &c){
|
|||
dp.range.resize(max_datapoints);
|
||||
dp.range_straggling.resize(max_datapoints);
|
||||
dp.angular_variance.resize(max_datapoints);
|
||||
double dedxval;
|
||||
auto fdedx = [&](double x)->double{
|
||||
return 1.0/dedx(p,x,t,c);
|
||||
};
|
||||
|
|
|
@ -54,8 +54,6 @@ std::vector<double> band_matrix::trig_solve(const std::vector<double>& b) const
|
|||
assert( this->dim()==(int)b.size() );
|
||||
std::vector<double> x(this->dim());
|
||||
std::vector<double> g(this->dim());
|
||||
int j_stop;
|
||||
double sum;
|
||||
|
||||
assert(d[0]!=0.0);
|
||||
x[0] = b[0]/d[0];
|
||||
|
|
Loading…
Reference in New Issue
Block a user