Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/common/m_constants.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module m_constants

!> Reals per IB in restart_data/ib_state: time, force(3), torque(3), vel(3), angular_vel(3), angles(3), centroid(3), radius,
!! Twall, ib_mass_relax bank. Twall carries a thermal_bc = 3 body's evolving temperature across a restart; the bank is the
!! body's unreturned gas mass (ib_mass_res(1), identical on every rank).
!! body's unreturned gas mass (patch_ib%mass_bank, held by the owner).
integer, parameter :: ib_state_nfields = 22
!> Radius cutoff to avoid division by zero for 3D spherical harmonic patch (geometry 14)
real(wp), parameter :: small_radius = 1.e-32_wp
Expand Down
5 changes: 3 additions & 2 deletions src/common/m_derived_types.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,9 @@ module m_derived_types
real(wp) :: mass, moment !< mass and moment of inertia of object used to compute forces in 2-way coupling
real(wp), dimension(1:3) :: force, torque !< vectors for the computed force and torque values applied to an IB
!> Last step's gasification rate and face mass out [kg/s], and fluid heat in [W] (ib_heat_wrt; per unit depth in 2D)
real(wp) :: mdot, mdot_face, qdot
real(wp) :: mass_bank !< ib_mass_relax bank read from a restart; only s_read_ib_restart_data sets it
real(wp) :: mdot, mdot_face, qdot
!> ib_mass_relax bank: set from a restart, advanced by the owner rank, moved with the body at a handoff
real(wp) :: mass_bank
real(wp), dimension(1:3) :: vel
real(wp), dimension(1:3) :: step_vel !< velocity array used to store intermediate steps in the time_stepper module
real(wp), dimension(1:3) :: angular_vel
Expand Down
9 changes: 3 additions & 6 deletions src/simulation/m_data_output.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,7 @@ contains
write (file_unit) num_local_ibs
do i = 1, num_local_ibs
ib_idx = local_ib_patch_ids(i)
call s_pack_ib_state(patch_ib(ib_idx), mytime, ib_buf, f_ib_mass_bank(patch_ib(ib_idx)%gbl_patch_id))
call s_pack_ib_state(patch_ib(ib_idx), mytime, ib_buf, patch_ib(ib_idx)%mass_bank)

write (file_unit) patch_ib(ib_idx)%gbl_patch_id
write (file_unit) ib_buf
Expand All @@ -1218,7 +1218,7 @@ contains

do i = 1, num_local_ibs
ib_idx = local_ib_patch_ids(i)
call s_pack_ib_state(patch_ib(ib_idx), mytime, ib_buf, f_ib_mass_bank(patch_ib(ib_idx)%gbl_patch_id))
call s_pack_ib_state(patch_ib(ib_idx), mytime, ib_buf, patch_ib(ib_idx)%mass_bank)

! Global IB index determines position in file
disp = int(patch_ib(ib_idx)%gbl_patch_id - 1, MPI_OFFSET_KIND)*int(ib_state_nfields, MPI_OFFSET_KIND)*WP_MOK
Expand Down Expand Up @@ -1249,7 +1249,7 @@ contains
if (ios /= 0) call s_mpi_abort('Cannot open IB state output file: ' // trim(file_loc))

do i = 1, num_ibs
call s_pack_ib_state(patch_ib(i), mytime, ib_buf, f_ib_mass_bank(patch_ib(i)%gbl_patch_id))
call s_pack_ib_state(patch_ib(i), mytime, ib_buf, patch_ib(i)%mass_bank)

write (file_unit) ib_buf
end do
Expand Down Expand Up @@ -1447,9 +1447,6 @@ contains
integer, intent(in) :: time_step

$:GPU_UPDATE(host='[patch_ib(1:num_ibs)]')
if (ib_mass_relax > 0) then
$:GPU_UPDATE(host='[ib_mass_res]')
end if

if (parallel_io) then
call s_write_parallel_ib_state(time_step)
Expand Down
Loading
Loading