intersection Class Reference

Class to generate patchToPatch coupling geometry. A full geometric intersection is done between a face and those opposite, and coupling geometry is calculated accordingly. More...

Inheritance diagram for intersection:
Collaboration diagram for intersection:

Classes

struct  couple
 Structure to store the geometry associated with the coupling. More...
 
struct  part
 Structure to store the geometry associated with part of a patch. More...
 

Public Member Functions

 TypeName ("intersection")
 Runtime type information. More...
 
 intersection (const bool reverse)
 Construct from components. More...
 
 ~intersection ()
 Destructor. More...
 
const List< DynamicList< couple > > & srcCouples () const
 For each source face, the source and target areas for each. More...
 
const List< part > & srcEdgeParts () const
 For each source edge, the non-coupled geometry associated. More...
 
const List< part > & srcErrorParts () const
 For each source face, the area associated with mismatch. More...
 
const List< DynamicList< couple > > & tgtCouples () const
 For each target face, the target and source areas for each. More...
 
const List< scalar > & srcCoverage () const
 Return the proportion of the source faces that are coupled. More...
 
const List< scalar > & tgtCoverage () const
 Return the proportion of the target faces that are coupled. More...
 
template<class Type >
Foam::FixedList< Type, 3 > triPointValues (const triFace &t, const UList< Type > &values)
 
- Public Member Functions inherited from patchToPatch
 TypeName ("patchToPatch")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, patchToPatch, bool,(const bool reverse),(reverse))
 Declare runtime constructor selection table. More...
 
 patchToPatch (const bool reverse)
 Construct from components. More...
 
 patchToPatch (const patchToPatch &)=delete
 Disallow default bitwise copy construction. More...
 
virtual ~patchToPatch ()
 Destructor. More...
 
bool reverse () const
 Flag to indicate that the two patches are co-directional and. More...
 
label singleProcess () const
 Index of the processor holding all faces of the patchToPatch,. More...
 
bool isSingleProcess () const
 Is this intersection on a single process? More...
 
PackedBoolList srcCoupled () const
 Return a list indicating which source faces are coupled. More...
 
PackedBoolList tgtCoupled () const
 Return a list indicating which target faces are coupled. More...
 
List< List< remote > > srcTgtProcFaces () const
 For each source face, the coupled target procs and faces. More...
 
List< List< remote > > tgtSrcProcFaces () const
 For each target face, the coupled source procs and faces. More...
 
template<class Type >
tmp< Field< Type > > srcToTgt (const Field< Type > &srcFld) const
 Interpolate a source patch field to the target with no left. More...
 
template<class Type >
tmp< Field< Type > > srcToTgt (const Field< Type > &srcFld, const Field< Type > &leftOverTgtFld) const
 Interpolate a source patch field to the target with left over. More...
 
template<class Type >
tmp< Field< Type > > tgtToSrc (const Field< Type > &tgtFld) const
 Interpolate a target patch field to the source with no left. More...
 
template<class Type >
tmp< Field< Type > > tgtToSrc (const Field< Type > &tgtFld, const Field< Type > &leftOverSrcFld) const
 Interpolate a target patch field to the source with left. More...
 
void update (const primitiveOldTimePatch &srcPatch, const vectorField &srcPointNormals, const vectorField &srcPointNormals0, const primitiveOldTimePatch &tgtPatch, const transformer &tgtToSrc=NullObjectRef< transformer >())
 Update addressing and weights for the given patches. More...
 
void update (const primitivePatch &srcPatch, const vectorField &srcPointNormals, const primitivePatch &tgtPatch, const transformer &tgtToSrc=NullObjectRef< transformer >())
 Update addressing and weights for the given patches. More...
 
void operator= (const patchToPatch &)=delete
 Disallow default bitwise assignment. More...
 
template<class Type >
Foam::tmp< Foam::Field< Type > > srcToTgt (const Field< Type > &srcFld) const
 
template<class Type >
Foam::tmp< Foam::Field< Type > > srcToTgt (const Field< Type > &srcFld, const Field< Type > &leftOverTgtFld) const
 
template<class Type >
Foam::tmp< Foam::Field< Type > > tgtToSrc (const Field< Type > &tgtFld) const
 
template<class Type >
Foam::tmp< Foam::Field< Type > > tgtToSrc (const Field< Type > &tgtFld, const Field< Type > &leftOverSrcFld) const
 

Static Public Member Functions

static treeBoundBox srcBoxStatic (const face &srcFace, const pointField &srcPoints, const vectorField &srcPointNormals)
 Get the bound box for a source face. More...
 
- Static Public Member Functions inherited from patchToPatch
static autoPtr< patchToPatchNew (const word &patchToPatchType, const bool reverse)
 Select from name. More...
 

Static Public Attributes

static int debugSrcFacei
 Extra debugging for intersections between specific faces. Named. More...
 
static int debugTgtFacei
 

Additional Inherited Members

- Protected Member Functions inherited from patchToPatch
treeBoundBox srcBox (const primitiveOldTimePatch &srcPatch, const vectorField &srcPointNormals, const vectorField &srcPointNormals0, const label srcFacei) const
 Get the bound box for a source face. More...
 
treeBoundBox srcBox (const primitiveOldTimePatch &srcPatch, const vectorField &srcPointNormals, const vectorField &srcPointNormals0) const
 Get the bound box for the source patch. More...
 
treeBoundBox tgtBox (const primitiveOldTimePatch &tgtPatch, const label tgtFacei) const
 Get the bound box for a target face. More...
 
treeBoundBox tgtBox (const primitiveOldTimePatch &tgtPatch) const
 Get the bound box for the target patch. More...
 
bool findOrIntersectFaces (const primitiveOldTimePatch &srcPatch, const vectorField &srcPointNormals, const vectorField &srcPointNormals0, const primitiveOldTimePatch &tgtPatch, const label srcFacei, const label tgtFacei)
 Intersect two faces. More...
 
label intersectPatchQueue (const primitiveOldTimePatch &srcPatch, const vectorField &srcPointNormals, const vectorField &srcPointNormals0, const primitiveOldTimePatch &tgtPatch, const bool isSrc, const DynamicList< labelPair > &queue, labelList &faceComplete, DynamicList< labelPair > &otherQueue, const labelList &otherFaceComplete, boolList &otherFaceQueued, boolList &otherFaceVisited)
 Intersect a queue of source-target face pairs. Update completion. More...
 
void intersectPatches (const primitiveOldTimePatch &srcPatch, const vectorField &srcPointNormals, const vectorField &srcPointNormals0, const primitiveOldTimePatch &tgtPatch)
 Intersect the patches. More...
 
labelListList tgtPatchSendFaces (const primitiveOldTimePatch &srcPatch, const vectorField &srcPointNormals, const vectorField &srcPointNormals0, const primitiveOldTimePatch &tgtPatch) const
 Determine which target faces need to be sent to the source. More...
 
virtual void distributeSrc (const primitiveOldTimePatch &srcPatch)
 Distribute the source patch so that any information needed by. More...
 
- Static Protected Member Functions inherited from patchToPatch
static List< remotedistributePatch (const distributionMap &map, const primitiveOldTimePatch &patch, autoPtr< PrimitiveOldTimePatch< faceList, pointField >> &localPatchPtr)
 Distribute a patch given its distribution map. More...
 
- Protected Attributes inherited from patchToPatch
const bool reverse_
 Flag to indicate that the two patches are co-directional and. More...
 
label singleProcess_
 Index of the processor holding all faces of the patchToPatch, or -1. More...
 
List< DynamicList< label > > srcLocalTgtFaces_
 For each source face, the coupled local target faces. More...
 
List< DynamicList< label > > tgtLocalSrcFaces_
 For each target face, the coupled local source faces. More...
 
autoPtr< distributionMapsrcMapPtr_
 Map from source patch faces to target-local source patch faces. More...
 
autoPtr< distributionMaptgtMapPtr_
 Map from target patch faces to source-local target patch faces. More...
 
autoPtr< List< remote > > localSrcProcFacesPtr_
 When running in parallel, a map from local source face index to. More...
 
autoPtr< List< remote > > localTgtProcFacesPtr_
 When running in parallel, a map from local target face index to. More...
 

Detailed Description

Class to generate patchToPatch coupling geometry. A full geometric intersection is done between a face and those opposite, and coupling geometry is calculated accordingly.

Class to generate patchToPatch coupling geometry. Coupling is determined by means of comparing the bound boxes generated by the intersection method. This generates an outer "envelope" of possible intersections that can be used for ray shooting and Lagrangian transfer.

Source files

Note that this method is not added to the run-time selection table, as it is not a method which facilitates patch coupling or mapping.

Source files

Definition at line 55 of file intersectionPatchToPatch.H.

Constructor & Destructor Documentation

◆ intersection()

intersection ( const bool  reverse)

Construct from components.

Definition at line 947 of file intersectionPatchToPatch.C.

◆ ~intersection()

Destructor.

Definition at line 985 of file intersectionPatchToPatch.C.

Member Function Documentation

◆ TypeName()

TypeName ( "intersection"  )

Runtime type information.

◆ srcBoxStatic()

Foam::treeBoundBox srcBoxStatic ( const face srcFace,
const pointField srcPoints,
const vectorField srcPointNormals 
)
static

Get the bound box for a source face.

Definition at line 69 of file intersectionPatchToPatch.C.

References DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), face::area(), DynamicList< T, SizeInc, SizeMult, SizeDiv >::clear(), forAll, Foam::mag(), n, p, and Foam::sqrt().

Here is the call graph for this function:

◆ srcCouples()

const Foam::List< Foam::DynamicList< Foam::patchToPatches::intersection::couple > > & srcCouples ( ) const
inline

For each source face, the source and target areas for each.

target coupling

Definition at line 32 of file intersectionPatchToPatchI.H.

◆ srcEdgeParts()

const Foam::List< Foam::patchToPatches::intersection::part > & srcEdgeParts ( ) const
inline

For each source edge, the non-coupled geometry associated.

with its projection

Definition at line 39 of file intersectionPatchToPatchI.H.

◆ srcErrorParts()

const Foam::List< Foam::patchToPatches::intersection::part > & srcErrorParts ( ) const
inline

For each source face, the area associated with mismatch.

across the coupling

Definition at line 46 of file intersectionPatchToPatchI.H.

◆ tgtCouples()

const Foam::List< Foam::DynamicList< Foam::patchToPatches::intersection::couple > > & tgtCouples ( ) const
inline

For each target face, the target and source areas for each.

source coupling

Definition at line 54 of file intersectionPatchToPatchI.H.

◆ srcCoverage()

const Foam::List< Foam::scalar > & srcCoverage ( ) const
inline

Return the proportion of the source faces that are coupled.

Definition at line 61 of file intersectionPatchToPatchI.H.

◆ tgtCoverage()

const Foam::List< Foam::scalar > & tgtCoverage ( ) const
inline

Return the proportion of the target faces that are coupled.

Definition at line 68 of file intersectionPatchToPatchI.H.

◆ triPointValues()

Foam::FixedList<Type, 3> triPointValues ( const triFace t,
const UList< Type > &  values 
)

Definition at line 52 of file intersectionPatchToPatch.C.

References forAll.

Member Data Documentation

◆ debugSrcFacei

int debugSrcFacei
static
Initial value:
=
debug::debugSwitch((intersection::typeName + "SrcFace").c_str(), -1)
int debugSwitch(const char *name, const int defaultValue=0)
Lookup debug switch or add default value.
Definition: debug.C:211

Extra debugging for intersections between specific faces. Named.

"intersectionSrcFace" and "intersectionTgtFace" respectively.

Definition at line 373 of file intersectionPatchToPatch.H.

◆ debugTgtFacei

int debugTgtFacei
static
Initial value:
=
debug::debugSwitch((intersection::typeName + "TgtFace").c_str(), -1)

Definition at line 373 of file intersectionPatchToPatch.H.


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