Skip to content

Commit

Permalink
rm redundant functions
Browse files Browse the repository at this point in the history
  • Loading branch information
LasNikas committed Nov 8, 2024
1 parent dc48db5 commit 9e7d993
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 37 deletions.
4 changes: 2 additions & 2 deletions src/multi_resolution/resize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ function deleteat!(system::FluidSystem, refinement, v, u)
system.mass[particle] = mass_keep
system.cache.smoothing_length[particle] = smoothing_length_keep

set_particle_pressure!(system, v, particle, pressure_keep)
set_particle_pressure!( v, system,particle, pressure_keep)

set_particle_density!(system, v, particle, density_keep)
set_particle_density!(v, system, particle, density_keep)

for dim in 1:ndims(system)
v[dim, particle] = vel_keep[dim]
Expand Down
39 changes: 4 additions & 35 deletions src/multi_resolution/split.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ end

system.mass[particle] = mass_old / nchilds(system, refinement_pattern)

set_particle_pressure!(system, v, partice, pressure)
set_particle_pressure!(v, system, partice, pressure)

Check warning on line 71 in src/multi_resolution/split.jl

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"partice" should be "particle".

set_particle_density!(system, v, partice, density)
set_particle_density!(v, system, partice, density)

Check warning on line 73 in src/multi_resolution/split.jl

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"partice" should be "particle".

smoothing_length[particle] = alpha * smoothing_length_old

Expand All @@ -82,9 +82,9 @@ end

system.mass[child] = mass_old / nchilds(system, refinement_pattern)

set_particle_pressure!(system, v, child, pressure)
set_particle_pressure!(v, system, child, pressure)

set_particle_density!(system, v, child, density)
set_particle_density!(v, system, child, density)

smoothing_length[child] = alpha * smoothing_length_old

Expand All @@ -101,34 +101,3 @@ end

return system
end

function set_particle_pressure!(system::WeaklyCompressibleSPHSystem, v, particle, pressure)
system.pressure[particle] = pressure
return system
end

function set_particle_pressure!(system::EntropicallyDampedSPHSystem, v, particle, pressure)
v[particle, end] = pressure
return system
end

function set_particle_density!(system, v, particle, density)
return set_particle_density!(system, system.density_calculator, v, particle, density)
end

function set_particle_density!(system::WeaklyCompressibleSPHSystem, ::ContinuityDensity, v,
particle, density)
v[particle, end] = density
return system
end

function set_particle_density!(system::EntropicallyDampedSPHSystem, ::ContinuityDensity, v,
particle, density)
v[particle, end - 1] = density
return system
end

function set_particle_density!(system, ::SummationDensity, v, particle, density)
system.cache[particle] = density
return system
end

0 comments on commit 9e7d993

Please sign in to comment.