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>
391 const CombineOp& cop,
392 const negateOp& negOp,
406 template<
class T,
class negateOp>
410 const negateOp& negOp,
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Buffers for inter-processor communications streams (UOPstream, UIPstream).
commsTypes
Types of communications.
static int & msgType()
Message tag of standard messages.
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.
bool constructHasFlip_
Whether constructMap includes flip or not.
label constructSize_
Size of reconstructed data.
bool subHasFlip() const
Does subMap include a sign.
void reverseDistribute(const label constructSize, List< T > &, const int tag=UPstream::msgType()) const
Reverse distribute data using default commsType.
const List< labelPair > & schedule() const
Return a schedule. Demand driven. See above.
const labelListList & constructMap() const
From subsetted data to new reconstructed data.
const labelListList & subMap() const
From subsetted data back to original data.
void operator=(const distributionMapBase &)
autoPtr< List< labelPair > > schedulePtr_
Schedule.
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.
void printLayout(Ostream &os) const
Debug: print layout. Can only be used on maps with sorted.
void transfer(distributionMapBase &)
Transfer the contents of the argument and annul the argument.
bool subHasFlip_
Whether subMap includes flip or not.
ClassName("distributionMapBase")
bool constructHasFlip() const
Does constructMap include a sign.
static T accessAndFlip(const UList< T > &fld, const label index, const bool hasFlip, const negateOp &negOp)
friend Ostream & operator<<(Ostream &, const distributionMapBase &)
Write dictionary to Ostream.
static void checkReceivedSize(const label proci, const label expectedSize, const label receivedSize)
static label renumber(const globalIndex &, const List< Map< label >> &compactMap, const label globalElement)
Helper for construct from globalIndex. Renumbers element.
labelListList subMap_
Maps from subsetted data back to original data.
distributionMapBase()
Construct null.
void calcCompactAddressing(const globalIndex &globalNumbering, const labelList &elements, List< Map< label >> &compactMap) const
Construct per processor compact addressing of the global elements.
friend Istream & operator>>(Istream &, distributionMapBase &)
Read dictionary from Istream.
void send(PstreamBuffers &, const List< T > &) const
Do all sends using PstreamBuffers.
void exchangeAddressing(const int tag, const globalIndex &globalNumbering, labelList &elements, List< Map< label >> &compactMap, labelList &compactStart)
label constructSize() const
Constructed data size.
labelListList constructMap_
Maps from subsetted data to new reconstructed data.
static void flipAndCombine(const UList< label > &map, const bool hasFlip, const UList< T > &rhs, const CombineOp &cop, const negateOp &negOp, List< T > &lhs)
void receive(PstreamBuffers &, List< T > &) const
Do all receives using PstreamBuffers.
void compact(const boolList &elemIsUsed, const int tag=UPstream::msgType())
Compact maps. Gets per field a bool whether it is used (locally)
void operator=(distributionMapBase &&)
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
gmvFile<< "tracers "<< particles.size()<< nl;{ pointField positions(particles.size());label particlei=0;forAllConstIter(Cloud< passiveParticle >, particles, iter) { positions[particlei++]=iter().position(mesh);} for(i=0;i< pTraits< point >::nComponents;i++) { forAll(positions, particlei) { gmvFile<< component(positions[particlei], i)<< ' ';} gmvFile<< nl;}}forAll(lagrangianScalarNames, i){ const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.name(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Istream & operator>>(Istream &, pistonPointEdgeData &)
Ostream & operator<<(Ostream &os, const fvConstraints &constraints)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)