Skip to content

Commit

Permalink
initialize! refinement
Browse files Browse the repository at this point in the history
  • Loading branch information
LasNikas committed Nov 7, 2024
1 parent 7aa73bf commit 989bbfd
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions src/multi_resolution/particle_refinement.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
struct ParticleRefinement{SP}
splitting_pattern :: SP
struct ParticleRefinement{SP, ELTYPE}
splitting_pattern :: SP
particle_spacing_min :: ELTYPE
smoothing_length_factor :: Vector{ELTYPE}
end

function initialize!(particle_refinement, semi)
(; particle_spacing_min) = particle_refinement

particle_spacing_min = zero(eltype(particle_refinement))

foreach_system(semi) do system
(; particle_spacing) = system.inital_condition
particle_spacing_min[] = min(particle_spacing_min, particle_spacing)
end

return particle_refinement
end

function refinement!(semi, v_ode, u_ode, v_tmp, u_tmp, t)
# check refnement criteria
Expand Down Expand Up @@ -34,3 +47,6 @@ function refinement!(semi, v_ode, u_ode, v_tmp, u_tmp, t)

return semi
end

function update_particle_spacing()
end

0 comments on commit 989bbfd

Please sign in to comment.