1
0
Fork 0
mirror of https://github.com/gwm17/catima.git synced 2024-11-22 18:28:51 -05:00

Merge pull request #43 from hrosiak/omega

default omega changed
This commit is contained in:
Andrej Prochazka 2018-10-09 11:42:32 +02:00 committed by GitHub
commit f8987c807a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 10 deletions

View File

@ -59,7 +59,7 @@ namespace catima{
unsigned char z_effective=z_eff_type::pierce_blann; unsigned char z_effective=z_eff_type::pierce_blann;
//char z_effective=z_eff_type::atima14; //char z_effective=z_eff_type::atima14;
unsigned char dedx = 0; unsigned char dedx = 0;
unsigned char dedx_straggling = omega::atima; unsigned char dedx_straggling = omega::bohr;
#ifdef REACTIONS #ifdef REACTIONS
unsigned char skip=skip_none; unsigned char skip=skip_none;
#else #else

View File

@ -61,7 +61,7 @@ namespace catima{
int i = (int)std::floor(lxval/table.step); int i = (int)std::floor(lxval/table.step);
return i; return i;
} }
template<int N> template<int N>
double EnergyTable_interpolate(const EnergyTable<N> &table, double xval, double *y){ double EnergyTable_interpolate(const EnergyTable<N> &table, double xval, double *y){
double r; double r;
@ -88,7 +88,7 @@ namespace catima{
std::size_t num; std::size_t num;
}; };
*/ */
// return vector with lineary spaced elements from a to b, num is number of elements // return vector with lineary spaced elements from a to b, num is number of elements
inline std::vector<double> linspace_vector(double a, double b, unsigned int num){ inline std::vector<double> linspace_vector(double a, double b, unsigned int num){
std::vector<double> res; std::vector<double> res;
@ -102,7 +102,7 @@ inline std::vector<double> linspace_vector(double a, double b, unsigned int num)
} }
return res; return res;
} }
class DataPoint{ class DataPoint{
public: public:
Projectile p; Projectile p;
@ -117,7 +117,7 @@ inline std::vector<double> linspace_vector(double a, double b, unsigned int num)
~DataPoint(); ~DataPoint();
friend bool operator==(const DataPoint &a, const DataPoint &b); friend bool operator==(const DataPoint &a, const DataPoint &b);
}; };
class Data{ class Data{
public: public:
Data(); Data();
@ -132,7 +132,7 @@ inline std::vector<double> linspace_vector(double a, double b, unsigned int num)
std::vector<DataPoint> storage; std::vector<DataPoint> storage;
std::vector<DataPoint>::iterator index; std::vector<DataPoint>::iterator index;
}; };
/// Interpolation class, to store interpolated values /// Interpolation class, to store interpolated values
class InterpolatorGSL{ class InterpolatorGSL{
public: public:
@ -151,7 +151,7 @@ inline std::vector<double> linspace_vector(double a, double b, unsigned int num)
gsl_interp_accel *acc; gsl_interp_accel *acc;
gsl_spline *spline; gsl_spline *spline;
}; };
#ifdef BUILTIN_SPLINE #ifdef BUILTIN_SPLINE
class Interpolator2{ class Interpolator2{
public: public:
@ -167,15 +167,15 @@ inline std::vector<double> linspace_vector(double a, double b, unsigned int num)
double max=0; double max=0;
spline ss; spline ss;
}; };
#endif #endif
extern Data _storage; extern Data _storage;
inline DataPoint& get_data(const Projectile &p, const Material &t, const Config &c=default_config){ inline DataPoint& get_data(const Projectile &p, const Material &t, const Config &c=default_config){
return _storage.Get(p, t, c); return _storage.Get(p, t, c);
} }
bool operator==(const DataPoint &a, const DataPoint &b); bool operator==(const DataPoint &a, const DataPoint &b);
using InterpolatorLinear = InterpolatorGSL; using InterpolatorLinear = InterpolatorGSL;
using Interpolator = InterpolatorGSL; using Interpolator = InterpolatorGSL;
} }