faceAreaWeightAMI: Virtualised the minimum weight
Derived classes can now override the minimum weight below which area overlaps are discarded.
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -150,8 +150,8 @@ bool Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::processSourceFace
|
||||
visitedFaces.append(tgtFacei);
|
||||
scalar area = interArea(srcFacei, tgtFacei);
|
||||
|
||||
// store when intersection fractional area > tolerance
|
||||
if (area/this->srcMagSf_[srcFacei] > faceAreaIntersect::tolerance())
|
||||
// store when intersection fractional area > min weight
|
||||
if (area/this->srcMagSf_[srcFacei] > minWeight())
|
||||
{
|
||||
srcAddr[srcFacei].append(tgtFacei);
|
||||
srcWght[srcFacei].append(area);
|
||||
@ -208,7 +208,7 @@ void Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::setNextFaces
|
||||
scalar areaTotal = this->srcMagSf_[srcFacei];
|
||||
|
||||
// Check that faces have enough overlap for robust walking
|
||||
if (area/areaTotal > faceAreaIntersect::tolerance())
|
||||
if (area/areaTotal > minWeight())
|
||||
{
|
||||
// TODO - throwing area away - re-use in next iteration?
|
||||
|
||||
@ -452,6 +452,14 @@ restartUncoveredSourceFace
|
||||
}
|
||||
|
||||
|
||||
template<class SourcePatch, class TargetPatch>
|
||||
Foam::scalar
|
||||
Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::minWeight() const
|
||||
{
|
||||
return faceAreaIntersect::tolerance();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class SourcePatch, class TargetPatch>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -119,6 +119,9 @@ protected:
|
||||
|
||||
// Evaluation
|
||||
|
||||
//- The minimum weight below which connections are discarded
|
||||
virtual scalar minWeight() const;
|
||||
|
||||
//- Area of intersection between source and target faces
|
||||
virtual scalar interArea
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user