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...
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... | |
virtual tmpNrc< List< DynamicList< scalar > > > | srcWeights (const primitivePatch &srcPatch) const |
For each source face, the coupled target weights. More... | |
virtual tmpNrc< List< DynamicList< scalar > > > | tgtWeights (const primitivePatch &tgtPatch) const |
For each target face, the coupled source weights. 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... | |
List< List< procFace > > | srcTgtProcFaces () const |
For each source face, the coupled target procs and faces. More... | |
List< List< procFace > > | tgtSrcProcFaces () const |
For each target face, the coupled source procs and faces. 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... | |
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< patchToPatch > | New (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... | |
void | calcSingleProcess (const primitiveOldTimePatch &srcPatch, const primitiveOldTimePatch &tgtPatch) |
Determine whether or not the intersection of the given 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... | |
labelListList | srcPatchSendFaces () const |
Determine which source faces need to be sent to the target. More... | |
distributionMap | patchDistributionMap (labelListList &&sendFaces) const |
Create a distribution map from a list-list of faces to be sent. More... | |
void | distributePatch (const distributionMap &map, List< procFace > &localProcFaces) const |
Distribute a patch given its distribution map. Just generate. More... | |
PrimitiveOldTimePatch< faceList, pointField > | distributePatch (const distributionMap &map, const primitiveOldTimePatch &patch, List< procFace > &localProcFaces) const |
Distribute a patch given its distribution map. More... | |
virtual tmpNrc< PrimitiveOldTimePatch< faceList, pointField > > | distributeTgt (const primitiveOldTimePatch &srcPatch, const vectorField &srcPointNormals, const vectorField &srcPointNormals0, const primitiveOldTimePatch &tgtPatch, distributionMap &tgtMap) |
Distribute the target patch so that enough is locally available. More... | |
virtual tmpNrc< PrimitiveOldTimePatch< faceList, pointField > > | distributeSrc (const primitiveOldTimePatch &srcPatch, distributionMap &srcMap) |
Distribute the source patch so that everything the target. More... | |
Static Protected Member Functions inherited from patchToPatch | |
template<class SubListA , class SubListB > | |
static void | transferListList (List< SubListA > &a, List< SubListB > &b) |
Transfer list-list b into list-list a. More... | |
template<class Type > | |
static void | rDistributeListList (const label size, const distributionMap &map, List< List< Type >> &data) |
Reverse distribute a list-list given the map. More... | |
template<class Type > | |
static void | rDistributeListList (const label size, const distributionMap &map, List< DynamicList< Type >> &data) |
Reverse distribute a dynamic list-list given the map. More... | |
static List< List< procFace > > | localFacesToProcFaces (const List< DynamicList< label >> &localFaces, const List< procFace > &map=NullObjectRef< List< procFace >>()) |
Map local faces to proc faces. More... | |
static List< DynamicList< label > > | procFacesToLocalFaces (const List< List< procFace >> &procFaces, const HashTable< label, procFace, Hash< procFace >> &map) |
Map proc faces to local faces. 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... | |
autoPtr< List< procFace > > | localSrcProcFacesPtr_ |
When running in parallel, a map from local source face index to. More... | |
autoPtr< List< procFace > > | localTgtProcFacesPtr_ |
When running in parallel, a map from local target face index to. 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... | |
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.
Definition at line 55 of file intersectionPatchToPatch.H.
intersection | ( | const bool | reverse | ) |
Construct from components.
Definition at line 847 of file intersectionPatchToPatch.C.
~intersection | ( | ) |
Destructor.
Definition at line 883 of file intersectionPatchToPatch.C.
References intersection::srcWeights().
TypeName | ( | "intersection" | ) |
Runtime type information.
|
static |
Get the bound box for a source face.
Definition at line 70 of file intersectionPatchToPatch.C.
References Foam::acos(), DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), intersection::part::area, face::area(), Foam::constant::universal::c, intersection::part::centre, edge::centre(), DynamicList< T, SizeInc, SizeMult, SizeDiv >::clear(), List< T >::clear(), edge::compare(), Foam::e, PrimitivePatch< FaceList, PointField >::edgeFaces(), PrimitivePatch< FaceList, PointField >::edges(), Foam::endl(), Foam::exit(), PrimitivePatch< FaceList, PointField >::faceAreas(), PrimitivePatch< FaceList, PointField >::faceCentres(), PrimitivePatch< FaceList, PointField >::faceEdges(), Foam::FatalError, FatalErrorInFunction, patchToPatch::finalise(), Foam::findIndex(), forAll, Foam::gAverage(), Foam::gMax(), Foam::gMin(), Foam::identity(), Foam::indent(), Foam::Info, patchToPatch::initialise(), Foam::triIntersect::intersectTris(), transformer::invTransform(), transformer::invTransformPosition(), location::isIntersection(), Foam::isNull(), location::isSrcNotTgtPoint(), location::isSrcPoint(), location::isTgtNotSrcPoint(), location::isTgtPoint(), Foam::labelMax, PrimitivePatch< FaceList, PointField >::localFaces(), PrimitivePatch< FaceList, PointField >::localPoints(), Foam::mag(), Foam::max(), Foam::min(), UPstream::myProcNo(), n, Foam::name(), intersection::couple::nbr, PrimitivePatch< FaceList, PointField >::nEdges(), Foam::normalised(), word::null, boundBox::overlaps(), p, UPstream::parRun(), PrimitivePatch< FaceList, PointField >::points(), Foam::pow3(), Foam::radToDeg(), patchToPatch::rDistributeTgt(), Foam::reduce(), List< T >::resize(), Foam::reverse(), Foam::sign(), Foam::sqrt(), location::srcEdgei(), location::srcPointi(), Foam::sum(), location::tgtEdgei(), location::tgtPointi(), Foam::vtkWritePolyData::write(), and Foam::Zero.
Referenced by intersection::triPointValues().
|
inline |
For each source face, the source and target areas for each.
target coupling
Definition at line 32 of file intersectionPatchToPatchI.H.
Referenced by Foam::meshEdge().
|
inline |
For each source edge, the non-coupled geometry associated.
with its projection
Definition at line 39 of file intersectionPatchToPatchI.H.
Referenced by Foam::meshEdge().
|
inline |
For each source face, the area associated with mismatch.
across the coupling
Definition at line 46 of file intersectionPatchToPatchI.H.
Referenced by Foam::meshEdge().
|
inline |
For each target face, the target and source areas for each.
source coupling
Definition at line 54 of file intersectionPatchToPatchI.H.
Referenced by Foam::meshEdge().
|
virtual |
For each source face, the coupled target weights.
Implements patchToPatch.
Definition at line 891 of file intersectionPatchToPatch.C.
References PrimitivePatch< FaceList, PointField >::faceAreas(), forAll, Foam::mag(), List< T >::resize(), and intersection::tgtWeights().
Referenced by intersection::~intersection().
|
virtual |
For each target face, the coupled source weights.
Implements patchToPatch.
Definition at line 919 of file intersectionPatchToPatch.C.
References PrimitivePatch< FaceList, PointField >::faceAreas(), forAll, Foam::mag(), and List< T >::resize().
Referenced by intersection::srcWeights().
Foam::FixedList<Type, 3> triPointValues | ( | const triFace & | t, |
const UList< Type > & | values | ||
) |
Definition at line 53 of file intersectionPatchToPatch.C.
References forAll, and intersection::srcBoxStatic().
|
static |
Extra debugging for intersections between specific faces. Named.
"intersectionSrcFace" and "intersectionTgtFace" respectively.
Definition at line 354 of file intersectionPatchToPatch.H.
|
static |
Definition at line 354 of file intersectionPatchToPatch.H.