Skip to content

Commit 06618e7

Browse files
committed
[ci optional] avoid hard floors on HELM, fall back to ideal instead
1 parent d08dbbb commit 06618e7

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

eos/private/helm.f90

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,13 @@ subroutine helmeos2aux( &
257257
return
258258
end if
259259

260+
! error out for very low pgas,egas,sgas (previously just set hard floor at this value)
261+
if(pgas < 1d-20 .or. egas < 1d-20 .or. sgas < 1d-20) then
262+
ierr = 1
263+
if (dbg) write(*,*) 'failed in helm, sums too small'
264+
return
265+
end if
266+
260267
!..compute the derivative quantities (cv, gamma1 ...etc)
261268
include 'helm_gammas.dek'
262269
if (ierr /= 0) then

eos/private/helm_sum_totals.dek

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pgas = max(pion + pele + ppos + pcoul, 1d-20)
1+
pgas = pion + pele + ppos + pcoul
22

33
dpgasdd = dpiondd + dpepdd + dpcouldd
44
dpgasdt = dpiondt + dpepdt + dpcouldt
@@ -15,7 +15,7 @@
1515
dpgasdaz = dpiondaz + dpepdaz + dpcouldaz
1616
dpgasdzz = dpiondzz + dpepdzz + dpcouldzz
1717

18-
egas = max(eion + eele + epos + ecoul, 1d-20)
18+
egas = eion + eele + epos + ecoul
1919

2020
if (.false.) then
2121
write(*,'(a6,e15.5)') 'egas', egas
@@ -41,7 +41,7 @@
4141
degasdaz = deiondaz + deepdaz + decouldaz
4242
degasdzz = deiondzz + deepdzz + decouldzz
4343

44-
sgas = max(sion + sele + spos + scoul, 1d-20)
44+
sgas = sion + sele + spos + scoul
4545

4646
dsgasdd = dsiondd + dsepdd + dscouldd
4747
dsgasdt = dsiondt + dsepdt + dscouldt

0 commit comments

Comments
 (0)