Skip to content

Commit 23a8809

Browse files
authored
Correctly skip land points in the stress update (#893)
# Correctly skip land points in the stress update Related to #883 ### Task List - [x] Defined the tests that specify a complete and functioning change (*It may help to create a [design specification & test specification](../../../wiki/Specification-Template)*) - [x] Implemented the source code change that satisfies the tests - [x] Documented the feature by providing worked example - [x] Updated the README or other documentation - [x] Completed the pre-Request checklist below --- # Change Description The previous version skipped _ocean_ points and not land points. So I added a not (!) to the commit in PR #884. --- # Test Description The instabilities in #883 are back, but the polynya test case (#797) now runs correctly again. --- # Documentation Impact None --- # Other Details None --- ### Pre-Request Checklist - [x] The requirements of this pull request are fully captured in an issue or design specification and are linked and summarised in the description of this PR - [x] No new warnings are generated - [x] The documentation has been updated (or an issue has been created to track the corresponding change) - [x] Methods and Tests are commented such that they can be understood without having to obtain additional context - [x] This PR/Issue is labelled as a bug/feature/enhancement/breaking change - [x] File dates have been updated to reflect modification date - [x] This change conforms to the conventions described in the README
2 parents f9ee28c + 4e2066e commit 23a8809

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dynamics/src/include/BBMStressUpdateStep.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class BBMStressUpdateStep : public StressUpdateStep<DGadvection, DGstress> {
5353
#pragma omp parallel for
5454
for (size_t i = 0; i < smesh.nelements; ++i) {
5555

56-
if (smesh.landmask[i])
56+
if (!smesh.landmask[i])
5757
continue;
5858

5959
//! Evaluate values in Gauss points (3 point Gauss rule in 2d => 9 points)

dynamics/src/include/MEVPStressUpdateStep.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class MEVPStressUpdateStep : public StressUpdateStep<DGadvection, DGstress> {
4949
#pragma omp parallel for
5050
for (size_t i = 0; i < smesh.nelements; ++i) {
5151

52-
if (smesh.landmask[i])
52+
if (!smesh.landmask[i])
5353
continue;
5454

5555
// Here, one should check if it is enough to use a 2-point Gauss rule.

0 commit comments

Comments
 (0)