From bd143fefabee31efe15ea0357636b624b80a3e28 Mon Sep 17 00:00:00 2001 From: Haocheng Yu <98496194+haochey@users.noreply.github.com> Date: Thu, 7 Nov 2024 10:59:15 -0500 Subject: [PATCH 1/2] Fix seg fault issue when fd_order is on buff_size changed for idwbuff but not updated for startx, starty, and startz. --- src/simulation/m_global_parameters.fpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/simulation/m_global_parameters.fpp b/src/simulation/m_global_parameters.fpp index dd5808ebb6..1cf3020354 100644 --- a/src/simulation/m_global_parameters.fpp +++ b/src/simulation/m_global_parameters.fpp @@ -1057,6 +1057,11 @@ contains buff_size = weno_polyn + 2 end if + if (probe_wrt) then + fd_number = max(1, fd_order/2) + buff_size = buff_size + fd_number + end if + ! Configuring Coordinate Direction Indexes ========================= idwint(1)%beg = 0; idwint(2)%beg = 0; idwint(3)%beg = 0 idwint(1)%end = m; idwint(2)%end = n; idwint(3)%end = p @@ -1079,11 +1084,6 @@ contains & idwbuff(3)%beg:idwbuff(3)%end)) end if - if (probe_wrt) then - fd_number = max(1, fd_order/2) - buff_size = buff_size + fd_number - end if - startx = -buff_size starty = 0 startz = 0 From 6b33565a8857173f017343b9e02ef43b4e5fe949 Mon Sep 17 00:00:00 2001 From: Haocheng Yu <98496194+haochey@users.noreply.github.com> Date: Thu, 7 Nov 2024 15:29:54 -0500 Subject: [PATCH 2/2] Update m_global_parameters.fpp Assign finite difference number and keep the halo region the same. --- src/simulation/m_global_parameters.fpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/simulation/m_global_parameters.fpp b/src/simulation/m_global_parameters.fpp index 08e59d41ac..6e6b20a88e 100644 --- a/src/simulation/m_global_parameters.fpp +++ b/src/simulation/m_global_parameters.fpp @@ -1070,7 +1070,6 @@ contains if (probe_wrt) then fd_number = max(1, fd_order/2) - buff_size = buff_size + fd_number end if ! Configuring Coordinate Direction Indexes =========================