40 void Foam::mapDistribute::transform::operator()
48 void Foam::mapDistribute::transform::operator()
55 void Foam::mapDistribute::transform::operator()
62 void Foam::mapDistribute::transform::operator()
71 void Foam::mapDistribute::transform::operator()
79 void Foam::mapDistribute::transform::operator()
86 void Foam::mapDistribute::transform::operator()
93 void Foam::mapDistribute::transform::operator()
102 void Foam::mapDistribute::transform::operator()
110 void Foam::mapDistribute::transform::operator()
117 void Foam::mapDistribute::transform::operator()
124 void Foam::mapDistribute::transform::operator()
136 forAll(transformElements_, trafoI)
138 if (transformElements_[trafoI].size() > 0)
140 os <<
"transform " << trafoI <<
':' <<
endl 141 <<
" start : " << transformStart_[trafoI] <<
endl 142 <<
" size : " << transformElements_[trafoI].size() <<
endl;
178 const label constructSize,
183 const bool subHasFlip,
184 const bool constructHasFlip
195 transformElements_(transformElements),
196 transformStart_(transformStart)
270 forAll(transformedElements, i)
277 label nCompact = compactMap[proci].size();
278 compactMap[proci].insert(index, nCompact);
301 forAll(transformedElements, i)
305 nPerTransform[trafoI]++;
308 transformStart_.
setSize(nTrafo);
309 transformElements_.
setSize(nTrafo);
310 forAll(transformStart_, trafoI)
314 transformElements_[trafoI].
setSize(nPerTransform[trafoI]);
320 transformedIndices.
setSize(transformedElements.
size());
321 forAll(transformedElements, i)
333 : compactMap[proci][index]
336 label&
n = nPerTransform[trafoI];
338 transformElements_[trafoI][
n] = rawElemI;
340 transformedIndices[i] = transformStart_[trafoI]+
n;
375 forAll(transformedElements, celli)
385 label nCompact = compactMap[proci].size();
386 compactMap[proci].insert(index, nCompact);
410 forAll(transformedElements, celli)
417 nPerTransform[trafoI]++;
421 transformStart_.
setSize(nTrafo);
422 transformElements_.
setSize(nTrafo);
423 forAll(transformStart_, trafoI)
427 transformElements_[trafoI].
setSize(nPerTransform[trafoI]);
433 transformedIndices.
setSize(transformedElements.
size());
434 forAll(transformedElements, celli)
450 : compactMap[proci][index]
453 label&
n = nPerTransform[trafoI];
455 transformElements_[trafoI][
n] = rawElemI;
457 transformedIndices[celli][i] = transformStart_[trafoI]+
n;
472 transformElements_(map.transformElements_),
473 transformStart_(map.transformStart_)
485 map().constructHasFlip()
487 transformElements_(map().transformElements_.
xfer()),
488 transformStart_(map().transformStart_.
xfer())
509 return findLower(transformStart_, index+1);
516 transformElements_.
transfer(rhs.transformElements_);
517 transformStart_.
transfer(rhs.transformStart_);
535 <<
"Attempted assignment to self" 539 transformElements_ = rhs.transformElements_;
540 transformStart_ = rhs.transformStart_;
548 is.
fatalCheck(
"operator>>(Istream&, mapDistribute&)");
551 >> map.transformElements_ >> map.transformStart_;
561 os << static_cast<const mapDistributeBase&>(map) <<
token::NL 563 << map.transformStart_;
A simple container for copying or transferring objects of type <T>.
autoPtr< mapDistribute > clone() const
Clone.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
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.
const labelList & transformStart() const
Destination in constructMap for transformed elements.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
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)...
void size(const label)
Override size to be inconsistent with allocated storage.
labelListList subMap_
Maps from subsetted data back to original data.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool constructHasFlip() const
Does constructMap include a sign.
bool subHasFlip() const
Does subMap include a sign.
The coupledPolyPatch is an abstract base class for patches that couple regions of the computational d...
void transfer(mapDistribute &)
Transfer the contents of the argument and annul the argument.
mapDistributeBase()
Construct null.
label constructSize_
Size of reconstructed data.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
An ordered pair of two objects of type <T> with first() and second() elements.
void printLayout(Ostream &os) const
Debug: print layout. Can only be used on maps with sorted.
Xfer< T > xferMove(T &)
Construct by transferring the contents of the arg.
void operator=(const mapDistribute &)
Istream & operator>>(Istream &, directionInfo &)
errorManip< error > abort(error &err)
labelListList constructMap_
Maps from subsetted data to new reconstructed data.
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 &)
mapDistribute()
Construct null.
Class containing processor-to-processor mapping information.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
prefixOSstream Pout(cout,"Pout")
defineTypeNameAndDebug(combustionModel, 0)
void calcCompactAddressing(const globalIndex &globalNumbering, const labelList &elements, List< Map< label >> &compactMap) const
Construct per processor compact addressing of the global elements.
void setSize(const label)
Reset size of List.
Class containing processor-to-processor mapping information.
void exchangeAddressing(const int tag, const globalIndex &globalNumbering, labelList &elements, List< Map< label >> &compactMap, labelList &compactStart)
label whichTransform(const label index) const
Find transform from transformElements.
Ostream & operator<<(Ostream &, const ensightPart &)
const labelListList & transformElements() const
For every globalIndexAndTransform::transformPermutations.
label findLower(const ListType &, typename ListType::const_reference, const label stary, const BinaryOp &bop)
Find last element < given value in sorted list and return index,.
Xfer< mapDistribute > xfer()
Transfer contents to the Xfer container.
void transfer(mapDistributeBase &)
Transfer the contents of the argument and annul the argument.
label constructSize() const
Constructed data size.
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
void fatalCheck(const char *operation) const
Check IOstream status for given operation.