Expose water diagnostics through public APIs

This commit is contained in:
Codex
2026-07-02 21:20:51 +08:00
parent 61b81e9d50
commit 03c05d6931
10 changed files with 280 additions and 24 deletions
+28
View File
@@ -535,6 +535,34 @@ subroutine sphft_get_particle_state(max_particles, particle_id_ext, phase, &
internal_energy, temperature, h, count, ierr)
end subroutine sphft_get_particle_state
subroutine sphft_get_water_summary(mass, momentum, max_pressure, &
min_density, max_density, ierr)
use sph_api, only: sph_get_water_summary
use sph_precision, only: rk
implicit none
real(rk), intent(out) :: mass
real(rk), intent(out) :: momentum(3)
real(rk), intent(out) :: max_pressure
real(rk), intent(out) :: min_density
real(rk), intent(out) :: max_density
integer, intent(out) :: ierr
call sph_get_water_summary(mass, momentum, max_pressure, min_density, &
max_density, ierr)
end subroutine sphft_get_water_summary
subroutine sphft_get_water_dt_limits(dt_cfl, dt_accel, dt_viscous, ierr)
use sph_api, only: sph_get_water_dt_limits
use sph_precision, only: rk
implicit none
real(rk), intent(out) :: dt_cfl
real(rk), intent(out) :: dt_accel
real(rk), intent(out) :: dt_viscous
integer, intent(out) :: ierr
call sph_get_water_dt_limits(dt_cfl, dt_accel, dt_viscous, ierr)
end subroutine sphft_get_water_dt_limits
subroutine sphft_set_output_directory_chars(chars, count, ierr)
use sph_api, only: sph_set_output_directory
implicit none