From 5da89a066cda6e004b9faab288ae20e7b64fa331 Mon Sep 17 00:00:00 2001
From: andy <andy>
Date: Thu, 8 Aug 2013 12:21:52 +0100
Subject: [PATCH] ENH: faceAreaWeightAMI - use cache face normals instead of
 recalculting

---
 .../AMIMethod/faceAreaWeightAMI/faceAreaWeightAMI.C        | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/faceAreaWeightAMI/faceAreaWeightAMI.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/faceAreaWeightAMI/faceAreaWeightAMI.C
index 2d5115f3ebb..2c303eb39fc 100644
--- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/faceAreaWeightAMI/faceAreaWeightAMI.C
+++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/faceAreaWeightAMI/faceAreaWeightAMI.C
@@ -329,15 +329,14 @@ Foam::scalar Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::interArea
     faceAreaIntersect inter(srcPoints, tgtPoints, this->reverseTarget_);
 
     // crude resultant norm
-    vector n(-src.normal(srcPoints));
-    n /= mag(n);
+    vector n(-this->srcPatch_.faceNormals()[srcFaceI]);
     if (this->reverseTarget_)
     {
-        n -= tgt.normal(tgtPoints)/tgtMag;
+        n -= this->tgtPatch_.faceNormals()[tgtFaceI];
     }
     else
     {
-        n += tgt.normal(tgtPoints)/tgtMag;
+        n += this->tgtPatch_.faceNormals()[tgtFaceI];
     }
     n *= 0.5;
 
-- 
GitLab