Skip to content

Commit

Permalink
start
Browse files Browse the repository at this point in the history
  • Loading branch information
huiyuxie committed Aug 26, 2024
1 parent 90eebb0 commit e5f8a5d
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
7 changes: 4 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ authors = ["Michael Schlottke-Lakemper <[email protected]>", "Gregor
version = "0.8.9-DEV"

[deps]
Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697"
CodeTracking = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2"
ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9"
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
Expand Down Expand Up @@ -50,13 +51,13 @@ TrixiBase = "9a0f1c46-06d5-4909-a5a3-ce25d3fa3284"
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

[weakdeps]
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
Convex = "f65535da-76fb-5f13-bab9-19810c17039a"
ECOS = "e2685f51-7e38-5353-a97d-a921fd2c8199"
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"

[extensions]
TrixiMakieExt = "Makie"
TrixiConvexECOSExt = ["Convex", "ECOS"]
TrixiMakieExt = "Makie"

[compat]
CodeTracking = "1.0.5"
Expand Down Expand Up @@ -109,6 +110,6 @@ UUIDs = "1.6"
julia = "1.8"

[extras]
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
Convex = "f65535da-76fb-5f13-bab9-19810c17039a"
ECOS = "e2685f51-7e38-5353-a97d-a921fd2c8199"
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
1 change: 1 addition & 0 deletions src/Trixi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module Trixi
# Include other packages that are used in Trixi.jl
# (standard library packages first, other packages next, all of them sorted alphabetically)

using Accessors: @reset
using LinearAlgebra: LinearAlgebra, Diagonal, diag, dot, mul!, norm, cross, normalize, I,
UniformScaling, det
using Printf: @printf, @sprintf, println
Expand Down
2 changes: 1 addition & 1 deletion src/callbacks_step/glm_speed.jl
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function update_cleaning_speed!(semi, glm_speed_callback, dt)
c_h_deltat = calc_dt_for_cleaning_speed(cfl, mesh, equations, solver, cache)

# c_h is proportional to its own time step divided by the complete MHD time step
equations.c_h = glm_scale * c_h_deltat / dt
@reset equations.c_h = glm_scale * c_h_deltat / dt

return semi
end
Expand Down
4 changes: 2 additions & 2 deletions src/equations/ideal_glm_mhd_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
The ideal compressible GLM-MHD equations for an ideal gas with ratio of
specific heats `gamma` in two space dimensions.
"""
mutable struct IdealGlmMhdEquations2D{RealT <: Real} <:
AbstractIdealGlmMhdEquations{2, 9}
struct IdealGlmMhdEquations2D{RealT <: Real} <:
AbstractIdealGlmMhdEquations{2, 9}
gamma::RealT # ratio of specific heats
inv_gamma_minus_one::RealT # = inv(gamma - 1); can be used to write slow divisions as fast multiplications
c_h::RealT # GLM cleaning speed
Expand Down
4 changes: 2 additions & 2 deletions src/equations/ideal_glm_mhd_3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
The ideal compressible GLM-MHD equations for an ideal gas with ratio of
specific heats `gamma` in three space dimensions.
"""
mutable struct IdealGlmMhdEquations3D{RealT <: Real} <:
AbstractIdealGlmMhdEquations{3, 9}
struct IdealGlmMhdEquations3D{RealT <: Real} <:
AbstractIdealGlmMhdEquations{3, 9}
gamma::RealT # ratio of specific heats
inv_gamma_minus_one::RealT # = inv(gamma - 1); can be used to write slow divisions as fast multiplications
c_h::RealT # GLM cleaning speed
Expand Down
2 changes: 1 addition & 1 deletion src/semidiscretization/semidiscretization_coupled.jl
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ function update_cleaning_speed!(semi_coupled::SemidiscretizationCoupled,
c_h_deltat = calc_dt_for_cleaning_speed(cfl, mesh, equations, solver, cache)

# c_h is proportional to its own time step divided by the complete MHD time step
equations.c_h = glm_scale * c_h_deltat / dt
@reset equations.c_h = glm_scale * c_h_deltat / dt
end

return semi_coupled
Expand Down

0 comments on commit e5f8a5d

Please sign in to comment.