Skip to content

Choice of ldg_switch for ViscousFormulationLocalDG #2866

@jlchan

Description

@jlchan

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions