Skip to content

Commit

Permalink
Add comments explaining why weak form is only for conserved terms (#1676
Browse files Browse the repository at this point in the history
)

* Add comments explaining why weak form is only for conserved terms

* Update src/solvers/dg.jl

Co-authored-by: Andrew Winters <[email protected]>

* Update src/solvers/dgsem_structured/dg_2d.jl

Co-authored-by: Andrew Winters <[email protected]>

* Update src/solvers/dg.jl

Co-authored-by: Andrew Winters <[email protected]>

* Update src/solvers/dgsem_structured/dg_3d.jl

Co-authored-by: Andrew Winters <[email protected]>

* Update src/solvers/dgsem_structured/dg_2d.jl

Co-authored-by: Andrew Winters <[email protected]>

* Update src/solvers/dgsem_tree/dg_2d.jl

Co-authored-by: Andrew Winters <[email protected]>

* Update src/solvers/dgsem_tree/dg_1d.jl

Co-authored-by: Andrew Winters <[email protected]>

* Update src/solvers/dgsem_tree/dg_3d.jl

Co-authored-by: Andrew Winters <[email protected]>

* Update src/solvers/dgsem_tree/dg_2d.jl

Co-authored-by: Andrew Winters <[email protected]>

* Update src/solvers/dgsem_tree/dg_3d.jl

Co-authored-by: Andrew Winters <[email protected]>

* Update src/solvers/dgsem_structured/dg_3d.jl

Co-authored-by: Andrew Winters <[email protected]>

* Update src/solvers/dgsem_tree/dg_1d.jl

Co-authored-by: Andrew Winters <[email protected]>

* Update src/solvers/dg.jl

Co-authored-by: Hendrik Ranocha <[email protected]>

---------

Co-authored-by: Andrew Winters <[email protected]>
Co-authored-by: Hendrik Ranocha <[email protected]>
  • Loading branch information
3 people authored Oct 21, 2023
1 parent fc00ac1 commit fcab6a9
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/solvers/dg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ standard textbooks.
Nodal Discontinuous Galerkin Methods: Algorithms, Analysis, and
Applications
[doi: 10.1007/978-0-387-72067-8](https://doi.org/10.1007/978-0-387-72067-8)
`VolumeIntegralWeakForm()` is only implemented for conserved terms as
non-conservative terms should always be discretized in conjunction with a flux-splitting scheme,
see [`VolumeIntegralFluxDifferencing`](@ref).
This treatment is required to achieve, e.g., entropy-stability or well-balancedness.
"""
struct VolumeIntegralWeakForm <: AbstractVolumeIntegral end

Expand Down
7 changes: 7 additions & 0 deletions src/solvers/dgsem_structured/dg_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ function rhs!(du, u, t,
return nothing
end

#=
`weak_form_kernel!` is only implemented for conserved terms as
non-conservative terms should always be discretized in conjunction with a flux-splitting scheme,
see `flux_differencing_kernel!`.
This treatment is required to achieve, e.g., entropy-stability or well-balancedness.
See also https://github.com/trixi-framework/Trixi.jl/issues/1671#issuecomment-1765644064
=#
@inline function weak_form_kernel!(du, u,
element,
mesh::Union{StructuredMesh{2}, UnstructuredMesh2D,
Expand Down
7 changes: 7 additions & 0 deletions src/solvers/dgsem_structured/dg_3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ function rhs!(du, u, t,
return nothing
end

#=
`weak_form_kernel!` is only implemented for conserved terms as
non-conservative terms should always be discretized in conjunction with a flux-splitting scheme,
see `flux_differencing_kernel!`.
This treatment is required to achieve, e.g., entropy-stability or well-balancedness.
See also https://github.com/trixi-framework/Trixi.jl/issues/1671#issuecomment-1765644064
=#
@inline function weak_form_kernel!(du, u,
element,
mesh::Union{StructuredMesh{3}, P4estMesh{3}},
Expand Down
7 changes: 7 additions & 0 deletions src/solvers/dgsem_tree/dg_1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,13 @@ function calc_volume_integral!(du, u,
return nothing
end

#=
`weak_form_kernel!` is only implemented for conserved terms as
non-conservative terms should always be discretized in conjunction with a flux-splitting scheme,
see `flux_differencing_kernel!`.
This treatment is required to achieve, e.g., entropy-stability or well-balancedness.
See also https://github.com/trixi-framework/Trixi.jl/issues/1671#issuecomment-1765644064
=#
@inline function weak_form_kernel!(du, u,
element, mesh::Union{TreeMesh{1}, StructuredMesh{1}},
nonconservative_terms::False, equations,
Expand Down
7 changes: 7 additions & 0 deletions src/solvers/dgsem_tree/dg_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,13 @@ function calc_volume_integral!(du, u,
return nothing
end

#=
`weak_form_kernel!` is only implemented for conserved terms as
non-conservative terms should always be discretized in conjunction with a flux-splitting scheme,
see `flux_differencing_kernel!`.
This treatment is required to achieve, e.g., entropy-stability or well-balancedness.
See also https://github.com/trixi-framework/Trixi.jl/issues/1671#issuecomment-1765644064
=#
@inline function weak_form_kernel!(du, u,
element, mesh::TreeMesh{2},
nonconservative_terms::False, equations,
Expand Down
7 changes: 7 additions & 0 deletions src/solvers/dgsem_tree/dg_3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,13 @@ function calc_volume_integral!(du, u,
return nothing
end

#=
`weak_form_kernel!` is only implemented for conserved terms as
non-conservative terms should always be discretized in conjunction with a flux-splitting scheme,
see `flux_differencing_kernel!`.
This treatment is required to achieve, e.g., entropy-stability or well-balancedness.
See also https://github.com/trixi-framework/Trixi.jl/issues/1671#issuecomment-1765644064
=#
@inline function weak_form_kernel!(du, u,
element, mesh::TreeMesh{3},
nonconservative_terms::False, equations,
Expand Down

0 comments on commit fcab6a9

Please sign in to comment.