diff --git a/Project.toml b/Project.toml index d5adea8c81..cee54e8249 100644 --- a/Project.toml +++ b/Project.toml @@ -37,6 +37,7 @@ WriteVTK = "64499a7a-5c06-52f2-abe2-ccb03c286192" CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" OrdinaryDiffEqCore = "bbf590c4-e513-4bbe-9b18-05decba2e5d8" OrdinaryDiffEqSymplecticRK = "fa646aed-7ef9-47eb-84c4-9443fc8cbfa8" +Static = "aedffcd0-7271-4cad-89d0-dc628f76c6d3" [extensions] TrixiParticlesOrdinaryDiffEqSymplecticRKExt = ["OrdinaryDiffEqSymplecticRK", "OrdinaryDiffEqCore"] @@ -64,6 +65,7 @@ ReadVTK = "0.2" RecipesBase = "1" Reexport = "1" SciMLBase = "2" +Static = "<1.4" StaticArrays = "1" Statistics = "1" StrideArraysCore = "0.5.7" diff --git a/examples/fluid/dam_break_2d_gpu.jl b/examples/fluid/dam_break_2d_gpu.jl index 8051af1838..40d4727dfa 100644 --- a/examples/fluid/dam_break_2d_gpu.jl +++ b/examples/fluid/dam_break_2d_gpu.jl @@ -24,7 +24,7 @@ tspan = (0.0, 5.7 / sqrt(9.81 / 0.6)) trixi_include(@__MODULE__, joinpath(examples_dir(), "fluid", "dam_break_2d.jl"), fluid_particle_spacing=0.6 / 40, spacing_ratio=1, boundary_layers=4, - coordinates_eltype=Float64, tspan, sol=nothing, ode=nothing) + coordinates_eltype=Float64, tspan=tspan, sol=nothing, ode=nothing) # Define a GPU-compatible neighborhood search min_corner = minimum(tank.boundary.coordinates, dims=2) @@ -35,8 +35,12 @@ neighborhood_search = GridNeighborhoodSearch{2}(; cell_list) # Run the dam break simulation with this neighborhood search trixi_include(@__MODULE__, joinpath(examples_dir(), "fluid", "dam_break_2d.jl"), - neighborhood_search, fluid_particle_spacing, - tspan, smoothing_length, density_diffusion, - boundary_layers, spacing_ratio, boundary_model, - parallelization_backend=PolyesterBackend(), boundary_density_calculator, + neighborhood_search=neighborhood_search, + fluid_particle_spacing=fluid_particle_spacing, + tspan=tspan, smoothing_length=smoothing_length, + density_diffusion=density_diffusion, + boundary_layers=boundary_layers, spacing_ratio=spacing_ratio, + boundary_model=boundary_model, + parallelization_backend=PolyesterBackend(), + boundary_density_calculator=boundary_density_calculator, coordinates_eltype=Float64) diff --git a/examples/fsi/falling_rotating_rigid_squares_2d.jl b/examples/fsi/falling_rotating_rigid_squares_2d.jl index d24b0d8697..b4758e39db 100644 --- a/examples/fsi/falling_rotating_rigid_squares_2d.jl +++ b/examples/fsi/falling_rotating_rigid_squares_2d.jl @@ -107,7 +107,8 @@ function structure_boundary_model(shape) boundary_density_calculator, fluid_smoothing_kernel, fluid_smoothing_length; - state_equation) + state_equation, + clip_negative_pressure=true) end boundary_model_structure_1 = structure_boundary_model(square1) diff --git a/src/io/read_vtk.jl b/src/io/read_vtk.jl index 39749be009..86bae1af77 100644 --- a/src/io/read_vtk.jl +++ b/src/io/read_vtk.jl @@ -67,7 +67,7 @@ function vtk2trixi(file; element_type=nothing, coordinates_eltype=nothing, for field in fields # First look for an exact key match, then fall back to substring matching. all_keys = keys(point_data) - idx = findfirst(k -> k == field, all_keys) + idx = findfirst(k -> k == string(field), all_keys) if idx === nothing idx = findfirst(k -> occursin(string(field), k), all_keys) end diff --git a/test/systems/iisph_system.jl b/test/systems/iisph_system.jl index cf2b5e20aa..2bcd740552 100644 --- a/test/systems/iisph_system.jl +++ b/test/systems/iisph_system.jl @@ -123,12 +123,12 @@ time_step=0.001) # time_step must be strictly positive - error_str7 = "`time_step must be a positive number" - @test_throws ArgumentError(error_str6) ImplicitIncompressibleSPHSystem(initial_condition; + error_str7 = "`time_step` must be a positive number" + @test_throws ArgumentError(error_str7) ImplicitIncompressibleSPHSystem(initial_condition; smoothing_kernel, smoothing_length, reference_density, - min_iterations=10, + min_iterations=1, max_iterations=5, time_step=0) end