Skip to content
Snippets Groups Projects
Commit 5da89a06 authored by andy's avatar andy
Browse files

ENH: faceAreaWeightAMI - use cache face normals instead of recalculting

parent e54f156e
Branches
Tags
No related merge requests found
......@@ -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;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment