STYLE: code clean-up
This commit is contained in:
parent
c51d7eb60b
commit
c87f83dc46
@ -190,12 +190,13 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::normaliseWeights
|
||||
wghtSum.setSize(wght.size());
|
||||
forAll(wght, faceI)
|
||||
{
|
||||
scalar s = sum(wght[faceI]);
|
||||
scalarList& w = wght[faceI];
|
||||
scalar s = sum(w);
|
||||
scalar t = s/patchAreas[faceI];
|
||||
|
||||
forAll(addr[faceI], i)
|
||||
forAll(w, i)
|
||||
{
|
||||
wght[faceI][i] /= s;
|
||||
w[i] /= s;
|
||||
}
|
||||
|
||||
wghtSum[faceI] = t;
|
||||
|
@ -67,7 +67,7 @@ bool Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::processSourceFace
|
||||
visitedFaces.append(tgtFaceI);
|
||||
scalar area = interArea(srcFaceI, tgtFaceI);
|
||||
|
||||
// store when intersection area > 0
|
||||
// store when intersection fractional area > tolerance
|
||||
if (area/this->srcMagSf_[srcFaceI] > faceAreaIntersect::tolerance())
|
||||
{
|
||||
srcAddr[srcFaceI].append(tgtFaceI);
|
||||
@ -227,12 +227,9 @@ Foam::scalar Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::interArea
|
||||
const face& tgt = this->tgtPatch_[tgtFaceI];
|
||||
|
||||
// quick reject if either face has zero area
|
||||
// Note: do not used stored face areas for target patch
|
||||
// Note: do not use stored face areas for target patch
|
||||
const scalar tgtMag = tgt.mag(tgtPoints);
|
||||
if
|
||||
(
|
||||
(this->srcMagSf_[srcFaceI] < ROOTVSMALL) || (tgtMag < ROOTVSMALL)
|
||||
)
|
||||
if ((this->srcMagSf_[srcFaceI] < ROOTVSMALL) || (tgtMag < ROOTVSMALL))
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user