11 double left = 0., right = 1.;
13 right =
EtaMax() * (1. - eps);
15 while (right /
f(right) < etatil) right *= 2.;
17 double center = (left + right) / 2.;
18 double valleft = left /
f(left) - etatil;
19 double valcenter = 0.;
20 while ((right - left) / center > eps) {
21 valcenter = center /
f(center) - etatil;
22 if (valleft * valcenter < 0.) {
29 center = (left + right) / 2.;
35 return etatil *
f(center);
51 throw std::invalid_argument(
"ExcludedVolumeModelCS::df(n,eta): n = " + std::to_string(n) +
" not supported!");
68 throw std::invalid_argument(
"ExcludedVolumeModelTVM::df(n,eta): n = " + std::to_string(n) +
" not supported!");
virtual double f(double eta) const
virtual double EtaMax() const
virtual double etasolBinarySearch(double etatil) const
virtual double f(double eta) const
virtual double df(int n, double eta) const
double d4f(double eta) const
double d3f(double eta) const
double d2f(double eta) const
double d1f(double eta) const
virtual double df(int n, double eta) const
double d1f(double eta) const
double d4f(double eta) const
double d2f(double eta) const
double d3f(double eta) const
virtual double f(double eta) const
The main namespace where all classes and functions of the Thermal-FIST library reside.