68 #ifndef distributionMapBase_H 69 #define distributionMapBase_H 87 class distributionMapBase;
89 Istream&
operator>>(Istream&, distributionMapBase&);
90 Ostream&
operator<<(Ostream&,
const distributionMapBase&);
128 const label expectedSize,
129 const label receivedSize
166 template<
class T,
class CombineOp,
class negateOp>
172 const CombineOp& cop,
173 const negateOp& negOp,
177 template<
class T,
class negateOp>
183 const negateOp& negOp
336 const label globalElement
354 const label localSize,
363 template<
class T,
class negateOp>
374 const negateOp& negOp,
380 template<
class T,
class CombineOp,
class negateOp>
385 const label constructSize,
387 const bool subHasFlip,
389 const bool constructHasFlip,
391 const CombineOp& cop,
392 const negateOp& negOp,
406 template<
class T,
class negateOp>
410 const negateOp& negOp,
426 const label constructSize,
437 const label constructSize,
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.
friend Ostream & operator<<(Ostream &, const distributionMapBase &)
Write dictionary to Ostream.
static label renumber(const globalIndex &, const List< Map< label >> &compactMap, const label globalElement)
Helper for construct from globalIndex. Renumbers element.
void receive(PstreamBuffers &, List< T > &) const
Do all receives using PstreamBuffers.
Class containing processor-to-processor mapping information.
void operator=(const distributionMapBase &)
void reverseDistribute(const label constructSize, List< T > &, const int tag=UPstream::msgType()) const
Reverse distribute data using default commsType.
commsTypes
Types of communications.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
const labelListList & constructMap() const
From subsetted data to new reconstructed data.
distributionMapBase()
Construct null.
static int & msgType()
Message tag of standard messages.
const labelListList & subMap() const
From subsetted data back to original data.
bool subHasFlip_
Whether subMap includes flip or not.
static void checkReceivedSize(const label proci, const label expectedSize, const label receivedSize)
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...
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...
Istream & operator>>(Istream &, directionInfo &)
void calcCompactAddressing(const globalIndex &globalNumbering, const labelList &elements, List< Map< label >> &compactMap) const
Construct per processor compact addressing of the global elements.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
label constructSize() const
Constructed data size.
ClassName("distributionMapBase")
An Ostream is an abstract base class for all output systems (streams, files, token lists...
static void flipAndCombine(const UList< label > &map, const bool hasFlip, const UList< T > &rhs, const CombineOp &cop, const negateOp &negOp, List< T > &lhs)
bool subHasFlip() const
Does subMap include a sign.
friend Istream & operator>>(Istream &, distributionMapBase &)
Read dictionary from Istream.
void transfer(distributionMapBase &)
Transfer the contents of the argument and annul the argument.
Buffers for inter-processor communications streams (UOPstream, UIPstream).
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
bool constructHasFlip_
Whether constructMap includes flip or not.
static T accessAndFlip(const UList< T > &fld, const label index, const bool hasFlip, const negateOp &negOp)
Ostream & operator<<(Ostream &, const ensightPart &)
void exchangeAddressing(const int tag, const globalIndex &globalNumbering, labelList &elements, List< Map< label >> &compactMap, labelList &compactStart)
labelListList constructMap_
Maps from subsetted data to new reconstructed data.
void send(PstreamBuffers &, const List< T > &) const
Do all sends using PstreamBuffers.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
label constructSize_
Size of reconstructed data.
void printLayout(Ostream &os) const
Debug: print layout. Can only be used on maps with sorted.
autoPtr< List< labelPair > > schedulePtr_
Schedule.
const List< labelPair > & schedule() const
Return a schedule. Demand driven. See above.
bool constructHasFlip() const
Does constructMap include a sign.
labelListList subMap_
Maps from subsetted data back to original data.