Skip to content

Commit

Permalink
add system tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LasNikas committed Dec 7, 2024
1 parent b38174c commit ca11d2e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/general/initial_condition.jl
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,9 @@ function InitialCondition(sol::ODESolution, system, semi; use_final_velocity=fal
density = ic.density[not_too_close]
pressure = ic.pressure[not_too_close]

@info "Removed $(length(too_close)) particles that are too close together"
if length(too_close) > 0
@info "Removed $(length(too_close)) particles that are too close together"
end

return InitialCondition{ndims(ic)}(coordinates, velocity, mass, density, pressure,
ic.particle_spacing)
Expand Down
14 changes: 14 additions & 0 deletions test/examples/examples.jl
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,20 @@
@test sol.retcode == ReturnCode.Success
end
end

@testset verbose=true "Preprocessing" begin
@trixi_testset "preprocessing/packing_2d.jl" begin
@test_nowarn_mod trixi_include(@__MODULE__,
joinpath(examples_dir(), "preprocessing",
"packing_2d.jl"))
@test sol.retcode == ReturnCode.Terminated
end
@trixi_testset "preprocessing/packing_3d.jl" begin
@test_nowarn_mod trixi_include(@__MODULE__,
joinpath(examples_dir(), "preprocessing",
"packing_3d.jl"))
end
end
end

@testset verbose=true "DEM" begin
Expand Down
3 changes: 2 additions & 1 deletion test/preprocessing/preprocessing.jl
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
include("geometries/geometries.jl")
include("geometries/geometries.jl")
include("packing/packing.jl")

0 comments on commit ca11d2e

Please sign in to comment.