Go to the documentation of this file.
70 #ifndef mapDistributeBase_H
71 #define mapDistributeBase_H
123 const label expectedSize,
124 const label receivedSize
157 template<
class T,
class CombineOp,
class negateOp>
163 const CombineOp& cop,
164 const negateOp& negOp,
168 template<
class T,
class negateOp>
174 const negateOp& negOp
330 const label globalElement
348 const label localSize,
356 template<
class T,
class negateOp>
367 const negateOp& negOp,
373 template<
class T,
class CombineOp,
class negateOp>
384 const CombineOp& cop,
385 const negateOp& negOp,
399 template<
class T,
class negateOp>
403 const negateOp& negOp,
void reverseDistribute(const label constructSize, List< T > &, const int tag=UPstream::msgType()) const
Reverse distribute data using default commsType.
void exchangeAddressing(const int tag, const globalIndex &globalNumbering, labelList &elements, List< Map< label > > &compactMap, labelList &compactStart)
static T accessAndFlip(const UList< T > &fld, const label index, const bool hasFlip, const negateOp &negOp)
const labelListList & subMap() const
From subsetted data back to original data.
bool constructHasFlip() const
Does constructMap include a sign.
labelListList subMap_
Maps from subsetted data back to original data.
friend Istream & operator>>(Istream &, mapDistributeBase &)
Read dictionary from Istream.
friend Ostream & operator<<(Ostream &, const mapDistributeBase &)
Write dictionary to Ostream.
labelListList & constructMap()
From subsetted data to new reconstructed data.
void operator=(const mapDistributeBase &)
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
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.
void send(PstreamBuffers &, const List< T > &) const
Do all sends using PstreamBuffers.
Buffers for inter-processor communications streams (UOPstream, UIPstream).
void receive(PstreamBuffers &, List< T > &) const
Do all receives using PstreamBuffers.
static label renumber(const globalIndex &, const List< Map< label > > &compactMap, const label globalElement)
Helper for construct from globalIndex. Renumbers element.
Xfer< mapDistributeBase > xfer()
Transfer contents to the Xfer container.
bool & subHasFlip()
Does subMap include a sign.
autoPtr< List< labelPair > > schedulePtr_
Schedule.
A simple container for copying or transferring objects of type <T>.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const List< labelPair > & schedule() const
Return a schedule. Demand driven. See above.
mapDistributeBase()
Construct null.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
void calcCompactAddressing(const globalIndex &globalNumbering, const labelList &elements, List< Map< label > > &compactMap) const
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
label constructSize_
Size of reconstructed data.
bool subHasFlip_
Whether subMap includes flip or not.
void transfer(mapDistributeBase &)
Transfer the contents of the argument and annul the argument.
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))
bool subHasFlip() const
Does subMap include a sign.
bool constructHasFlip_
Whether constructMap includes flip or not.
void compact(const boolList &elemIsUsed, const int tag=UPstream::msgType())
Compact maps. Gets per field a bool whether it is used (locally)
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
void printLayout(Ostream &os) const
Debug: print layout. Can only be used on maps with sorted.
label constructSize() const
Constructed data size.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
static int & msgType()
Message tag of standard messages.
commsTypes
Types of communications.
labelListList constructMap_
Maps from subsetted data to new reconstructed data.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
labelListList & subMap()
From subsetted data back to original data.
label & constructSize()
Constructed data size.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
static void flipAndCombine(const UList< label > &map, const bool hasFlip, const UList< T > &rhs, const CombineOp &cop, const negateOp &negOp, List< T > &lhs)
bool & constructHasFlip()
Does constructMap include a sign.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Class containing processor-to-processor mapping information.
static void checkReceivedSize(const label procI, const label expectedSize, const label receivedSize)
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const labelListList & constructMap() const
From subsetted data to new reconstructed data.
void updateMesh(const mapPolyMesh &)
Correct for topo change.
ClassName("mapDistributeBase")