Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Hendrik Ranocha <[email protected]>
  • Loading branch information
DanielDoehring and ranocha authored Jul 3, 2024
1 parent 6345c6f commit a2f972b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions examples/tree_1d_dgsem/elixir_maxwell_E_excitation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, solver)
###############################################################################
# ODE solvers, callbacks etc.

# As the wave speed is equal to the speed of light which is on the order of 3 * 10^8
# we consider only a small time horizon.
ode = semidiscretize(semi, (0.0, 1e-7));

summary_callback = SummaryCallback()
Expand Down
2 changes: 2 additions & 0 deletions examples/tree_1d_dgsem/elixir_maxwell_convergence.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition_convergen
###############################################################################
# ODE solvers, callbacks etc.

# As the wave speed is equal to the speed of light which is on the order of 3 * 10^8
# we consider only a small time horizon.
ode = semidiscretize(semi, (0.0, 1e-8));

summary_callback = SummaryCallback()
Expand Down
4 changes: 2 additions & 2 deletions src/equations/maxwell_1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct MaxwellEquations1D{RealT <: Real} <:
speed_of_light::SVector{1, RealT} # c
end

function MaxwellEquations1D(c::Real = 299792458)
function MaxwellEquations1D(c::Real = 299_792_458.0)
MaxwellEquations1D(SVector(c))
end

Expand Down Expand Up @@ -67,7 +67,7 @@ function initial_condition_convergence_test(x, t, equations::MaxwellEquations1D)
return SVector(E, B)
end

# Calculate 1D flux in for a single point
# Calculate 1D flux for a single point
@inline function flux(u, orientation::Integer,
equations::MaxwellEquations1D)
E, B = u
Expand Down

0 comments on commit a2f972b

Please sign in to comment.