Skip to content

Commit

Permalink
Throw a descriptive error message if the equations of subtype Abstrac…
Browse files Browse the repository at this point in the history
…tIdealGlmMhdEquations

are not included in the list of semidiscretizations of AbstractIdealGlmMhdEquations.
  • Loading branch information
SimonCan committed Apr 15, 2024
1 parent 5a0f83b commit 15634bc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/callbacks_step/glm_speed.jl
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ end
u_modified!(integrator, false)
end

# Check that all MHD semidiscretizations received a GLM clening speed update.

Check warning on line 102 in src/callbacks_step/glm_speed.jl

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"clening" should be "cleaning".
for (semi_index, semi) in enumerate(semis)
if (typeof(semi.equations) <: AbstractIdealGlmMhdEquations && !(semi_index in semi_indices))
throw("Equation of semidiscretization $semi_index needs to be included in 'semi_indices' of 'GlmSpeedCallback'.")
end
end

return nothing
end

Expand Down

0 comments on commit 15634bc

Please sign in to comment.