Skip to content

Commit

Permalink
Patch tempestremap to relax tolerance on valid grid elements
Browse files Browse the repository at this point in the history
  • Loading branch information
xylar committed Nov 3, 2024
1 parent b5dadbe commit 32b3a03
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff -ruN tempestremap-2.2.0/src/GridElements.cpp tempestremap-2.2.0-patch/src/GridElements.cpp
--- tempestremap-2.2.0/src/GridElements.cpp 2023-06-14 11:34:02.000000000 -0600
+++ tempestremap-2.2.0-patch/src/GridElements.cpp 2024-11-03 09:37:36.140268861 -0700
@@ -1727,7 +1727,7 @@

#endif
*/
- if (dDot > 0.0) {
+ if (dDot > ReferenceTolerance) {
printf("\nError detected (orientation):\n");
printf(" Face %i, Edge %i, Orientation %1.5e\n",
i, j, dDot);
4 changes: 4 additions & 0 deletions var/spack/repos/builtin/packages/tempestremap/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ class Tempestremap(AutotoolsPackage):
depends_on("blas")
depends_on("lapack")

# Relax tolerance for valid grid elements, needed by high resolution meshes
# in mptempest
patch("grid-elements-tolerance.patch", when="@2.2.0")

def configure_args(self):
spec = self.spec
options = []
Expand Down

0 comments on commit 32b3a03

Please sign in to comment.