Skip to content

Commit c5fa956

Browse files
author
LasNikas
committed
fix gpu again
1 parent fb9f333 commit c5fa956

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

src/schemes/boundary/open_boundary/mirroring.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ to retrieve first order kernel and particle consistency.
1010
"""
1111
struct FirstOrderMirroring{ELTYPE}
1212
firstorder_tolerance::ELTYPE
13-
function FirstOrderMirroring(; firstorder_tolerance::Real=1/1000)
13+
function FirstOrderMirroring(; firstorder_tolerance::Real=1e-3)
1414
return new{typeof(firstorder_tolerance)}(firstorder_tolerance)
1515
end
1616
end
@@ -27,7 +27,7 @@ the corrected gradient as proposed by [Negi et al. (2022)](@cite Negi2022).
2727
"""
2828
struct SimpleMirroring{ELTYPE}
2929
firstorder_tolerance::ELTYPE
30-
function SimpleMirroring(; firstorder_tolerance::Real=1/1000)
30+
function SimpleMirroring(; firstorder_tolerance::Real=1e-3)
3131
return new{typeof(firstorder_tolerance)}(firstorder_tolerance)
3232
end
3333
end
@@ -63,7 +63,7 @@ end
6363

6464
function BoundaryModelTafuni(;
6565
mirror_method=FirstOrderMirroring(;
66-
firstorder_tolerance=1/1000))
66+
firstorder_tolerance=1e-3))
6767
return BoundaryModelTafuni(mirror_method)
6868
end
6969

test/examples/gpu.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,9 @@ end
319319
joinpath(examples_dir(),
320320
"fluid",
321321
"pipe_flow_2d.jl"),
322-
open_boundary_model=BoundaryModelTafuni(),
322+
open_boundary_model=BoundaryModelTafuni(;
323+
mirror_method=FirstOrderMirroring(;
324+
firstorder_tolerance=0.001f0)),
323325
boundary_type_in=BidirectionalFlow(),
324326
boundary_type_out=BidirectionalFlow(),
325327
reference_density_in=nothing,
@@ -340,7 +342,9 @@ end
340342
"pipe_flow_2d.jl"),
341343
wcsph=true, sound_speed=20.0f0,
342344
pressure=0.0f0,
343-
open_boundary_model=BoundaryModelTafuni(),
345+
open_boundary_model=BoundaryModelTafuni(;
346+
mirror_method=FirstOrderMirroring(;
347+
firstorder_tolerance=0.001f0)),
344348
boundary_type_in=BidirectionalFlow(),
345349
boundary_type_out=BidirectionalFlow(),
346350
reference_density_in=nothing,

0 commit comments

Comments
 (0)