Skip to content

Commit

Permalink
add comments on sign flips
Browse files Browse the repository at this point in the history
  • Loading branch information
jlchan committed Oct 4, 2023
1 parent e245dc2 commit e8cffa4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/solvers/dgsem_p4est/dg_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,11 @@ function calc_mortar_flux!(surface_flux_values,
# copying in the correct orientation
u_buffer = cache.u_threaded[Threads.threadid()]

# in calc_interface_flux!, the interface flux is computed once over each
# interface using the normal from the "primary" element. The result is then
# passed back to the "secondary" element, flipping the sign to account for the
# change in the normal direction. For mortars, this sign flip occurs in
# "mortar_fluxes_to_elements!" instead.
mortar_fluxes_to_elements!(surface_flux_values,
mesh, equations, mortar_l2, dg, cache,
mortar, fstar, u_buffer)
Expand Down
5 changes: 5 additions & 0 deletions src/solvers/dgsem_p4est/dg_3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,11 @@ function calc_mortar_flux!(surface_flux_values,
# copying in the correct orientation
u_buffer = cache.u_threaded[Threads.threadid()]

# in calc_interface_flux!, the interface flux is computed once over each
# interface using the normal from the "primary" element. The result is then
# passed back to the "secondary" element, flipping the sign to account for the
# change in the normal direction. For mortars, this sign flip occurs in
# "mortar_fluxes_to_elements!" instead.
mortar_fluxes_to_elements!(surface_flux_values,
mesh, equations, mortar_l2, dg, cache,
mortar, fstar, u_buffer, fstar_tmp)
Expand Down

0 comments on commit e8cffa4

Please sign in to comment.