37 #ifndef patchToPatch_H
38 #define patchToPatch_H
143 const label srcFacei,
154 const label srcFacei,
294 const word& patchToPatchType,
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Class containing processor-to-processor mapping information.
A face is a list of labels corresponding to mesh vertices.
Class to generate coupling geometry between two primitive patches.
virtual tmpNrc< List< DynamicList< scalar > > > srcWeights() const =0
For each source face, the coupled target weights.
static List< remote > distributePatch(const distributionMap &map, const primitiveOldTimePatch &patch, autoPtr< PrimitiveOldTimePatch< faceList, pointField >> &localPatchPtr)
Distribute a patch given its distribution map.
const bool reverse_
Flag to indicate that the two patches are co-directional and.
tmp< Field< Type > > tgtToSrc(const Field< Type > &tgtFld) const
Interpolate a target patch field to the source with no left.
void operator=(const patchToPatch &)=delete
Disallow default bitwise assignment.
label singleProcess_
Index of the processor holding all faces of the patchToPatch, or -1.
List< DynamicList< label > > tgtLocalSrcFaces_
For each target face, the coupled local source faces.
autoPtr< distributionMap > srcMapPtr_
Map from source patch faces to target-local source patch faces.
bool isSingleProcess() const
Is this intersection on a single process?
virtual treeBoundBox srcBox(const face &srcFace, const pointField &srcPoints, const vectorField &srcPointNormals) const =0
Get the bound box for a source face.
virtual ~patchToPatch()
Destructor.
autoPtr< List< remote > > localSrcProcFacesPtr_
When running in parallel, a map from local source face index to.
autoPtr< List< remote > > localTgtProcFacesPtr_
When running in parallel, a map from local target face index to.
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.
virtual void rDistributeTgt(const primitiveOldTimePatch &tgtPatch)
Send data that resulted from an intersection between the source.
tmp< Field< Type > > srcToTgt(const Field< Type > &srcFld) const
Interpolate a source patch field to the target with no left.
virtual labelList finaliseLocal(const primitiveOldTimePatch &srcPatch, const vectorField &srcPointNormals, const vectorField &srcPointNormals0, const primitiveOldTimePatch &tgtPatch)
Finalise the intersection locally. Trims the local target patch.
virtual tmpNrc< List< DynamicList< scalar > > > tgtWeights() const =0
For each target face, the coupled source weights.
virtual void distributeSrc(const primitiveOldTimePatch &srcPatch)
Distribute the source patch so that any information needed by.
treeBoundBox tgtBox(const primitiveOldTimePatch &tgtPatch, const label tgtFacei) const
Get the bound box for a target face.
static autoPtr< patchToPatch > New(const word &patchToPatchType, const bool reverse)
Select from name.
List< List< remote > > tgtSrcProcFaces() const
For each target face, the coupled source procs and faces.
List< DynamicList< label > > srcLocalTgtFaces_
For each source face, the coupled local target faces.
PackedBoolList srcCoupled() const
Return a list indicating which source faces are coupled.
virtual bool intersectFaces(const primitiveOldTimePatch &srcPatch, const vectorField &srcPointNormals, const vectorField &srcPointNormals0, const primitiveOldTimePatch &tgtPatch, const label srcFacei, const label tgtFacei)=0
Intersect two faces.
bool reverse() const
Flag to indicate that the two patches are co-directional and.
bool findOrIntersectFaces(const primitiveOldTimePatch &srcPatch, const vectorField &srcPointNormals, const vectorField &srcPointNormals0, const primitiveOldTimePatch &tgtPatch, const label srcFacei, const label tgtFacei)
Intersect two faces.
List< List< remote > > srcTgtProcFaces() const
For each source face, the coupled target procs and faces.
virtual void initialise(const primitiveOldTimePatch &srcPatch, const vectorField &srcPointNormals, const vectorField &srcPointNormals0, const primitiveOldTimePatch &tgtPatch)
Initialisation.
TypeName("patchToPatch")
Runtime type information.
void intersectPatches(const primitiveOldTimePatch &srcPatch, const vectorField &srcPointNormals, const vectorField &srcPointNormals0, const primitiveOldTimePatch &tgtPatch)
Intersect the patches.
label singleProcess() const
Index of the processor holding all faces of the patchToPatch,.
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.
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.
PackedBoolList tgtCoupled() const
Return a list indicating which target faces are coupled.
patchToPatch(const bool reverse)
Construct from components.
autoPtr< distributionMap > tgtMapPtr_
Map from target patch faces to source-local target patch faces.
virtual label finalise(const primitiveOldTimePatch &srcPatch, const vectorField &srcPointNormals, const vectorField &srcPointNormals0, const primitiveOldTimePatch &tgtPatch, const transformer &tgtToSrc)
Finalising.
declareRunTimeSelectionTable(autoPtr, patchToPatch, bool,(const bool reverse),(reverse))
Declare runtime constructor selection table.
A class for managing temporary objects without reference counting.
A class for managing temporary objects.
Standard boundBox + extra functionality for use in octree.
A class for handling words, derived from string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Macros to ease declaration of run-time selection tables.