Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
svchb committed Dec 1, 2023
1 parent a0c9694 commit b0a22e4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 24 deletions.
5 changes: 1 addition & 4 deletions src/schemes/boundary/rhs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ end
# For dummy particles with `ContinuityDensity`, solve the continuity equation
function interact!(dv, v_particle_system, u_particle_system,
v_neighbor_system, u_neighbor_system, neighborhood_search,
particle_system::BoundarySPHSystem{
<:BoundaryModelDummyParticles{
ContinuityDensity
}},
particle_system::BoundarySPHSystem{<:BoundaryModelDummyParticles{ContinuityDensity}},
neighbor_system::FluidSystem)
(; boundary_model) = particle_system

Expand Down
15 changes: 3 additions & 12 deletions src/schemes/boundary/system.jl
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,7 @@ end
return 0
end

@inline function n_moving_particles(system::BoundarySPHSystem{
<:BoundaryModelDummyParticles{
ContinuityDensity
}
})
@inline function n_moving_particles(system::BoundarySPHSystem{<:BoundaryModelDummyParticles{ContinuityDensity}})
return nparticles(system)
end

Expand Down Expand Up @@ -238,9 +234,7 @@ function write_v0!(v0, system::BoundarySPHSystem)
end

function write_v0!(v0,
system::BoundarySPHSystem{
<:BoundaryModelDummyParticles{ContinuityDensity
}})
system::BoundarySPHSystem{<:BoundaryModelDummyParticles{ContinuityDensity}})
(; cache) = system.boundary_model
(; initial_density) = cache

Expand All @@ -256,10 +250,7 @@ function restart_with!(system::BoundarySPHSystem, v, u)
return system
end

function restart_with!(system::BoundarySPHSystem{
<:BoundaryModelDummyParticles{
ContinuityDensity
}},
function restart_with!(system::BoundarySPHSystem{<:BoundaryModelDummyParticles{ContinuityDensity}},
v, u)
(; initial_density) = model.cache

Expand Down
4 changes: 1 addition & 3 deletions src/schemes/solid/total_lagrangian_sph/rhs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,7 @@ end

@inline function continuity_equation!(dv, v_particle_system, v_neighbor_system,
particle, neighbor, pos_diff, distance,
particle_system::TotalLagrangianSPHSystem{
<:BoundaryModelDummyParticles
},
particle_system::TotalLagrangianSPHSystem{<:BoundaryModelDummyParticles},
neighbor_system::WeaklyCompressibleSPHSystem)
(; density_calculator) = particle_system.boundary_model

Expand Down
6 changes: 1 addition & 5 deletions src/schemes/solid/total_lagrangian_sph/system.jl
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,7 @@ timer_name(::TotalLagrangianSPHSystem) = "solid"
return ndims(system)
end

@inline function v_nvariables(system::TotalLagrangianSPHSystem{
<:BoundaryModelDummyParticles{
ContinuityDensity
}
})
@inline function v_nvariables(system::TotalLagrangianSPHSystem{<:BoundaryModelDummyParticles{ContinuityDensity}})
return ndims(system) + 1
end

Expand Down

0 comments on commit b0a22e4

Please sign in to comment.