mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Don't do Boyle compensation when still on first stop
There is nothing to compensate but we would hit a 0/0 numerical instability there. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
0f096d0e53
commit
d9b4f2b7e3
1 changed files with 4 additions and 0 deletions
4
deco.c
4
deco.c
|
@ -362,6 +362,10 @@ void boyles_law(double next_stop_pressure)
|
|||
{
|
||||
int ci;
|
||||
|
||||
// This should be a tautology but prevents a numerical instability.
|
||||
if (IS_FP_SAME(next_stop_pressure, first_stop_pressure))
|
||||
return;
|
||||
|
||||
if (!first_stop_pressure)
|
||||
return;
|
||||
for (ci = 0; ci < 16; ++ci) {
|
||||
|
|
Loading…
Add table
Reference in a new issue