Skip to content

Commit bd143fe

Browse files
authored
Fix seg fault issue when fd_order is on
buff_size changed for idwbuff but not updated for startx, starty, and startz.
1 parent 6bad379 commit bd143fe

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/simulation/m_global_parameters.fpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,6 +1057,11 @@ contains
10571057
buff_size = weno_polyn + 2
10581058
end if
10591059

1060+
if (probe_wrt) then
1061+
fd_number = max(1, fd_order/2)
1062+
buff_size = buff_size + fd_number
1063+
end if
1064+
10601065
! Configuring Coordinate Direction Indexes =========================
10611066
idwint(1)%beg = 0; idwint(2)%beg = 0; idwint(3)%beg = 0
10621067
idwint(1)%end = m; idwint(2)%end = n; idwint(3)%end = p
@@ -1079,11 +1084,6 @@ contains
10791084
& idwbuff(3)%beg:idwbuff(3)%end))
10801085
end if
10811086

1082-
if (probe_wrt) then
1083-
fd_number = max(1, fd_order/2)
1084-
buff_size = buff_size + fd_number
1085-
end if
1086-
10871087
startx = -buff_size
10881088
starty = 0
10891089
startz = 0

0 commit comments

Comments
 (0)