Currently we use
|
function flux_parabolic(u_ll, u_rr, normal_direction, |
|
::Gradient, equations_parabolic, |
|
parabolic_scheme::ViscousFormulationLocalDG) |
|
ldg_switch = sign(sum(normal_direction)) # equivalent to sign(dot(normal_direction, ones)) |
|
return 0.5f0 * (u_ll + u_rr - ldg_switch * (u_rr - u_ll)) |
|
end |
This can be numerically unstable on certain meshes if sum(normal_direction) is approximately zero. I think one can avoid this just by taking max(normal_direction[1], normal_direction[2]) instead, which should preserve that the value of ldg_switch is equal and opposite across interfaces.
Currently we use
Trixi.jl/src/solvers/solvers_parabolic.jl
Lines 121 to 126 in 1f32f50
This can be numerically unstable on certain meshes if
sum(normal_direction)is approximately zero. I think one can avoid this just by takingmax(normal_direction[1], normal_direction[2])instead, which should preserve that the value ofldg_switchis equal and opposite across interfaces.