From dc48cdbf22dff51ed471956d1838d88979a69d1e Mon Sep 17 00:00:00 2001 From: Haocheng Yu <98496194+haochey@users.noreply.github.com> Date: Sat, 9 Nov 2024 09:40:39 -0500 Subject: [PATCH] Fix seg fault when fd_order is on (#704) --- src/simulation/m_global_parameters.fpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/simulation/m_global_parameters.fpp b/src/simulation/m_global_parameters.fpp index 519a57886..e59f07b09 100644 --- a/src/simulation/m_global_parameters.fpp +++ b/src/simulation/m_global_parameters.fpp @@ -1015,6 +1015,10 @@ contains buff_size = weno_polyn + 2 end if + if (probe_wrt) then + fd_number = max(1, fd_order/2) + 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 @@ -1037,11 +1041,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