Public Member Functions | Protected Member Functions | List of all members
faceAreaWeightAMI Class Reference

Face area weighted Arbitrary Mesh Interface (AMI) method. More...

Inheritance diagram for faceAreaWeightAMI:
Inheritance graph
[legend]
Collaboration diagram for faceAreaWeightAMI:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("faceAreaWeightAMI")
 
 faceAreaWeightAMI (const dictionary &dict, const bool reverseTarget=false)
 
 faceAreaWeightAMI (const bool requireMatch, const bool reverseTarget=false, const scalar lowWeightCorrection=-1, const faceAreaIntersect::triangulationMode triMode=faceAreaIntersect::tmMesh, const bool restartUncoveredSourceFace=true)
 
 faceAreaWeightAMI (const faceAreaWeightAMI &ami)
 
virtual autoPtr< AMIInterpolationclone () const
 
virtual ~faceAreaWeightAMI ()=default
 
virtual bool calculate (const primitivePatch &srcPatch, const primitivePatch &tgtPatch, const autoPtr< searchableSurface > &surfPtr=nullptr)
 
virtual void write (Ostream &os) const
 
- Public Member Functions inherited from advancingFrontAMI
 TypeName ("advancingFrontAMI")
 
 advancingFrontAMI (const dictionary &dict, const bool reverseTarget)
 
 advancingFrontAMI (const bool requireMatch=true, const bool reverseTarget=false, const scalar lowWeightCorrection=-1, const faceAreaIntersect::triangulationMode triMode=faceAreaIntersect::tmMesh)
 
 advancingFrontAMI (const advancingFrontAMI &ami)
 
virtual ~advancingFrontAMI ()=default
 
const primitivePatchsrcPatch () const
 
const primitivePatchtgtPatch () const
 
const labelListsrcNonOverlap () const
 
- Public Member Functions inherited from AMIInterpolation
 TypeName ("AMIInterpolation")
 
 declareRunTimeSelectionTable (autoPtr, AMIInterpolation, dict,(const dictionary &dict, const bool reverseTarget),(dict, reverseTarget))
 
 declareRunTimeSelectionTable (autoPtr, AMIInterpolation, component,(const bool requireMatch, const bool reverseTarget, const scalar lowWeightCorrection),(requireMatch, reverseTarget, lowWeightCorrection))
 
 AMIInterpolation (const dictionary &dict, const bool reverseTarget=false)
 
 AMIInterpolation (const bool requireMatch=true, const bool reverseTarget=false, const scalar lowWeightCorrection=-1)
 
 AMIInterpolation (const AMIInterpolation &fineAMI, const labelList &sourceRestrictAddressing, const labelList &neighbourRestrictAddressing)
 
 AMIInterpolation (const AMIInterpolation &ami)
 
virtual ~AMIInterpolation ()=default
 
bool upToDate () const
 
boolupToDate ()
 
bool distributed () const
 
bool requireMatch () const
 
bool setRequireMatch (const bool flag)
 
bool mustMatchFaces () const
 
bool reverseTarget () const
 
scalar lowWeightCorrection () const
 
bool applyLowWeightCorrection () const
 
label singlePatchProc () const
 
const List< scalar > & srcMagSf () const
 
List< scalar > & srcMagSf ()
 
const labelListListsrcAddress () const
 
labelListListsrcAddress ()
 
const scalarListListsrcWeights () const
 
scalarListListsrcWeights ()
 
const scalarFieldsrcWeightsSum () const
 
scalarFieldsrcWeightsSum ()
 
const pointListListsrcCentroids () const
 
pointListListsrcCentroids ()
 
const mapDistributesrcMap () const
 
const List< scalar > & tgtMagSf () const
 
List< scalar > & tgtMagSf ()
 
const labelListListtgtAddress () const
 
labelListListtgtAddress ()
 
const scalarListListtgtWeights () const
 
scalarListListtgtWeights ()
 
const scalarFieldtgtWeightsSum () const
 
scalarFieldtgtWeightsSum ()
 
const mapDistributetgtMap () const
 
void reset (autoPtr< mapDistribute > &&srcToTgtMap, autoPtr< mapDistribute > &&tgtToSrcMap, labelListList &&srcAddress, scalarListList &&srcWeights, labelListList &&tgtAddress, scalarListList &&tgtWeights)
 
void append (const primitivePatch &srcPatch, const primitivePatch &tgtPatch)
 
void normaliseWeights (const bool conformal, const bool output)
 
template<class Type , class CombineOp >
void interpolateToSource (const UList< Type > &fld, const CombineOp &cop, List< Type > &result, const UList< Type > &defaultValues=UList< Type >::null()) const
 
template<class Type , class CombineOp >
void interpolateToTarget (const UList< Type > &fld, const CombineOp &cop, List< Type > &result, const UList< Type > &defaultValues=UList< Type >::null()) const
 
template<class Type , class CombineOp >
tmp< Field< Type > > interpolateToSource (const Field< Type > &fld, const CombineOp &cop, const UList< Type > &defaultValues=UList< Type >::null()) const
 
template<class Type , class CombineOp >
tmp< Field< Type > > interpolateToSource (const tmp< Field< Type >> &tFld, const CombineOp &cop, const UList< Type > &defaultValues=UList< Type >::null()) const
 
template<class Type , class CombineOp >
tmp< Field< Type > > interpolateToTarget (const Field< Type > &fld, const CombineOp &cop, const UList< Type > &defaultValues=UList< Type >::null()) const
 
template<class Type , class CombineOp >
tmp< Field< Type > > interpolateToTarget (const tmp< Field< Type >> &tFld, const CombineOp &cop, const UList< Type > &defaultValues=UList< Type >::null()) const
 
template<class Type >
tmp< Field< Type > > interpolateToSource (const Field< Type > &fld, const UList< Type > &defaultValues=UList< Type >::null()) const
 
template<class Type >
tmp< Field< Type > > interpolateToSource (const tmp< Field< Type >> &tFld, const UList< Type > &defaultValues=UList< Type >::null()) const
 
template<class Type >
tmp< Field< Type > > interpolateToTarget (const Field< Type > &fld, const UList< Type > &defaultValues=UList< Type >::null()) const
 
template<class Type >
tmp< Field< Type > > interpolateToTarget (const tmp< Field< Type >> &tFld, const UList< Type > &defaultValues=UList< Type >::null()) const
 
label srcPointFace (const primitivePatch &srcPatch, const primitivePatch &tgtPatch, const vector &n, const label tgtFacei, point &tgtPoint) const
 
label tgtPointFace (const primitivePatch &srcPatch, const primitivePatch &tgtPatch, const vector &n, const label srcFacei, point &srcPoint) const
 
bool checkSymmetricWeights (const bool log) const
 
void writeFaceConnectivity (const primitivePatch &srcPatch, const primitivePatch &tgtPatch, const labelListList &srcAddress) const
 
template<class Type , class CombineOp >
Foam::tmp< Foam::Field< Type > > interpolateToSource (const Field< Type > &fld, const CombineOp &cop, const UList< Type > &defaultValues) const
 
template<class Type , class CombineOp >
Foam::tmp< Foam::Field< Type > > interpolateToSource (const tmp< Field< Type >> &tFld, const CombineOp &cop, const UList< Type > &defaultValues) const
 
template<class Type , class CombineOp >
Foam::tmp< Foam::Field< Type > > interpolateToTarget (const Field< Type > &fld, const CombineOp &cop, const UList< Type > &defaultValues) const
 
template<class Type , class CombineOp >
Foam::tmp< Foam::Field< Type > > interpolateToTarget (const tmp< Field< Type >> &tFld, const CombineOp &cop, const UList< Type > &defaultValues) const
 
template<class Type >
Foam::tmp< Foam::Field< Type > > interpolateToSource (const Field< Type > &fld, const UList< Type > &defaultValues) const
 
template<class Type >
Foam::tmp< Foam::Field< Type > > interpolateToSource (const tmp< Field< Type >> &tFld, const UList< Type > &defaultValues) const
 
template<class Type >
Foam::tmp< Foam::Field< Type > > interpolateToTarget (const Field< Type > &fld, const UList< Type > &defaultValues) const
 
template<class Type >
Foam::tmp< Foam::Field< Type > > interpolateToTarget (const tmp< Field< Type >> &tFld, const UList< Type > &defaultValues) const
 

Protected Member Functions

void operator= (const faceAreaWeightAMI &)=delete
 
virtual void calcAddressing (List< DynamicList< label >> &srcAddress, List< DynamicList< scalar >> &srcWeights, List< DynamicList< point >> &srcCentroids, List< DynamicList< label >> &tgtAddress, List< DynamicList< scalar >> &tgtWeights, label srcFacei, label tgtFacei)
 
virtual bool processSourceFace (const label srcFacei, const label tgtStartFacei, DynamicList< label > &nbrFaces, DynamicList< label > &visitedFaces, List< DynamicList< label >> &srcAddr, List< DynamicList< scalar >> &srcWght, List< DynamicList< point >> &srcCtr, List< DynamicList< label >> &tgtAddr, List< DynamicList< scalar >> &tgtWght)
 
virtual void restartUncoveredSourceFace (List< DynamicList< label >> &srcAddr, List< DynamicList< scalar >> &srcWght, List< DynamicList< point >> &srcCtr, List< DynamicList< label >> &tgtAddr, List< DynamicList< scalar >> &tgtWght)
 
virtual bool setNextFaces (label &startSeedi, label &srcFacei, label &tgtFacei, const bitSet &mapFlag, labelList &seedFaces, const DynamicList< label > &visitedFaces, const bool errorOnNotFound=true) const
 
virtual void calcInterArea (const label srcFacei, const label tgtFacei, scalar &area, vector &centroid) const
 
virtual bool overlaps (const label srcFacei, const label tgtFacei, const scalar threshold) const
 
- Protected Member Functions inherited from advancingFrontAMI
void createExtendedTgtPatch ()
 
void checkPatches () const
 
bool initialiseWalk (label &srcFacei, label &tgtFacei)
 
void writeIntersectionOBJ (const scalar area, const face &f1, const face &f2, const pointField &f1Points, const pointField &f2Points) const
 
label findTargetFace (const label srcFacei, const UList< label > &excludeFaces=UList< label >::null(), const label srcFacePti=-1) const
 
void appendNbrFaces (const label facei, const primitivePatch &patch, const DynamicList< label > &visitedFaces, DynamicList< label > &faceIDs) const
 
void triangulatePatch (const primitivePatch &patch, List< DynamicList< face >> &tris, List< scalar > &magSf) const
 
virtual void nonConformalCorrection ()
 
- Protected Member Functions inherited from AMIInterpolation
void operator= (const AMIInterpolation &)=delete
 
autoPtr< indexedOctree< treeType > > createTree (const primitivePatch &patch) const
 
label calcDistribution (const primitivePatch &srcPatch, const primitivePatch &tgtPatch) const
 
void projectPointsToSurface (const searchableSurface &surf, pointField &pts) const
 
const primitivePatchsrcPatch0 () const
 
const primitivePatchtgtPatch0 () const
 

Additional Inherited Members

- Static Public Member Functions inherited from AMIInterpolation
static autoPtr< AMIInterpolationNew (const word &modelName, const dictionary &dict, const bool reverseTarget=false)
 
static autoPtr< AMIInterpolationNew (const word &modelName, const bool requireMatch=true, const bool reverseTarget=false, const scalar lowWeightCorrection=-1)
 
- Static Public Attributes inherited from AMIInterpolation
static bool cacheIntersections_ = false
 
- Protected Types inherited from AMIInterpolation
typedef treeDataPrimitivePatch< primitivePatchtreeType
 
- Static Protected Member Functions inherited from AMIInterpolation
static void normaliseWeights (const scalarList &patchAreas, const word &patchName, const labelListList &addr, scalarListList &wght, scalarField &wghtSum, const bool conformal, const bool output, const scalar lowWeightTol)
 
static void agglomerate (const autoPtr< mapDistribute > &targetMap, const scalarList &fineSrcMagSf, const labelListList &fineSrcAddress, const scalarListList &fineSrcWeights, const labelList &sourceRestrictAddressing, const labelList &targetRestrictAddressing, scalarList &srcMagSf, labelListList &srcAddress, scalarListList &srcWeights, scalarField &srcWeightsSum, autoPtr< mapDistribute > &tgtMap)
 
- Protected Attributes inherited from advancingFrontAMI
List< DynamicList< face > > srcTris_
 
List< DynamicList< face > > tgtTris_
 
autoPtr< primitivePatchextendedTgtPatchPtr_
 
faceList extendedTgtFaces_
 
pointField extendedTgtPoints_
 
labelList extendedTgtFaceIDs_
 
autoPtr< mapDistributeextendedTgtMapPtr_
 
labelList srcNonOverlap_
 
autoPtr< indexedOctree< treeType > > treePtr_
 
const faceAreaIntersect::triangulationMode triMode_
 
- Protected Attributes inherited from AMIInterpolation
bool requireMatch_
 
const bool reverseTarget_
 
const scalar lowWeightCorrection_
 
label singlePatchProc_
 
scalarList srcMagSf_
 
labelListList srcAddress_
 
scalarListList srcWeights_
 
scalarField srcWeightsSum_
 
pointListList srcCentroids_
 
pointField srcPatchPts_
 
refPtr< primitivePatchtsrcPatch0_
 
autoPtr< mapDistributesrcMapPtr_
 
scalarList tgtMagSf_
 
labelListList tgtAddress_
 
scalarListList tgtWeights_
 
scalarField tgtWeightsSum_
 
pointListList tgtCentroids_
 
pointField tgtPatchPts_
 
refPtr< primitivePatchttgtPatch0_
 
autoPtr< mapDistributetgtMapPtr_
 
bool upToDate_
 

Detailed Description

Face area weighted Arbitrary Mesh Interface (AMI) method.

Searching is performed using an advancing front.

Source files

Definition at line 49 of file faceAreaWeightAMI.H.

Constructor & Destructor Documentation

◆ faceAreaWeightAMI() [1/3]

faceAreaWeightAMI ( const dictionary dict,
const bool  reverseTarget = false 
)

Definition at line 591 of file faceAreaWeightAMI.C.

Referenced by faceAreaWeightAMI::clone().

Here is the caller graph for this function:

◆ faceAreaWeightAMI() [2/3]

faceAreaWeightAMI ( const bool  requireMatch,
const bool  reverseTarget = false,
const scalar  lowWeightCorrection = -1,
const faceAreaIntersect::triangulationMode  triMode = faceAreaIntersect::tmMesh,
const bool  restartUncoveredSourceFace = true 
)

Definition at line 605 of file faceAreaWeightAMI.C.

◆ faceAreaWeightAMI() [3/3]

Definition at line 624 of file faceAreaWeightAMI.C.

◆ ~faceAreaWeightAMI()

virtual ~faceAreaWeightAMI ( )
virtualdefault

Member Function Documentation

◆ operator=()

void operator= ( const faceAreaWeightAMI )
protecteddelete

◆ calcAddressing()

void calcAddressing ( List< DynamicList< label >> &  srcAddress,
List< DynamicList< scalar >> &  srcWeights,
List< DynamicList< point >> &  srcCentroids,
List< DynamicList< label >> &  tgtAddress,
List< DynamicList< scalar >> &  tgtWeights,
label  srcFacei,
label  tgtFacei 
)
protectedvirtual

Definition at line 91 of file faceAreaWeightAMI.C.

References addProfiling, DynamicList::append(), DynamicList::clear(), and bitSet::unset().

Here is the call graph for this function:

◆ processSourceFace()

bool processSourceFace ( const label  srcFacei,
const label  tgtStartFacei,
DynamicList< label > &  nbrFaces,
DynamicList< label > &  visitedFaces,
List< DynamicList< label >> &  srcAddr,
List< DynamicList< scalar >> &  srcWght,
List< DynamicList< point >> &  srcCtr,
List< DynamicList< label >> &  tgtAddr,
List< DynamicList< scalar >> &  tgtWght 
)
protectedvirtual

Definition at line 176 of file faceAreaWeightAMI.C.

References addProfiling, DynamicList::append(), Foam::expressions::patchExpr::debug, DebugVar, Foam::max(), DynamicList::remove(), and Foam::Zero.

Here is the call graph for this function:

◆ restartUncoveredSourceFace()

void restartUncoveredSourceFace ( List< DynamicList< label >> &  srcAddr,
List< DynamicList< scalar >> &  srcWght,
List< DynamicList< point >> &  srcCtr,
List< DynamicList< label >> &  tgtAddr,
List< DynamicList< scalar >> &  tgtWght 
)
protectedvirtual

Definition at line 515 of file faceAreaWeightAMI.C.

References addProfiling, DynamicList::clear(), Foam::expressions::patchExpr::debug, Foam::endl(), f(), forAll, s, Foam::sum(), and WarningInFunction.

Here is the call graph for this function:

◆ setNextFaces()

bool setNextFaces ( label &  startSeedi,
label &  srcFacei,
label &  tgtFacei,
const bitSet mapFlag,
labelList seedFaces,
const DynamicList< label > &  visitedFaces,
const bool  errorOnNotFound = true 
) const
protectedvirtual

◆ calcInterArea()

void calcInterArea ( const label  srcFacei,
const label  tgtFacei,
scalar &  area,
vector centroid 
) const
protectedvirtual

◆ overlaps()

bool overlaps ( const label  srcFacei,
const label  tgtFacei,
const scalar  threshold 
) const
protectedvirtual

Definition at line 449 of file faceAreaWeightAMI.C.

References Foam::endl(), Foam::mag(), n, faceAreaIntersect::overlaps(), and WarningInFunction.

Here is the call graph for this function:

◆ TypeName()

TypeName ( "faceAreaWeightAMI"  )

◆ clone()

virtual autoPtr<AMIInterpolation> clone ( ) const
inlinevirtual

Reimplemented from advancingFrontAMI.

Definition at line 171 of file faceAreaWeightAMI.H.

References faceAreaWeightAMI::faceAreaWeightAMI().

Here is the call graph for this function:

◆ calculate()

bool calculate ( const primitivePatch srcPatch,
const primitivePatch tgtPatch,
const autoPtr< searchableSurface > &  surfPtr = nullptr 
)
virtual

◆ write()

void write ( Ostream os) const
virtual

Reimplemented from AMIInterpolation.

Definition at line 797 of file faceAreaWeightAMI.C.

References os(), AMIInterpolation::write(), and Ostream::writeEntry().

Here is the call graph for this function:

The documentation for this class was generated from the following files: