Harden SPHLite 0.2.1 water input parsing

This commit is contained in:
Codex
2026-07-02 22:47:41 +08:00
parent 920688d832
commit 8321ed1b36
13 changed files with 246 additions and 26 deletions
+2 -1
View File
@@ -315,7 +315,8 @@ contains
if (ierr /= SPH_SUCCESS) return
call sph_input_get_required_real(line, 'GAMMA', gamma, ierr)
if (ierr /= SPH_SUCCESS) return
call sph_input_get_required_real(line, 'P0', p0, ierr)
p0 = 0.0_rk
call sph_input_get_optional_real(line, 'P0', p0, ierr)
if (ierr /= SPH_SUCCESS) return
call sph_input_get_option(line, 'B', value)
has_b = len_trim(value) > 0