44 void Foam::mapDistribute::transform::operator()
52 void Foam::mapDistribute::transform::operator()
59 void Foam::mapDistribute::transform::operator()
66 void Foam::mapDistribute::transform::operator()
74 void Foam::mapDistribute::transform::operator()
82 void Foam::mapDistribute::transform::operator()
89 void Foam::mapDistribute::transform::operator()
96 void Foam::mapDistribute::transform::operator()
104 void Foam::mapDistribute::transform::operator()
112 void Foam::mapDistribute::transform::operator()
119 void Foam::mapDistribute::transform::operator()
126 void Foam::mapDistribute::transform::operator()
137 forAll(transformElements_, i)
139 if (!transformElements_[i].empty())
141 os <<
"transform " << i <<
':' <<
nl 142 <<
" start : " << transformStart_[i] <<
nl 143 <<
" size : " << transformElements_[i].
size() <<
endl;
151 const UPtrList<const mapDistribute>& maps
154 UPtrList<const mapDistributeBase> baseMaps(maps.size());
158 baseMaps.set(i, maps.get(i));
187 transformElements_(map.transformElements_),
188 transformStart_(map.transformStart_)
202 const label constructSize,
207 const bool subHasFlip,
208 const bool constructHasFlip,
216 std::move(constructMap),
221 transformElements_(
std::move(transformElements)),
222 transformStart_(
std::move(transformStart))
253 for (
const labelPair& elem : transformedElements)
255 label proci = globalTransforms.
processor(elem);
258 label index = globalTransforms.
index(elem);
259 compactMap[proci].insert(index, compactMap[proci].size());
282 for (
const labelPair& elem : transformedElements)
285 nPerTransform[trafoI]++;
290 forAll(transformStart_, trafoI)
292 const label
count = nPerTransform[trafoI];
302 transformedIndices.
resize_nocopy(transformedElements.size());
303 forAll(transformedElements, i)
305 const labelPair& elem = transformedElements[i];
306 label proci = globalTransforms.
processor(elem);
307 label index = globalTransforms.
index(elem);
315 : compactMap[proci][index]
318 label&
n = nPerTransform[trafoI];
320 transformElements_[trafoI][
n] = rawElemI;
322 transformedIndices[i] = transformStart_[trafoI]+
n;
335 const globalIndex& globalNumbering,
337 const globalIndexAndTransform& globalTransforms,
338 const List<labelPairList>& transformedElements,
340 List<Map<label>>& compactMap,
345 mapDistributeBase(comm)
364 label proci = globalTransforms.processor(elem);
367 label index = globalTransforms.index(elem);
368 compactMap[proci].insert(index, compactMap[proci].size());
390 const label nTrafo = globalTransforms.transformPermutations().size();
396 label trafoI = globalTransforms.transformIndex(elem);
397 nPerTransform[trafoI]++;
403 forAll(transformStart_, trafoI)
405 const label
count = nPerTransform[trafoI];
415 transformedIndices.resize_nocopy(transformedElements.size());
416 forAll(transformedElements, celli)
419 transformedIndices[celli].resize_nocopy(elems.size());
423 label proci = globalTransforms.processor(elems[i]);
424 label index = globalTransforms.index(elems[i]);
425 label trafoI = globalTransforms.transformIndex(elems[i]);
432 : compactMap[proci][index]
435 label&
n = nPerTransform[trafoI];
437 transformElements_[trafoI][
n] = rawElemI;
439 transformedIndices[celli][i] = transformStart_[trafoI]+
n;
453 const UPtrList<const mapDistribute>& maps,
459 List<Map<label>>& compactMaps
487 return findLower(transformStart_, index+1);
494 transformElements_.clear();
495 transformStart_.clear();
507 transformElements_.transfer(rhs.transformElements_);
508 transformStart_.transfer(rhs.transformStart_);
522 transformElements_ = rhs.transformElements_;
523 transformStart_ = rhs.transformStart_;
void calcCompactAddressing(const globalIndex &globalNumbering, const labelUList &elements, List< Map< label >> &compactMap) const
Construct per processor compact addressing of the global elements.
void size(const label n)
Older name for setAddressableSize.
label findLower(const ListType &input, const T &val, const label start, const ComparePredicate &comp)
Binary search to find the index of the last element in a sorted list that is less than value...
void clear()
Reset to zero size, only retaining communicator.
constexpr char nl
The newline '\n' character (0x0a)
label whichTransform(const label index) const
Find transform from transformElements.
Ostream & endl(Ostream &os)
Add newline and flush stream.
label constructSize() const noexcept
Constructed data size.
label comm() const noexcept
The communicator used.
The coupledPolyPatch is an abstract base class for patches that couple regions of the computational d...
void resize_nocopy(const label len)
Adjust allocated size of list without necessarily.
List< labelPair > labelPairList
List of labelPair.
void printLayout(Ostream &os) const
Debug: print layout. Can only be used on maps with sorted.
void operator=(const mapDistribute &rhs)
Copy assignment.
static int myProcNo(const label communicator=worldComm)
Rank of this process in the communicator (starting from masterNo()). Can be negative if the process i...
List< labelList > labelListList
List of labelList.
#define forAll(list, i)
Loop across all elements in list.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
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.
autoPtr< mapDistribute > clone() const
Clone.
void transfer(mapDistributeBase &rhs)
Transfer the contents of the argument and annul the argument.
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
void operator=(const mapDistributeBase &rhs)
Copy assignment.
Class containing processor-to-processor mapping information.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
int debug
Static debugging option.
Pair< label > labelPair
A pair of labels.
OBJstream os(runTime.globalPath()/outputName)
defineTypeNameAndDebug(combustionModel, 0)
Class containing processor-to-processor mapping information.
void exchangeAddressing(const int tag, const globalIndex &globalNumbering, labelList &elements, List< Map< label >> &compactMap, labelList &compactStart)
void transfer(mapDistribute &map)
Transfer the contents of the argument and annul the argument.
void clear()
Reset to zero size, only retaining communicator.
List< label > labelList
A List of labels.
static autoPtr< T > New(Args &&... args)
Construct autoPtr with forwarding arguments.
mapDistribute() noexcept
Default construct - uses worldComm.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
Inter-processor communications stream.
static constexpr const zero Zero
Global zero (0)