Skip to content

Commit dc48cdb

Browse files
authored
Fix seg fault when fd_order is on (#704)
1 parent 78a810f commit dc48cdb

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/simulation/m_global_parameters.fpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,6 +1015,10 @@ contains
10151015
buff_size = weno_polyn + 2
10161016
end if
10171017

1018+
if (probe_wrt) then
1019+
fd_number = max(1, fd_order/2)
1020+
end if
1021+
10181022
! Configuring Coordinate Direction Indexes =========================
10191023
idwint(1)%beg = 0; idwint(2)%beg = 0; idwint(3)%beg = 0
10201024
idwint(1)%end = m; idwint(2)%end = n; idwint(3)%end = p
@@ -1037,11 +1041,6 @@ contains
10371041
& idwbuff(3)%beg:idwbuff(3)%end))
10381042
end if
10391043

1040-
if (probe_wrt) then
1041-
fd_number = max(1, fd_order/2)
1042-
buff_size = buff_size + fd_number
1043-
end if
1044-
10451044
startx = -buff_size
10461045
starty = 0
10471046
startz = 0

0 commit comments

Comments
 (0)