Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
advancingFrontAMI Class Reference

Base class for Arbitrary Mesh Interface (AMI) methods. More...

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

Public Member Functions

 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 autoPtr< AMIInterpolationclone () const
 
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
 
virtual void write (Ostream &os) 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 createExtendedTgtPatch ()
 
void checkPatches () const
 
virtual bool calculate (const primitivePatch &srcPatch, const primitivePatch &tgtPatch, const autoPtr< searchableSurface > &surfPtr=nullptr)
 
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
 

Protected Attributes

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_
 

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)
 

Detailed Description

Base class for Arbitrary Mesh Interface (AMI) methods.

Source files

Definition at line 51 of file advancingFrontAMI.H.

Constructor & Destructor Documentation

◆ advancingFrontAMI() [1/3]

advancingFrontAMI ( const dictionary dict,
const bool  reverseTarget 
)

Definition at line 365 of file advancingFrontAMI.C.

Referenced by advancingFrontAMI::clone().

Here is the caller graph for this function:

◆ advancingFrontAMI() [2/3]

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

Definition at line 392 of file advancingFrontAMI.C.

◆ advancingFrontAMI() [3/3]

Definition at line 412 of file advancingFrontAMI.C.

◆ ~advancingFrontAMI()

virtual ~advancingFrontAMI ( )
virtualdefault

Member Function Documentation

◆ createExtendedTgtPatch()

void createExtendedTgtPatch ( )
protected

Definition at line 77 of file advancingFrontAMI.C.

◆ checkPatches()

void checkPatches ( ) const
protected

◆ calculate()

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

Reimplemented from AMIInterpolation.

Reimplemented in faceAreaWeightAMI, and faceAreaWeightAMI2D.

Definition at line 430 of file advancingFrontAMI.C.

References AMIInterpolation::calculate().

Referenced by faceAreaWeightAMI::calculate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialiseWalk()

bool initialiseWalk ( label &  srcFacei,
label &  tgtFacei 
)
protected

Definition at line 111 of file advancingFrontAMI.C.

References Foam::abort(), Foam::expressions::patchExpr::debug, Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::Pout, and WarningInFunction.

Here is the call graph for this function:

◆ writeIntersectionOBJ()

void writeIntersectionOBJ ( const scalar  area,
const face f1,
const face f2,
const pointField f1Points,
const pointField f2Points 
) const
protected

Definition at line 173 of file advancingFrontAMI.C.

References Foam::fieldTypes::area, Foam::BitOps::count(), Foam::endl(), forAll, n, Foam::name(), Foam::nl, os(), face::points(), Foam::Pout, and Foam::meshTools::writeOBJ().

Here is the call graph for this function:

◆ findTargetFace()

Foam::label findTargetFace ( const label  srcFacei,
const UList< label > &  excludeFaces = UList<label>::null(),
const label  srcFacePti = -1 
) const
protected

Definition at line 224 of file advancingFrontAMI.C.

References boundBox::centre(), Foam::expressions::patchExpr::debug, Foam::endl(), Foam::magSqr(), boundBox::max(), and Foam::Pout.

Here is the call graph for this function:

◆ appendNbrFaces()

void appendNbrFaces ( const label  facei,
const primitivePatch patch,
const DynamicList< label > &  visitedFaces,
DynamicList< label > &  faceIDs 
) const
protected

Definition at line 264 of file advancingFrontAMI.C.

References DynamicList::append(), Foam::cos(), Foam::degToRad(), and Foam::foamVersion::patch.

Here is the call graph for this function:

◆ triangulatePatch()

void triangulatePatch ( const primitivePatch patch,
List< DynamicList< face >> &  tris,
List< scalar > &  magSf 
) const
protected

◆ nonConformalCorrection()

void nonConformalCorrection ( )
protectedvirtual

Definition at line 341 of file advancingFrontAMI.C.

◆ TypeName()

TypeName ( "advancingFrontAMI"  )

◆ clone()

virtual autoPtr<AMIInterpolation> clone ( ) const
inlinevirtual

Reimplemented from AMIInterpolation.

Reimplemented in faceAreaWeightAMI, and faceAreaWeightAMI2D.

Definition at line 229 of file advancingFrontAMI.H.

References advancingFrontAMI::advancingFrontAMI().

Here is the call graph for this function:

◆ srcPatch()

const Foam::primitivePatch & srcPatch ( ) const
inline

Definition at line 21 of file advancingFrontAMII.H.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and AMIInterpolation::tsrcPatch0_.

Referenced by advancingFrontAMI::checkPatches().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tgtPatch()

const Foam::primitivePatch & tgtPatch ( ) const
inline

Definition at line 34 of file advancingFrontAMII.H.

References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

Referenced by advancingFrontAMI::checkPatches().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ srcNonOverlap()

const Foam::labelList & srcNonOverlap ( ) const
inline

Definition at line 52 of file advancingFrontAMII.H.

Member Data Documentation

◆ srcTris_

List<DynamicList<face> > srcTris_
protected

Definition at line 105 of file advancingFrontAMI.H.

◆ tgtTris_

List<DynamicList<face> > tgtTris_
protected

Definition at line 108 of file advancingFrontAMI.H.

◆ extendedTgtPatchPtr_

autoPtr<primitivePatch> extendedTgtPatchPtr_
protected

Definition at line 111 of file advancingFrontAMI.H.

◆ extendedTgtFaces_

faceList extendedTgtFaces_
protected

Definition at line 114 of file advancingFrontAMI.H.

◆ extendedTgtPoints_

pointField extendedTgtPoints_
protected

Definition at line 117 of file advancingFrontAMI.H.

◆ extendedTgtFaceIDs_

labelList extendedTgtFaceIDs_
protected

Definition at line 120 of file advancingFrontAMI.H.

◆ extendedTgtMapPtr_

autoPtr<mapDistribute> extendedTgtMapPtr_
protected

Definition at line 123 of file advancingFrontAMI.H.

◆ srcNonOverlap_

labelList srcNonOverlap_
protected

Definition at line 127 of file advancingFrontAMI.H.

◆ treePtr_

autoPtr<indexedOctree<treeType> > treePtr_
protected

Definition at line 130 of file advancingFrontAMI.H.

◆ triMode_

const faceAreaIntersect::triangulationMode triMode_
protected

Definition at line 133 of file advancingFrontAMI.H.


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