mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge remote-tracking branch 'origin/master' into feature/procAgglom
This commit is contained in:
@ -26,6 +26,7 @@ License
|
||||
#include "AMIMethod.H"
|
||||
#include "meshTools.H"
|
||||
#include "mapDistribute.H"
|
||||
#include "unitConversion.H"
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
@ -262,6 +263,7 @@ void Foam::AMIMethod<SourcePatch, TargetPatch>::appendNbrFaces
|
||||
) const
|
||||
{
|
||||
const labelList& nbrFaces = patch.faceFaces()[faceI];
|
||||
const pointField& tgtPoints = patch.points();
|
||||
|
||||
// filter out faces already visited from src face neighbours
|
||||
forAll(nbrFaces, i)
|
||||
@ -291,7 +293,17 @@ void Foam::AMIMethod<SourcePatch, TargetPatch>::appendNbrFaces
|
||||
|
||||
if (valid)
|
||||
{
|
||||
faceIDs.append(nbrFaceI);
|
||||
const face& myn = patch[faceI];
|
||||
const face& nbrn = patch[nbrFaceI];
|
||||
const vector& nbrNormal = nbrn.normal(tgtPoints);
|
||||
const vector& mynNormal = myn.normal(tgtPoints);
|
||||
|
||||
scalar cosI = nbrNormal & mynNormal;
|
||||
|
||||
if (cosI > Foam::cos(degToRad(89.0)))
|
||||
{
|
||||
faceIDs.append(nbrFaceI);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ bool Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::processSourceFace
|
||||
scalar area = interArea(srcFaceI, tgtFaceI);
|
||||
|
||||
// store when intersection area > 0
|
||||
if (area > 0)
|
||||
if (area/this->srcMagSf_[srcFaceI] > faceAreaIntersect::tolerance())
|
||||
{
|
||||
srcAddr[srcFaceI].append(tgtFaceI);
|
||||
srcWght[srcFaceI].append(area);
|
||||
@ -228,10 +228,10 @@ Foam::scalar Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::interArea
|
||||
|
||||
// quick reject if either face has zero area
|
||||
// Note: do not used stored face areas for target patch
|
||||
const scalar tgtMag = tgt.mag(tgtPoints);
|
||||
if
|
||||
(
|
||||
(this->srcMagSf_[srcFaceI] < ROOTVSMALL)
|
||||
|| (tgt.mag(tgtPoints) < ROOTVSMALL)
|
||||
(this->srcMagSf_[srcFaceI] < ROOTVSMALL) || (tgtMag < ROOTVSMALL)
|
||||
)
|
||||
{
|
||||
return 0.0;
|
||||
@ -242,13 +242,14 @@ Foam::scalar Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::interArea
|
||||
|
||||
// crude resultant norm
|
||||
vector n(-src.normal(srcPoints));
|
||||
n /= mag(n);
|
||||
if (this->reverseTarget_)
|
||||
{
|
||||
n -= tgt.normal(tgtPoints);
|
||||
n -= tgt.normal(tgtPoints)/tgtMag;
|
||||
}
|
||||
else
|
||||
{
|
||||
n += tgt.normal(tgtPoints);
|
||||
n += tgt.normal(tgtPoints)/tgtMag;
|
||||
}
|
||||
n *= 0.5;
|
||||
|
||||
|
||||
@ -133,7 +133,7 @@ void Foam::targetVolumeToCell::combine(topoSet& set, const bool add) const
|
||||
|
||||
scalar maxComp = -GREAT;
|
||||
label maxCells = 0;
|
||||
scalar maxVol = 0;
|
||||
//scalar maxVol = 0;
|
||||
scalar minComp = GREAT;
|
||||
{
|
||||
const boundBox& bb = mesh_.bounds();
|
||||
@ -158,7 +158,7 @@ void Foam::targetVolumeToCell::combine(topoSet& set, const bool add) const
|
||||
|
||||
PackedBoolList maxSelected(mesh_.nCells());
|
||||
maxCells = selectCells(maxComp, maskSet, maxSelected);
|
||||
maxVol = volumeOfSet(maxSelected);
|
||||
//maxVol = volumeOfSet(maxSelected);
|
||||
|
||||
// Check that maxPoint indeed selects all cells
|
||||
if (maxCells != nTotCells)
|
||||
|
||||
Reference in New Issue
Block a user