Skip to content

Commit

Permalink
Fix seg fault when fd_order is on (#704)
Browse files Browse the repository at this point in the history
  • Loading branch information
haochey authored Nov 9, 2024
1 parent 78a810f commit dc48cdb
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/simulation/m_global_parameters.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit dc48cdb

Please sign in to comment.