Skip to content
Snippets Groups Projects

More staggered grid improvements

Merged Michael Kuron requested to merge staggered into master
  • Fix access to directions with mixed signs (NW, (-1/2, 1/2) and the like). They were previously mapped to the wrong cell.
  • When storing fluxes on a staggered grid, the usual sign convention is that fluxes point outward from the cell. Previously, we did not consistently respect that (staggered_access("E") would return the same thing as staggered_access("W") did 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.
  • staggered_vector_access returns a vector/tensor full of Access objects corresponding to the shape (index_shape[1:]) of the staggered field
Edited by Michael Kuron

Merge request reports

Pipeline #20018 passed

Pipeline passed for 715e9a55 on staggered

Test coverage 77.77% (0.06%) from 1 job

Merged by Martin BauerMartin Bauer 5 years ago (Nov 27, 2019 2:19pm UTC)

Loading

Pipeline #20071 passed

Pipeline passed for 8ca8b2ee on master

Test coverage 77.77% (0.06%) from 1 job

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading