From b32b030469c05cbdd40c720b8c142f902ded4f1f Mon Sep 17 00:00:00 2001
From: matti <matthias@rauter.it>
Date: Tue, 19 Sep 2023 15:07:31 +0200
Subject: [PATCH] BUG: Added offset to releaseAreaMapping/rasterfile

---
 .../utilities/releaseAreaMapping/releaseAreaMapping.C        | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/applications/utilities/releaseAreaMapping/releaseAreaMapping.C b/applications/utilities/releaseAreaMapping/releaseAreaMapping.C
index c9f2aa8..b4fdd9e 100644
--- a/applications/utilities/releaseAreaMapping/releaseAreaMapping.C
+++ b/applications/utilities/releaseAreaMapping/releaseAreaMapping.C
@@ -563,19 +563,18 @@ int main(int argc, char *argv[])
                 Switch linInterpol = interpolation == "linear";
                 Switch nnInterpol = interpolation == "nearestneighbor";
 
-
                 if (linInterpol)
                 {
                     forAll(c.internalField(), vi)
                     {
-                        f[vi] = grid.interpolate(c[vi].x(), c[vi].y());
+                        f[vi] = grid.interpolate(c[vi].x()-offset.x(), c[vi].y()-offset.y());
                     }
                 }
                 else if (nnInterpol)
                 {
                     forAll(c.internalField(), vi)
                     {
-                        f[vi] = grid.interpolateNN(c[vi].x(), c[vi].y());
+                        f[vi] = grid.interpolateNN(c[vi].x()-offset.x(), c[vi].y()-offset.y());
                     }
                 }
                 else
-- 
GitLab