Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down Expand Up @@ -64,6 +65,7 @@ ReadVTK = "0.2"
RecipesBase = "1"
Reexport = "1"
SciMLBase = "2"
Static = "<1.4"
StaticArrays = "1"
Statistics = "1"
StrideArraysCore = "0.5.7"
Expand Down
14 changes: 9 additions & 5 deletions examples/fluid/dam_break_2d_gpu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
3 changes: 2 additions & 1 deletion examples/fsi/falling_rotating_rigid_squares_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/io/read_vtk.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions test/systems/iisph_system.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading