Skip to content
Snippets Groups Projects
Commit a7460abb authored by Michael Kuron's avatar Michael Kuron :mortar_board:
Browse files

staggered_access: optionally reverse sign for access via opposite direction

When storing fluxes on a staggered grid, the usual sign convention is that
fluxes point outward from the cell. Previously, we did not respect that as
staggered_access("E") would return the same thing as staggered_access("W")
would when called from the eastern-next cell. Now, when a field is declared
as STAGGERED_FLUX, it returns an accessor with a prefactor of -1 in that
case. The previous behavior where sign is not reversed is still useful when
e.g. storing sums (e.g. mean values) instead of differenes (e.g. finite
difference fluxes) on the staggered grid.
parent 34732f61
Branches
Tags
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment