Skip to content

Commit a123fe0

Browse files
committed
adding woverq warnings to julia methods
1 parent 555cf24 commit a123fe0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/absorb.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ function setup_q_profile_2D_serial!(w_inv_q::Array{T,2}, freesurface::Bool, nspo
22
dt::T, q_freq::T, q_min::T, q_interior::T) where T<:Float32
33
# check for unphysical q pairing
44
if (q_min < eps(T)) && (q_interior < eps(T))
5+
@warn "q_min & q_interior set to less than machine epsilon; setting wOverQ to zero"
56
w_inv_q .= zero(T)
67
return
78
end
@@ -48,6 +49,7 @@ function setup_q_profile_2D_threaded!(w_inv_q::Array{T,2}, freesurface, nsponge:
4849
dt::T, q_freq::T, q_min::T, q_interior::T) where T<:Float32
4950
# check for unphysical q pairing
5051
if (q_min < eps(T)) && (q_interior < eps(T))
52+
@warn "q_min & q_interior set to less than machine epsilon; setting wOverQ to zero"
5153
w_inv_q .= zero(T)
5254
return
5355
end
@@ -76,6 +78,7 @@ function setup_q_profile_3D_serial!(w_inv_q::Array{T,3}, freesurface::Bool, nspo
7678
dt::T, q_freq::T, q_min::T, q_interior::T) where T<:Float32
7779
# check for unphysical q pairing
7880
if (q_min < eps(T)) && (q_interior < eps(T))
81+
@warn "q_min & q_interior set to less than machine epsilon; setting wOverQ to zero"
7982
w_inv_q .= zero(T)
8083
return
8184
end
@@ -113,6 +116,7 @@ function setup_q_profile_3D_threaded!(w_inv_q::Array{T,3}, freesurface, nsponge:
113116

114117
# check for unphysical q pairing
115118
if (q_min < eps(T)) && (q_interior < eps(T))
119+
@warn "q_min & q_interior set to less than machine epsilon; setting wOverQ to zero"
116120
w_inv_q .= zero(T)
117121
return
118122
end

0 commit comments

Comments
 (0)