Skip to content

Commit

Permalink
prim2cons 1D Adv
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielDoehring committed Jul 24, 2024
1 parent f42bb9f commit 1a44499
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/equations/linear_scalar_advection_1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ end

# Convert conservative variables to primitive
@inline cons2prim(u, equation::LinearScalarAdvectionEquation1D) = u
# Convert primitive variables to conservative
@inline prim2cons(u, equation::LinearScalarAdvectionEquation1D) = u

# Convert conservative variables to entropy variables
@inline cons2entropy(u, equation::LinearScalarAdvectionEquation1D) = u
Expand Down
2 changes: 2 additions & 0 deletions src/equations/linear_scalar_advection_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,8 @@ end

# Convert conservative variables to primitive
@inline cons2prim(u, equation::LinearScalarAdvectionEquation2D) = u
# Convert primitive variables to conservative
@inline prim2cons(u, equation::LinearScalarAdvectionEquation1D) = u

# Convert conservative variables to entropy variables
@inline cons2entropy(u, equation::LinearScalarAdvectionEquation2D) = u
Expand Down
2 changes: 2 additions & 0 deletions src/equations/linear_scalar_advection_3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ end

# Convert conservative variables to primitive
@inline cons2prim(u, equation::LinearScalarAdvectionEquation3D) = u
# Convert primitive variables to conservative
@inline prim2cons(u, equation::LinearScalarAdvectionEquation1D) = u

# Convert conservative variables to entropy variables
@inline cons2entropy(u, equation::LinearScalarAdvectionEquation3D) = u
Expand Down

0 comments on commit 1a44499

Please sign in to comment.