mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: code clean-up
This commit is contained in:
@ -190,12 +190,13 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::normaliseWeights
|
|||||||
wghtSum.setSize(wght.size());
|
wghtSum.setSize(wght.size());
|
||||||
forAll(wght, faceI)
|
forAll(wght, faceI)
|
||||||
{
|
{
|
||||||
scalar s = sum(wght[faceI]);
|
scalarList& w = wght[faceI];
|
||||||
|
scalar s = sum(w);
|
||||||
scalar t = s/patchAreas[faceI];
|
scalar t = s/patchAreas[faceI];
|
||||||
|
|
||||||
forAll(addr[faceI], i)
|
forAll(w, i)
|
||||||
{
|
{
|
||||||
wght[faceI][i] /= s;
|
w[i] /= s;
|
||||||
}
|
}
|
||||||
|
|
||||||
wghtSum[faceI] = t;
|
wghtSum[faceI] = t;
|
||||||
|
|||||||
@ -67,7 +67,7 @@ bool Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::processSourceFace
|
|||||||
visitedFaces.append(tgtFaceI);
|
visitedFaces.append(tgtFaceI);
|
||||||
scalar area = interArea(srcFaceI, tgtFaceI);
|
scalar area = interArea(srcFaceI, tgtFaceI);
|
||||||
|
|
||||||
// store when intersection area > 0
|
// store when intersection fractional area > tolerance
|
||||||
if (area/this->srcMagSf_[srcFaceI] > faceAreaIntersect::tolerance())
|
if (area/this->srcMagSf_[srcFaceI] > faceAreaIntersect::tolerance())
|
||||||
{
|
{
|
||||||
srcAddr[srcFaceI].append(tgtFaceI);
|
srcAddr[srcFaceI].append(tgtFaceI);
|
||||||
@ -227,12 +227,9 @@ Foam::scalar Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::interArea
|
|||||||
const face& tgt = this->tgtPatch_[tgtFaceI];
|
const face& tgt = this->tgtPatch_[tgtFaceI];
|
||||||
|
|
||||||
// quick reject if either face has zero area
|
// 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);
|
const scalar tgtMag = tgt.mag(tgtPoints);
|
||||||
if
|
if ((this->srcMagSf_[srcFaceI] < ROOTVSMALL) || (tgtMag < ROOTVSMALL))
|
||||||
(
|
|
||||||
(this->srcMagSf_[srcFaceI] < ROOTVSMALL) || (tgtMag < ROOTVSMALL)
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
return 0.0;
|
return 0.0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user