36 #ifndef patchToPatch_H 37 #define patchToPatch_H 127 template<
class SubListA,
class SubListB>
217 const label srcFacei,
228 const label srcFacei,
382 (
const bool reverse),
405 const word& patchToPatchType,
453 const transformer& tgtToSrc = NullObjectRef<transformer>()
462 const transformer& tgtToSrc = NullObjectRef<transformer>()
virtual treeBoundBox srcBox(const face &srcFace, const pointField &srcPoints, const vectorField &srcPointNormals) const =0
Get the bound box for a source face.
List< List< procFace > > srcTgtProcFaces() const
For each source face, the coupled target procs and faces.
const bool reverse_
Flag to indicate that the two patches are co-directional and.
virtual void rDistributeTgt(const primitiveOldTimePatch &tgtPatch, const distributionMap &tgtMap)
Send data that resulted from an intersection between the source.
A face is a list of labels corresponding to mesh vertices.
patchToPatch(const bool reverse)
Construct from components.
virtual tmpNrc< List< DynamicList< scalar > > > srcWeights(const primitivePatch &srcPatch) const =0
For each source face, the coupled target weights.
List< List< procFace > > tgtSrcProcFaces() const
For each target face, the coupled source procs and faces.
Structure to conveniently store processor and face indices.
friend Istream & operator>>(Istream &is, procFace &p)
Input stream operator.
label facei
The face index.
label singleProcess_
Index of the processor holding all faces of the patchToPatch, or -1.
friend bool operator!=(const procFace &a, const procFace &b)
Inequality comparison.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
bool reverse() const
Flag to indicate that the two patches are co-directional and.
label proci
The processor index.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m K].
void intersectPatches(const primitiveOldTimePatch &srcPatch, const vectorField &srcPointNormals, const vectorField &srcPointNormals0, const primitiveOldTimePatch &tgtPatch)
Intersect the patches.
List< DynamicList< label > > srcLocalTgtFaces_
For each source face, the coupled local target faces.
TypeName("patchToPatch")
Runtime type information.
static List< DynamicList< label > > procFacesToLocalFaces(const List< List< procFace >> &procFaces, const HashTable< label, procFace, Hash< procFace >> &map)
Map proc faces to local faces.
virtual tmpNrc< PrimitiveOldTimePatch< faceList, pointField > > distributeSrc(const primitiveOldTimePatch &srcPatch, distributionMap &srcMap)
Distribute the source patch so that everything the target.
static List< List< procFace > > localFacesToProcFaces(const List< DynamicList< label >> &localFaces, const List< procFace > &map=NullObjectRef< List< procFace >>())
Map local faces to proc faces.
static void rDistributeListList(const label size, const distributionMap &map, List< List< Type >> &data)
Reverse distribute a list-list given the map.
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.
A list of faces which address into the list of points.
static autoPtr< patchToPatch > New(const word &patchToPatchType, const bool reverse)
Select from name.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
A class for handling words, derived from string.
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.
declareRunTimeSelectionTable(autoPtr, patchToPatch, bool,(const bool reverse),(reverse))
Declare runtime constructor selection table.
virtual ~patchToPatch()
Destructor.
An STL-conforming hash table.
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.
distributionMap patchDistributionMap(labelListList &&sendFaces) const
Create a distribution map from a list-list of faces to be sent.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
bool findOrIntersectFaces(const primitiveOldTimePatch &srcPatch, const vectorField &srcPointNormals, const vectorField &srcPointNormals0, const primitiveOldTimePatch &tgtPatch, const label srcFacei, const label tgtFacei)
Intersect two faces.
Database for solution and other reduced data.
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.
friend bool operator==(const procFace &a, const procFace &b)
Equality comparison.
labelListList srcPatchSendFaces() const
Determine which source faces need to be sent to the target.
A class for managing temporary objects without reference counting.
virtual tmpNrc< List< DynamicList< scalar > > > tgtWeights(const primitivePatch &tgtPatch) const =0
For each target face, the coupled source weights.
virtual label finalise(const primitiveOldTimePatch &srcPatch, const vectorField &srcPointNormals, const vectorField &srcPointNormals0, const primitiveOldTimePatch &tgtPatch, const transformer &tgtToSrc)
Finalising.
Class containing processor-to-processor mapping information.
autoPtr< List< procFace > > localSrcProcFacesPtr_
When running in parallel, a map from local source face index to.
void calcSingleProcess(const primitiveOldTimePatch &srcPatch, const primitiveOldTimePatch &tgtPatch)
Determine whether or not the intersection of the given patches.
List< DynamicList< label > > tgtLocalSrcFaces_
For each target face, the coupled local source faces.
Hash function class for primitives. All non-primitives used to hash entries on hash tables likely nee...
Standard boundBox + extra functionality for use in octree.
treeBoundBox tgtBox(const primitiveOldTimePatch &tgtPatch, const label tgtFacei) const
Get the bound box for a target face.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
label singleProcess() const
Index of the processor holding all faces of the patchToPatch,.
Macros to ease declaration of run-time selection tables.
virtual void initialise(const primitiveOldTimePatch &srcPatch, const vectorField &srcPointNormals, const vectorField &srcPointNormals0, const primitiveOldTimePatch &tgtPatch)
Initialisation.
friend Ostream & operator<<(Ostream &os, const procFace &p)
Output stream operator.
void operator=(const patchToPatch &)=delete
Disallow default bitwise assignment.
const T & NullObjectRef()
Return reference to the nullObject of type T.
static void transferListList(List< SubListA > &a, List< SubListB > &b)
Transfer list-list b into list-list a.
Class to generate coupling geometry between two primitive patches.
autoPtr< List< procFace > > localTgtProcFacesPtr_
When running in parallel, a map from local target face index to.
void distributePatch(const distributionMap &map, List< procFace > &localProcFaces) const
Distribute a patch given its distribution map. Just generate.
bool isSingleProcess() const
Is this intersection on a single process?
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.