Public Member Functions | Protected Member Functions | List of all members
faceAreaWeightAMI< SourcePatch, TargetPatch > Class Template Reference

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

Inheritance diagram for faceAreaWeightAMI< SourcePatch, TargetPatch >:
Inheritance graph
[legend]
Collaboration diagram for faceAreaWeightAMI< SourcePatch, TargetPatch >:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("faceAreaWeightAMI")
 Runtime type information. More...
 
 faceAreaWeightAMI (const SourcePatch &srcPatch, const TargetPatch &tgtPatch, const scalarField &srcMagSf, const scalarField &tgtMagSf, const faceAreaIntersect::triangulationMode &triMode, const bool reverseTarget=false, const bool requireMatch=true, const bool restartUncoveredSourceFace=true)
 Construct from components. More...
 
virtual ~faceAreaWeightAMI ()
 Destructor. More...
 
virtual void calculate (labelListList &srcAddress, scalarListList &srcWeights, labelListList &tgtAddress, scalarListList &tgtWeights, label srcFaceI=-1, label tgtFaceI=-1)
 Update addressing and weights. More...
 
- Public Member Functions inherited from AMIMethod< SourcePatch, TargetPatch >
 TypeName ("AMIMethod")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, AMIMethod, components,( const SourcePatch &srcPatch, const TargetPatch &tgtPatch, const scalarField &srcMagSf, const scalarField &tgtMagSf, const faceAreaIntersect::triangulationMode &triMode, const bool reverseTarget, const bool requireMatch ),( srcPatch, tgtPatch, srcMagSf, tgtMagSf, triMode, reverseTarget, requireMatch ))
 Declare runtime constructor selection table. More...
 
 AMIMethod (const SourcePatch &srcPatch, const TargetPatch &tgtPatch, const scalarField &srcMagSf, const scalarField &tgtMagSf, const faceAreaIntersect::triangulationMode &triMode, const bool reverseTarget, const bool requireMatch)
 Construct from components. More...
 
virtual ~AMIMethod ()
 Destructor. More...
 
const labelListsrcNonOverlap () const
 Labels of faces that are not overlapped by any target faces. More...
 
virtual bool conformal () const
 Flag to indicate that interpolation patches are conformal. More...
 

Protected Member Functions

 faceAreaWeightAMI (const faceAreaWeightAMI &)
 Disallow default bitwise copy construct. More...
 
void operator= (const faceAreaWeightAMI &)
 Disallow default bitwise assignment. More...
 
virtual void calcAddressing (List< DynamicList< label > > &srcAddress, List< DynamicList< scalar > > &srcWeights, List< DynamicList< label > > &tgtAddress, List< DynamicList< scalar > > &tgtWeights, label srcFaceI, label tgtFaceI)
 Calculate addressing and weights using temporary storage. More...
 
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< label > > &tgtAddr, List< DynamicList< scalar > > &tgtWght)
 Determine overlap contributions for source face srcFaceI. More...
 
virtual void restartUncoveredSourceFace (List< DynamicList< label > > &srcAddr, List< DynamicList< scalar > > &srcWght, List< DynamicList< label > > &tgtAddr, List< DynamicList< scalar > > &tgtWght)
 Attempt to re-evaluate source faces that have not been included. More...
 
virtual void setNextFaces (label &startSeedI, label &srcFaceI, label &tgtFaceI, const boolList &mapFlag, labelList &seedFaces, const DynamicList< label > &visitedFaces, bool errorOnNotFound=true) const
 Set the source and target seed faces. More...
 
virtual scalar interArea (const label srcFaceI, const label tgtFaceI) const
 Area of intersection between source and target faces. More...
 
- Protected Member Functions inherited from AMIMethod< SourcePatch, TargetPatch >
void checkPatches () const
 Check AMI patch coupling. More...
 
bool initialise (labelListList &srcAddress, scalarListList &srcWeights, labelListList &tgtAddress, scalarListList &tgtWeights, label &srcFaceI, label &tgtFaceI)
 Initialise and return true if all ok. More...
 
void writeIntersectionOBJ (const scalar area, const face &f1, const face &f2, const pointField &f1Points, const pointField &f2Points) const
 Write triangle intersection to OBJ file. More...
 
void resetTree ()
 Reset the octree for the target patch face search. More...
 
label findTargetFace (const label srcFaceI) const
 Find face on target patch that overlaps source face. More...
 
void appendNbrFaces (const label faceI, const TargetPatch &patch, const DynamicList< label > &visitedFaces, DynamicList< label > &faceIDs) const
 Add faces neighbouring faceI to the ID list. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from AMIMethod< SourcePatch, TargetPatch >
static autoPtr< AMIMethodNew (const word &methodName, const SourcePatch &srcPatch, const TargetPatch &tgtPatch, const scalarField &srcMagSf, const scalarField &tgtMagSf, const faceAreaIntersect::triangulationMode &triMode, const bool reverseTarget, const bool requireMatch)
 Selector. More...
 
- Protected Types inherited from AMIMethod< SourcePatch, TargetPatch >
typedef treeDataPrimitivePatch< TargetPatch > treeType
 Local typedef to octree tree-type. More...
 
- Protected Attributes inherited from AMIMethod< SourcePatch, TargetPatch >
const SourcePatch & srcPatch_
 Reference to source patch. More...
 
const TargetPatch & tgtPatch_
 Reference to target patch. More...
 
const bool reverseTarget_
 Flag to indicate that the two patches are co-directional and. More...
 
const bool requireMatch_
 Flag to indicate that the two patches must be matched/an overlap. More...
 
const scalarFieldsrcMagSf_
 Source face areas. More...
 
const scalarFieldtgtMagSf_
 Target face areas. More...
 
labelList srcNonOverlap_
 Labels of faces that are not overlapped by any target faces. More...
 
autoPtr< indexedOctree< treeType > > treePtr_
 Octree used to find face seeds. More...
 
const faceAreaIntersect::triangulationMode triMode_
 Face triangulation mode. More...
 

Detailed Description

template<class SourcePatch, class TargetPatch>
class Foam::faceAreaWeightAMI< SourcePatch, TargetPatch >

Face area weighted Arbitrary Mesh Interface (AMI) method.

Source files

Definition at line 49 of file faceAreaWeightAMI.H.

Constructor & Destructor Documentation

faceAreaWeightAMI ( const faceAreaWeightAMI< SourcePatch, TargetPatch > &  )
protected

Disallow default bitwise copy construct.

Referenced by faceAreaWeightAMI< SourcePatch, TargetPatch >::restartUncoveredSourceFace().

Here is the caller graph for this function:

faceAreaWeightAMI ( const SourcePatch &  srcPatch,
const TargetPatch &  tgtPatch,
const scalarField srcMagSf,
const scalarField tgtMagSf,
const faceAreaIntersect::triangulationMode triMode,
const bool  reverseTarget = false,
const bool  requireMatch = true,
const bool  restartUncoveredSourceFace = true 
)

Construct from components.

Definition at line 478 of file faceAreaWeightAMI.C.

~faceAreaWeightAMI ( )
virtual

Destructor.

Definition at line 506 of file faceAreaWeightAMI.C.

References faceAreaWeightAMI< SourcePatch, TargetPatch >::calculate().

Here is the call graph for this function:

Member Function Documentation

void operator= ( const faceAreaWeightAMI< SourcePatch, TargetPatch > &  )
protected

Disallow default bitwise assignment.

void calcAddressing ( List< DynamicList< label > > &  srcAddress,
List< DynamicList< scalar > > &  srcWeights,
List< DynamicList< label > > &  tgtAddress,
List< DynamicList< scalar > > &  tgtWeights,
label  srcFaceI,
label  tgtFaceI 
)
protectedvirtual

Calculate addressing and weights using temporary storage.

Definition at line 32 of file faceAreaWeightAMI.C.

References DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), and faceAreaWeightAMI< SourcePatch, TargetPatch >::processSourceFace().

Here is the call graph for this function:

bool processSourceFace ( const label  srcFaceI,
const label  tgtStartFaceI,
DynamicList< label > &  nbrFaces,
DynamicList< label > &  visitedFaces,
List< DynamicList< label > > &  srcAddr,
List< DynamicList< scalar > > &  srcWght,
List< DynamicList< label > > &  tgtAddr,
List< DynamicList< scalar > > &  tgtWght 
)
protectedvirtual

Determine overlap contributions for source face srcFaceI.

Definition at line 110 of file faceAreaWeightAMI.C.

References DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), DynamicList< T, SizeInc, SizeMult, SizeDiv >::clear(), DynamicList< T, SizeInc, SizeMult, SizeDiv >::remove(), faceAreaWeightAMI< SourcePatch, TargetPatch >::setNextFaces(), and List< T >::size().

Referenced by faceAreaWeightAMI< SourcePatch, TargetPatch >::calcAddressing().

Here is the call graph for this function:

Here is the caller graph for this function:

void restartUncoveredSourceFace ( List< DynamicList< label > > &  srcAddr,
List< DynamicList< scalar > > &  srcWght,
List< DynamicList< label > > &  tgtAddr,
List< DynamicList< scalar > > &  tgtWght 
)
protectedvirtual
void setNextFaces ( label startSeedI,
label srcFaceI,
label tgtFaceI,
const boolList mapFlag,
labelList seedFaces,
const DynamicList< label > &  visitedFaces,
bool  errorOnNotFound = true 
) const
protectedvirtual

Set the source and target seed faces.

Definition at line 181 of file faceAreaWeightAMI.C.

References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorIn, forAll, faceAreaWeightAMI< SourcePatch, TargetPatch >::interArea(), Foam::Pout, and List< T >::size().

Referenced by faceAreaWeightAMI< SourcePatch, TargetPatch >::processSourceFace().

Here is the call graph for this function:

Here is the caller graph for this function:

Foam::scalar interArea ( const label  srcFaceI,
const label  tgtFaceI 
) const
protectedvirtual

Area of intersection between source and target faces.

Definition at line 308 of file faceAreaWeightAMI.C.

References faceAreaIntersect::calc(), Foam::endl(), face::mag(), Foam::mag(), n, faceAreaWeightAMI< SourcePatch, TargetPatch >::restartUncoveredSourceFace(), and WarningIn.

Referenced by faceAreaWeightAMI< SourcePatch, TargetPatch >::setNextFaces().

Here is the call graph for this function:

Here is the caller graph for this function:

TypeName ( "faceAreaWeightAMI< SourcePatch, TargetPatch >"  )

Runtime type information.

void calculate ( labelListList srcAddress,
scalarListList srcWeights,
labelListList tgtAddress,
scalarListList tgtWeights,
label  srcFaceI = -1,
label  tgtFaceI = -1 
)
virtual

Update addressing and weights.

Implements AMIMethod< SourcePatch, TargetPatch >.

Reimplemented in partialFaceAreaWeightAMI< SourcePatch, TargetPatch >.

Definition at line 514 of file faceAreaWeightAMI.C.

References Foam::endl(), forAll, Foam::Pout, and List< T >::transfer().

Referenced by faceAreaWeightAMI< SourcePatch, TargetPatch >::~faceAreaWeightAMI().

Here is the call graph for this function:

Here is the caller graph for this function:


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