From af90bb76c24671dd937185e5bbf2c89dc7a5e8b4 Mon Sep 17 00:00:00 2001 From: Sven Berger Date: Fri, 23 May 2025 13:51:39 +0200 Subject: [PATCH 1/9] Fix doc test --- docs/src/gpu.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/docs/src/gpu.md b/docs/src/gpu.md index c8fef6b00..ecb12d662 100644 --- a/docs/src/gpu.md +++ b/docs/src/gpu.md @@ -13,13 +13,20 @@ Unlike the default cell list, which assumes an unbounded domain, this cell list requires a bounding box for the domain. For simulations that are bounded by a closed tank, we can simply use the boundary of the tank to obtain the bounding box as follows. -```jldoctest gpu; output=false, setup=:(using TrixiParticles; trixi_include(@__MODULE__, joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl"), sol=nothing)) +```setup = :( + using TrixiParticles; + trixi_include(@__MODULE__, + joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl"), + sol = nothing) + ), + output = :( + Regex( + """^FullGridCellList\{.*\}\(.*\[-?0\.12500000000000003, -?0\.12500000000000003\].*\[1\.125, 1\.125\].*\)$""" + ) + ) min_corner = minimum(tank.boundary.coordinates, dims=2) max_corner = maximum(tank.boundary.coordinates, dims=2) -cell_list = FullGridCellList(; min_corner, max_corner) - -# output -FullGridCellList{PointNeighbors.DynamicVectorOfVectors{Int32, Matrix{Int32}, Vector{Int32}, Base.RefValue{Int32}}, Nothing, SVector{2, Float64}, SVector{2, Float64}}(Vector{Int32}[], nothing, [-0.12500000000000003, -0.12500000000000003], [1.125, 1.125]) +FullGridCellList(; min_corner, max_corner) ``` We then need to pass this cell list to the neighborhood search and the neighborhood search From 9ae41a6d28b5b01e638ac8eb3ddaf30bd7f04919 Mon Sep 17 00:00:00 2001 From: Sven Berger Date: Fri, 23 May 2025 13:52:50 +0200 Subject: [PATCH 2/9] forgot something --- docs/src/gpu.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/src/gpu.md b/docs/src/gpu.md index ecb12d662..59bb67d01 100644 --- a/docs/src/gpu.md +++ b/docs/src/gpu.md @@ -13,7 +13,8 @@ Unlike the default cell list, which assumes an unbounded domain, this cell list requires a bounding box for the domain. For simulations that are bounded by a closed tank, we can simply use the boundary of the tank to obtain the bounding box as follows. -```setup = :( +```jldoctest gpu; +setup = :( using TrixiParticles; trixi_include(@__MODULE__, joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl"), From e2e81ee9cef18c277875ebf0317e1a536dd6c8a8 Mon Sep 17 00:00:00 2001 From: Sven Berger Date: Fri, 23 May 2025 13:53:47 +0200 Subject: [PATCH 3/9] fix --- docs/src/gpu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/gpu.md b/docs/src/gpu.md index 59bb67d01..80fb42226 100644 --- a/docs/src/gpu.md +++ b/docs/src/gpu.md @@ -27,7 +27,7 @@ setup = :( ) min_corner = minimum(tank.boundary.coordinates, dims=2) max_corner = maximum(tank.boundary.coordinates, dims=2) -FullGridCellList(; min_corner, max_corner) +cell_list = FullGridCellList(; min_corner, max_corner) ``` We then need to pass this cell list to the neighborhood search and the neighborhood search From 06a7cbfb2e2a8c7414fd9312e0dec0eebff12c69 Mon Sep 17 00:00:00 2001 From: Sven Berger Date: Fri, 23 May 2025 14:16:44 +0200 Subject: [PATCH 4/9] fix --- docs/src/gpu.md | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/docs/src/gpu.md b/docs/src/gpu.md index 80fb42226..8e07c9ca9 100644 --- a/docs/src/gpu.md +++ b/docs/src/gpu.md @@ -13,18 +13,7 @@ Unlike the default cell list, which assumes an unbounded domain, this cell list requires a bounding box for the domain. For simulations that are bounded by a closed tank, we can simply use the boundary of the tank to obtain the bounding box as follows. -```jldoctest gpu; -setup = :( - using TrixiParticles; - trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl"), - sol = nothing) - ), - output = :( - Regex( - """^FullGridCellList\{.*\}\(.*\[-?0\.12500000000000003, -?0\.12500000000000003\].*\[1\.125, 1\.125\].*\)$""" - ) - ) +```jldoctest gpu; setup = :(using TrixiParticles; trixi_include(@__MODULE__, joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl"), sol = nothing)), output = :(Regex("""^FullGridCellList\{.*\}\(.*\[-?0\.12500000000000003, -?0\.12500000000000003\].*\[1\.125, 1\.125\].*\)$""")) min_corner = minimum(tank.boundary.coordinates, dims=2) max_corner = maximum(tank.boundary.coordinates, dims=2) cell_list = FullGridCellList(; min_corner, max_corner) From 87ccc63f85557f244cdb159cba68b74e7d2dce28 Mon Sep 17 00:00:00 2001 From: Sven Berger Date: Fri, 23 May 2025 14:36:47 +0200 Subject: [PATCH 5/9] fix --- docs/src/gpu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/gpu.md b/docs/src/gpu.md index 8e07c9ca9..0a1fbda03 100644 --- a/docs/src/gpu.md +++ b/docs/src/gpu.md @@ -13,7 +13,7 @@ Unlike the default cell list, which assumes an unbounded domain, this cell list requires a bounding box for the domain. For simulations that are bounded by a closed tank, we can simply use the boundary of the tank to obtain the bounding box as follows. -```jldoctest gpu; setup = :(using TrixiParticles; trixi_include(@__MODULE__, joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl"), sol = nothing)), output = :(Regex("""^FullGridCellList\{.*\}\(.*\[-?0\.12500000000000003, -?0\.12500000000000003\].*\[1\.125, 1\.125\].*\)$""")) +```jldoctest gpu; setup = :(using TrixiParticles; trixi_include(@__MODULE__, joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl"), sol = nothing)), output = :(Regex(raw"""^FullGridCellList\{.*\}\(.*\[-?0\.12500000000000003, -?0\.12500000000000003\].*\[1\.125, 1\.125\].*\)$""")) min_corner = minimum(tank.boundary.coordinates, dims=2) max_corner = maximum(tank.boundary.coordinates, dims=2) cell_list = FullGridCellList(; min_corner, max_corner) From c3cb61992fa4b2ee21ba19f1b0178a337ae4f556 Mon Sep 17 00:00:00 2001 From: Sven Berger Date: Fri, 23 May 2025 14:55:04 +0200 Subject: [PATCH 6/9] fix --- docs/src/gpu.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/src/gpu.md b/docs/src/gpu.md index 0a1fbda03..d8b8190b5 100644 --- a/docs/src/gpu.md +++ b/docs/src/gpu.md @@ -14,9 +14,10 @@ this cell list requires a bounding box for the domain. For simulations that are bounded by a closed tank, we can simply use the boundary of the tank to obtain the bounding box as follows. ```jldoctest gpu; setup = :(using TrixiParticles; trixi_include(@__MODULE__, joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl"), sol = nothing)), output = :(Regex(raw"""^FullGridCellList\{.*\}\(.*\[-?0\.12500000000000003, -?0\.12500000000000003\].*\[1\.125, 1\.125\].*\)$""")) -min_corner = minimum(tank.boundary.coordinates, dims=2) -max_corner = maximum(tank.boundary.coordinates, dims=2) -cell_list = FullGridCellList(; min_corner, max_corner) +julia> min_corner = minimum(tank.boundary.coordinates, dims=2) +julia> max_corner = maximum(tank.boundary.coordinates, dims=2) +julia> cell_list = FullGridCellList(; min_corner, max_corner) +julia> cell_list ``` We then need to pass this cell list to the neighborhood search and the neighborhood search From 657dd06124eb661250e87eb0956f82c89a2bae54 Mon Sep 17 00:00:00 2001 From: Sven Berger Date: Fri, 23 May 2025 15:09:21 +0200 Subject: [PATCH 7/9] fix --- docs/src/gpu.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/src/gpu.md b/docs/src/gpu.md index d8b8190b5..a80ef41e0 100644 --- a/docs/src/gpu.md +++ b/docs/src/gpu.md @@ -13,11 +13,12 @@ Unlike the default cell list, which assumes an unbounded domain, this cell list requires a bounding box for the domain. For simulations that are bounded by a closed tank, we can simply use the boundary of the tank to obtain the bounding box as follows. -```jldoctest gpu; setup = :(using TrixiParticles; trixi_include(@__MODULE__, joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl"), sol = nothing)), output = :(Regex(raw"""^FullGridCellList\{.*\}\(.*\[-?0\.12500000000000003, -?0\.12500000000000003\].*\[1\.125, 1\.125\].*\)$""")) -julia> min_corner = minimum(tank.boundary.coordinates, dims=2) -julia> max_corner = maximum(tank.boundary.coordinates, dims=2) -julia> cell_list = FullGridCellList(; min_corner, max_corner) -julia> cell_list +```jldoctest gpu; output=false, setup=:(using TrixiParticles; trixi_include(@__MODULE__, joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl"), sol=nothing)) +min_corner = minimum(tank.boundary.coordinates, dims=2) +max_corner = maximum(tank.boundary.coordinates, dims=2) +cell_list = FullGridCellList(; min_corner, max_corner) +# output +Regex(raw"""^FullGridCellList\{.*\}\(.*\[-?0\.12500000000000003, -?0\.12500000000000003\].*\[1\.125, 1\.125\].*\)$""") ``` We then need to pass this cell list to the neighborhood search and the neighborhood search From 1539160deedf49cf69951fd5d208b69b848e1660 Mon Sep 17 00:00:00 2001 From: Sven Berger Date: Fri, 23 May 2025 15:31:10 +0200 Subject: [PATCH 8/9] fix --- docs/src/gpu.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/src/gpu.md b/docs/src/gpu.md index a80ef41e0..3eef43131 100644 --- a/docs/src/gpu.md +++ b/docs/src/gpu.md @@ -13,12 +13,14 @@ Unlike the default cell list, which assumes an unbounded domain, this cell list requires a bounding box for the domain. For simulations that are bounded by a closed tank, we can simply use the boundary of the tank to obtain the bounding box as follows. -```jldoctest gpu; output=false, setup=:(using TrixiParticles; trixi_include(@__MODULE__, joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl"), sol=nothing)) +```jldoctest gpu; output=false, filter = r"FullGridCellList{PointNeighbors.DynamicVectorOfVectors{.*", setup=:(using TrixiParticles; trixi_include(@__MODULE__, joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl"), sol=nothing)) min_corner = minimum(tank.boundary.coordinates, dims=2) max_corner = maximum(tank.boundary.coordinates, dims=2) cell_list = FullGridCellList(; min_corner, max_corner) + # output -Regex(raw"""^FullGridCellList\{.*\}\(.*\[-?0\.12500000000000003, -?0\.12500000000000003\].*\[1\.125, 1\.125\].*\)$""") +FullGridCellList{PointNeighbors.DynamicVectorOfVectors{...}(Vector{Int32}[], nothing, [-0.12500000000000003, -0.12500000000000003], [1.125, 1.125]) + ``` We then need to pass this cell list to the neighborhood search and the neighborhood search From 2403ade623d6770c15056cd65c81c1fc61900088 Mon Sep 17 00:00:00 2001 From: Sven Berger Date: Fri, 23 May 2025 16:24:54 +0200 Subject: [PATCH 9/9] Update docs/src/gpu.md Co-authored-by: Erik Faulhaber <44124897+efaulhaber@users.noreply.github.com> --- docs/src/gpu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/gpu.md b/docs/src/gpu.md index 3eef43131..61d92b90a 100644 --- a/docs/src/gpu.md +++ b/docs/src/gpu.md @@ -19,7 +19,7 @@ max_corner = maximum(tank.boundary.coordinates, dims=2) cell_list = FullGridCellList(; min_corner, max_corner) # output -FullGridCellList{PointNeighbors.DynamicVectorOfVectors{...}(Vector{Int32}[], nothing, [-0.12500000000000003, -0.12500000000000003], [1.125, 1.125]) +FullGridCellList{PointNeighbors.DynamicVectorOfVectors{...}(...) ```