mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-02-04 19:05:09 -05:00
Get tabular backends working with consistency plots; closes #675
Fixed a bunch of bugs with the Tabular methods
This commit is contained in:
@@ -221,16 +221,8 @@ double Secant(FuncWrapper1D* f, double x0, double dx, double tol, int maxiter, s
|
||||
if (iter>1)
|
||||
{
|
||||
double deltax = x2-x1;
|
||||
if (std::abs(deltax)<1e-14)
|
||||
{
|
||||
if (std::abs(fval) < tol*10)
|
||||
{
|
||||
return x;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw ValueError("Step is small but not solved to tolerance");
|
||||
}
|
||||
if (std::abs(deltax)<1e-14){
|
||||
return x;
|
||||
}
|
||||
y2=fval;
|
||||
x3=x2-y2/(y2-y1)*(x2-x1);
|
||||
|
||||
Reference in New Issue
Block a user