MPAS-Dev / MPAS

Repository for private MPAS development prior to the MPAS v6.0 release.
Other
4 stars 0 forks source link

Wrong sign for some edgeNormalVectors along mesh boundaries #1493

Closed mgduda closed 6 years ago

mgduda commented 6 years ago

For edges that represent positive normal inflow along the boundary of a mesh, the mpas_initialize_vectors subroutine incorrectly computes the value of the edgeNormalVectors field due to the transposition of the iEdge and cell2 locations in the difference here: https://github.com/MPAS-Dev/MPAS/blob/develop/src/operators/mpas_vector_operations.F#L716-L725 .

@xylar I can create a PR to address this, but I just wanted to get your input first before proceeding.

xylar commented 6 years ago

@mgduda, I agree that this is a bug (and it's my fault from 6 or more years ago). If you want to submit a PR, I'd be happy to review/merge it. I agree that the fix is obvious: the normal vector points from the iEdge to cell2, not the other way.

mgduda commented 6 years ago

PR #1512 addresses this issue.