Skip to content

Commit

Permalink
Merge pull request #130 from mwarusz/mwarusz/omega/fix-tend-terms-test
Browse files Browse the repository at this point in the history
Fix tendency terms test
  • Loading branch information
mark-petersen authored Sep 24, 2024
2 parents 4877165 + b63d2d7 commit 33e3b4f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions components/omega/test/ocn/TendencyTermsTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,14 +467,15 @@ int testVelDiff(int NVertLevels, Real RTol) {
if (Err != 0) {
LOG_CRITICAL("Tendencies: ViscDel2 not found in TendConfig");
}
const Real ViscDel2 = VelDiffOnE.ViscDel2;

// Compute exact result
Array2DReal ExactVelDiff("ExactVelDiff", Mesh->NEdgesOwned, NVertLevels);

Err += setVectorEdge(
KOKKOS_LAMBDA(Real(&VecField)[2], Real X, Real Y) {
VecField[0] = Setup.laplaceVecX(X, Y);
VecField[1] = Setup.laplaceVecY(X, Y);
VecField[0] = ViscDel2 * Setup.laplaceVecX(X, Y);
VecField[1] = ViscDel2 * Setup.laplaceVecY(X, Y);
},
ExactVelDiff, EdgeComponent::Normal, Geom, Mesh, NVertLevels,
ExchangeHalos::No);
Expand Down Expand Up @@ -542,15 +543,16 @@ int testVelHyperDiff(int NVertLevels, Real RTol) {
if (Err != 0) {
LOG_CRITICAL("Tendencies: ViscDel4 not found in TendConfig");
}
const Real ViscDel4 = VelHyperDiffOnE.ViscDel4;

// Compute exact result
Array2DReal ExactVelHyperDiff("ExactVelHyperDiff", Mesh->NEdgesOwned,
NVertLevels);

Err += setVectorEdge(
KOKKOS_LAMBDA(Real(&VecField)[2], Real X, Real Y) {
VecField[0] = -Setup.laplaceVecX(X, Y);
VecField[1] = -Setup.laplaceVecY(X, Y);
VecField[0] = -ViscDel4 * Setup.laplaceVecX(X, Y);
VecField[1] = -ViscDel4 * Setup.laplaceVecY(X, Y);
},
ExactVelHyperDiff, EdgeComponent::Normal, Geom, Mesh, NVertLevels,
ExchangeHalos::No);
Expand Down

0 comments on commit 33e3b4f

Please sign in to comment.