70 #ifndef mapDistributeBase_H 71 #define mapDistributeBase_H 91 class mapDistributeBase;
93 Istream&
operator>>(Istream&, mapDistributeBase&);
94 Ostream&
operator<<(Ostream&,
const mapDistributeBase&);
132 const label expectedSize,
133 const label receivedSize
170 template<
class T,
class CombineOp,
class negateOp>
176 const CombineOp& cop,
177 const negateOp& negOp,
181 template<
class T,
class negateOp>
187 const negateOp& negOp
343 const label globalElement
361 const label localSize,
369 template<
class T,
class negateOp>
380 const negateOp& negOp,
386 template<
class T,
class CombineOp,
class negateOp>
391 const label constructSize,
393 const bool subHasFlip,
395 const bool constructHasFlip,
397 const CombineOp& cop,
398 const negateOp& negOp,
412 template<
class T,
class negateOp>
416 const negateOp& negOp,
432 const label constructSize,
443 const label constructSize,
A simple container for copying or transferring objects of type <T>.
void compact(const boolList &elemIsUsed, const int tag=UPstream::msgType())
Compact maps. Gets per field a bool whether it is used (locally)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
static label renumber(const globalIndex &, const List< Map< label >> &compactMap, const label globalElement)
Helper for construct from globalIndex. Renumbers element.
void printLayout(Ostream &os) const
Debug: print layout. Can only be used on maps with sorted.
const labelListList & constructMap() const
From subsetted data to new reconstructed data.
commsTypes
Types of communications.
const labelListList & subMap() const
From subsetted data back to original data.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
labelListList subMap_
Maps from subsetted data back to original data.
friend Ostream & operator<<(Ostream &, const mapDistributeBase &)
Write dictionary to Ostream.
bool constructHasFlip() const
Does constructMap include a sign.
bool subHasFlip() const
Does subMap include a sign.
static int & msgType()
Message tag of standard messages.
Xfer< mapDistributeBase > xfer()
Transfer contents to the Xfer container.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
mapDistributeBase()
Construct null.
label constructSize_
Size of reconstructed data.
friend Istream & operator>>(Istream &, mapDistributeBase &)
Read dictionary from Istream.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){gmvFile<< iter().position().x()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){gmvFile<< iter().position().y()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){gmvFile<< iter().position().z()<< ' ';}gmvFile<< nl;forAll(lagrangianScalarNames, i){const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
autoPtr< List< labelPair > > schedulePtr_
Schedule.
Istream & operator>>(Istream &, directionInfo &)
static T accessAndFlip(const UList< T > &fld, const label index, const bool hasFlip, const negateOp &negOp)
static void distribute(const Pstream::commsTypes commsType, const List< labelPair > &schedule, const label constructSize, const labelListList &subMap, const bool subHasFlip, const labelListList &constructMap, const bool constructHasFlip, List< T > &, const negateOp &negOp, const int tag=UPstream::msgType())
Distribute data. Note:schedule only used for Pstream::scheduled.
labelListList constructMap_
Maps from subsetted data to new reconstructed data.
void updateMesh(const mapPolyMesh &)
Correct for topo change.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void operator=(const mapDistributeBase &)
Class containing processor-to-processor mapping information.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
const List< labelPair > & schedule() const
Return a schedule. Demand driven. See above.
Buffers for inter-processor communications streams (UOPstream, UIPstream).
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
bool subHasFlip_
Whether subMap includes flip or not.
void calcCompactAddressing(const globalIndex &globalNumbering, const labelList &elements, List< Map< label >> &compactMap) const
Construct per processor compact addressing of the global elements.
void exchangeAddressing(const int tag, const globalIndex &globalNumbering, labelList &elements, List< Map< label >> &compactMap, labelList &compactStart)
bool constructHasFlip_
Whether constructMap includes flip or not.
void send(PstreamBuffers &, const List< T > &) const
Do all sends using PstreamBuffers.
void reverseDistribute(const label constructSize, List< T > &, const int tag=UPstream::msgType()) const
Reverse distribute data using default commsType.
ClassName("mapDistributeBase")
Ostream & operator<<(Ostream &, const ensightPart &)
static void checkReceivedSize(const label proci, const label expectedSize, const label receivedSize)
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
void transfer(mapDistributeBase &)
Transfer the contents of the argument and annul the argument.
void receive(PstreamBuffers &, List< T > &) const
Do all receives using PstreamBuffers.
label constructSize() const
Constructed data size.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
static void flipAndCombine(const UList< label > &map, const bool hasFlip, const UList< T > &rhs, const CombineOp &cop, const negateOp &negOp, List< T > &lhs)