Skip to content

Commit c1db9a3

Browse files
Second Refactoring of IISPH Code (#928)
* Refactoring 2 * Fix error from rebase * Format changed * Add Neighborhood search as argument for the trixi_include function to the dam_break_2d_iisph file * Fix error that occured in the test file * Change return in calculate_sum_d_ij_pj! * Remove allocations in the pressure_solve_iteration function * Change format with JuliaFormatter * Format change * Put together calculate_diagonal_elements function and calculate_predicted_density function * Fix allocations in the pressure solve function * Change format with JuliaFormatter * Changes from PR Review * Move predict advection function into the update quantities function * Changes from PR review * Add if statement for the IISPH tests during allocations with Julia version 1.10 --------- Co-authored-by: Niklas Neher <[email protected]>
1 parent 433e394 commit c1db9a3

File tree

4 files changed

+195
-107
lines changed

4 files changed

+195
-107
lines changed

examples/fluid/dam_break_2d_iisph.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ fluid_system = ImplicitIncompressibleSPHSystem(tank.fluid, smoothing_kernel,
3737
# Run the dam break simulation with these changes
3838
trixi_include(@__MODULE__,
3939
joinpath(examples_dir(), "fluid", "dam_break_2d.jl"),
40+
neighborhood_search=GridNeighborhoodSearch{2}(),
4041
viscosity_fluid=ViscosityAdami(nu=nu),
4142
smoothing_kernel=smoothing_kernel,
4243
smoothing_length=smoothing_length,

src/general/semidiscretization.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,8 @@ function update_systems_and_nhs(v_ode, u_ode, semi, t)
570570
update_quantities!(system, v, u, v_ode, u_ode, semi, t)
571571
end
572572

573+
update_implicit_sph!(semi, v_ode, u_ode, t)
574+
573575
# Perform correction and pressure calculation
574576
foreach_system(semi) do system
575577
v = wrap_v(v_ode, system, semi)

0 commit comments

Comments
 (0)