mapDistribute.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 OpenFOAM Foundation
9  Copyright (C) 2015-2023 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::mapDistribute
29 
30 Description
31  Class containing processor-to-processor mapping information.
32 
33  We store mapping from the bits-to-send to the complete starting list
34  (subXXXMap) and from the received bits to their location in the new
35  list (constructXXXMap).
36 
37 Note:
38  Schedule is a list of processor pairs (one send, one receive. One of
39  them will be myself) which forms a scheduled (i.e. non-buffered) exchange.
40  See distribute on how to use it.
41  Note2: number of items sent on one processor have to equal the number
42  of items received on the other processor.
43 
44  To aid constructing these maps there are the constructors from global
45  numbering, either with or without transforms.
46 
47  - without transforms:
48  Constructors using compact numbering: layout is
49  - all my own elements first (whether used or not)
50  - followed by used-only remote elements sorted by remote processor.
51  So e.g 4 procs and on proc 1 the compact
52  table will first have all globalIndex.localSize() elements from proc1
53  followed by used-only elements of proc0, proc2, proc3.
54  The constructed mapDistribute sends the local elements from and
55  receives the remote elements into their compact position.
56  compactMap[proci] is the position of elements from proci in the compact
57  map. compactMap[myProcNo()] is empty since trivial addressing.
58 
59  It rewrites the input global indices into indices into the constructed
60  data.
61 
62 
63  - with transforms:
64  This requires the precalculated set of possible transforms
65  (globalIndexAndTransform). These are given as permutations (+, -, or none)
66  of up to 3 independent transforms.
67  The layout of the data is
68  - all my own elements first (whether used or not)
69  - followed by used-only remote elements sorted by remote processor.
70  - followed by - for each transformation index - the set of local or
71  remote elements with that transformation.
72  The inputs for the constructor are
73  - the set of untransformed local or remote indices in globalIndex
74  numbering. These get rewritten to be indices into the layout of the data.
75  - the set of transformed local or remote indices in globalIndexAndTransform
76  encoding. These are labelPairs.
77 
78  Any distribute with transforms is now done as:
79  1. exchange data with other processors and receive these into the
80  slots for that processor
81  2. for all transformations transform a subset of the data according
82  to transformElements_[transformI] and store this starting from
83  transformStart_[transformI]
84 
85  In the same way a reverse distribute will
86  1. apply the inverse transform to the data starting at
87  transformStart_[transformI] and copy the result back into the
88  transformElements_[transformI]. These might be local or remote slots.
89  2. the data in the remote slots will now be sent back to the correct
90  location in the originating processor.
91 
92  E.g. a map to handle
93  - mesh points on a mesh with
94  - 1 cyclic so 3 permutations (+,-,none) will have layout
95  - on e.g. processor 1 out of 2:
96 
97  +------+ <- transformStart[2]
98  | |
99  | | <- transform2 applied to data in local or remote slots
100  | |
101  +------+ <- transformStart[1]
102  | |
103  | | <- transform1 applied to data in local or remote slots
104  | |
105  +------+ <- transformStart[1]
106  | |
107  | | <- transform0 applied to data in local or remote slots
108  | |
109  +------+ <- transformStart[0]
110  | |
111  | | <- data from proc2
112  | |
113  +------+
114  | |
115  | | <- data from proc0
116  | |
117  +------+ <- mesh.nPoints()
118  | |
119  | |
120  | |
121  +------+ 0
122 
123 
124  When constructing from components optionally a 'flip' on
125  the maps can be specified. This will interpret the map
126  values as index+flip, similar to e.g. faceProcAddressing. The flip
127  will only be applied to fieldTypes (scalar, vector, .. triad)
128 
129 SourceFiles
130  mapDistribute.C
131  mapDistributeIO.C
132  mapDistributeTemplates.C
133 
134 \*---------------------------------------------------------------------------*/
135 
136 #ifndef Foam_mapDistribute_H
137 #define Foam_mapDistribute_H
138 
139 #include "mapDistributeBase.H"
140 #include "transformList.H"
141 #include "vectorTensorTransform.H"
142 #include "coupledPolyPatch.H"
143 
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 
146 namespace Foam
147 {
148 
149 // Forward Declarations
150 class globalIndexAndTransform;
151 class mapDistribute;
152 
153 Istream& operator>>(Istream&, mapDistribute&);
154 Ostream& operator<<(Ostream&, const mapDistribute&);
155 
157 /*---------------------------------------------------------------------------*\
158  Class mapDistribute Declaration
159 \*---------------------------------------------------------------------------*/
160 
161 class mapDistribute
162 :
163  public mapDistributeBase
164 {
165  // Private Data
166 
167  //- For every globalIndexAndTransform::transformPermutations
168  //- gives the elements that need to be transformed
169  labelListList transformElements_;
170 
171  //- Destination in constructMap for transformed elements
172  labelList transformStart_;
173 
174 
175  // Private Member Functions
176 
177  //- Helper function: copy transformElements without transformation
178  template<class T>
179  void applyDummyTransforms(List<T>& field) const;
180 
181  template<class T, class TransformOp>
182  void applyTransforms
183  (
184  const globalIndexAndTransform& globalTransforms,
185  List<T>& field,
186  const TransformOp& top
187  ) const;
188 
189  //- Helper function: copy transformElements without transformation
190  template<class T>
191  void applyDummyInverseTransforms(List<T>& field) const;
192 
193  template<class T, class TransformOp>
194  void applyInverseTransforms
195  (
196  const globalIndexAndTransform& globalTransforms,
197  List<T>& field,
198  const TransformOp& top
199  ) const;
200 
201  //- Helper: convert mapDistribute to mapDistributeBase
202  static UPtrList<const mapDistributeBase> extractBase
203  (
205  );
206 
207 
208 public:
209 
210  // Public classes
211 
212  //- Default transformation behaviour
213  class transform
214  {
215  public:
216 
217  template<class Type>
218  void operator()
219  (
221  const bool forward,
222  List<Type>& fld
223  ) const
224  {
225  const tensor T(forward ? vt.R() : vt.R().T());
227  }
228 
229  template<class Type>
230  void operator()
231  (
232  const vectorTensorTransform& vt,
233  const bool forward,
234  List<List<Type>>& flds
235  ) const
236  {
237  for (List<Type>& fld : flds)
238  {
239  operator()(vt, forward, fld);
240  }
241  }
242 
243  //- Transform patch-based field
244  template<class Type>
245  void operator()(const coupledPolyPatch& cpp, UList<Type>& fld) const
246  {
247  if (!cpp.parallel())
248  {
249  transformList(cpp.forwardT(), fld);
250  }
251  }
252 
253  //- Transform sparse field
254  template<class Type, template<class> class Container>
255  void operator()(const coupledPolyPatch& cpp, Container<Type>& map)
256  const
257  {
258  if (!cpp.parallel())
259  {
260  transformList(cpp.forwardT(), map);
261  }
262  }
263  };
264 
265  //- Default transformation behaviour for position
267  {
268  public:
269 
270  void operator()
271  (
272  const vectorTensorTransform& vt,
273  const bool forward,
275  ) const
276  {
277  pointField pfld(std::move(fld));
278  if (forward)
279  {
280  fld = vt.transformPosition(pfld);
281  }
282  else
283  {
284  fld = vt.invTransformPosition(pfld);
285  }
286  }
287 
288  void operator()
289  (
290  const vectorTensorTransform& vt,
291  const bool forward,
292  List<List<point>>& flds
293  ) const
294  {
295  for (List<point>& fld : flds)
296  {
297  operator()(vt, forward, fld);
298  }
299  }
300 
301  //- Transform patch-based field
302  void operator()(const coupledPolyPatch& cpp, pointField& fld) const
303  {
304  cpp.transformPosition(fld);
305  }
306 
307  template<template<class> class Container>
308  void operator()(const coupledPolyPatch& cpp, Container<point>& map)
309  const
310  {
311  Field<point> fld(map.size());
312  label i = 0;
313  forAllConstIters(map, iter)
314  {
315  fld[i++] = *iter;
316  }
318  i = 0;
319  forAllIters(map, iter)
320  {
321  *iter = fld[i++];
322  }
323  }
324  };
325 
326 
327  // Declare name of the class and its debug switch
328  ClassName("mapDistribute");
329 
330 
331  // Constructors
332 
333  //- Inherit constructors
335 
336  //- Default construct - uses worldComm
338 
339  //- Default construct with specified communicator
340  explicit mapDistribute(const label comm) noexcept;
341 
342  //- Move construct from base, no transforms
343  explicit mapDistribute(mapDistributeBase&& map);
344 
345  //- Copy construct
346  explicit mapDistribute(const mapDistribute& map);
347 
348  //- Move construct
349  explicit mapDistribute(mapDistribute&& map);
350 
351  //- Read construct from dictionary
352  explicit mapDistribute
353  (
354  const dictionary& dict,
355  const label comm = UPstream::worldComm
356  );
357 
358  //- Move construct from components
360  (
361  const label constructSize,
366  const bool subHasFlip = false,
367  const bool constructHasFlip = false,
368  const label comm = UPstream::worldComm
369  );
370 
371  //- Construct from list of (possibly remote) untransformed elements
372  //- in globalIndex numbering (or -1) and (possibly remote)
373  //- transformed elements in globalIndexAndTransform numbering.
374  // Determines compact numbering (see above) and
375  // distribute map to get data into this ordering and renumbers the
376  // elements to be in compact numbering.
378  (
379  const globalIndex&,
380  labelList& untransformedElements,
382  const labelPairList& transformedElements,
383  labelList& transformedIndices,
384  List<Map<label>>& compactMap,
385  const int tag = UPstream::msgType(),
386  const label comm = UPstream::worldComm
387  );
388 
389  //- As above but with ListLists.
391  (
392  const globalIndex&,
393  labelListList& cellCells,
395  const List<labelPairList>& transformedElements,
396  labelListList& transformedIndices,
397  List<Map<label>>& compactMap,
398  const int tag = UPstream::msgType(),
399  const label comm = UPstream::worldComm
400  );
401 
402  //- Construct from multiple maps and processor collation
403  // Assumes all local data first. Sorts contributions of maps
404  // in processor order i.e. constructed map has all local data first.
405  // Returns
406  // - startOfLocal : per input map the start of the local data. Extends
407  // one beyond number of maps so overall local size
408  // is startOfLocal.last()
409  // - compactMaps : per input map from slot position in the input map
410  // to new slot position. (note there is no information
411  // returned about which processor it is from)
413  (
414  const UPtrList<const mapDistribute>& maps,
415  const labelList& localRanks,
416  const label newComm,
417  const labelListList& newToOldRanks, // from rank in newComm to
418  // ranks in (old)comm
419  labelList& startOfLocal, // per map start of local data
420  List<Map<label>>& compactMaps // per map old slot to new slot
421  );
422 
423  //- Construct from Istream
424  explicit mapDistribute(Istream& is);
425 
426  //- Clone
427  autoPtr<mapDistribute> clone() const;
428 
429 
430  //- Destructor
431  virtual ~mapDistribute() = default;
432 
433 
434  // Member Functions
435 
436  // Access
437 
438  //- For every globalIndexAndTransform::transformPermutations
439  //- gives the elements that need to be transformed
441  {
442  return transformElements_;
443  }
444 
445  //- Destination in constructMap for transformed elements
446  const labelList& transformStart() const noexcept
447  {
448  return transformStart_;
449  }
450 
451  //- Find transform from transformElements
452  label whichTransform(const label index) const;
453 
454 
455  // Other
456 
457  //- Reset to zero size, only retaining communicator
458  void clear();
459 
460  //- Transfer the contents of the argument and annul the argument.
461  void transfer(mapDistribute& map);
462 
463  //- Distribute List data using default commsType,
464  //- default flip/negate operator
465  template<class T>
466  void distribute
467  (
468  List<T>& fld,
469  const bool dummyTransform = true,
470  const int tag = UPstream::msgType()
471  ) const;
472 
473  //- Distribute DynamicList data using default commsType,
474  //- default flip/negate operator
475  template<class T>
476  void distribute
477  (
478  DynamicList<T>& fld,
479  const bool dummyTransform = true,
480  const int tag = UPstream::msgType()
481  ) const;
482 
483  //- Distribute List data using specified commsType,
484  //- default flip/negate operator
485  template<class T>
486  void distribute
487  (
488  const UPstream::commsTypes commsType,
489  List<T>& fld,
490  const bool dummyTransform = true,
491  const int tag = UPstream::msgType()
492  ) const;
493 
494  //- Distribute DynamicList data using specified commsType,
495  //- default flip/negate operator
496  template<class T>
497  void distribute
498  (
499  const UPstream::commsTypes commsType,
501  const bool dummyTransform = true,
502  const int tag = UPstream::msgType()
503  ) const;
504 
505  //- Distribute List data using default commsType
506  //- and the specified negate operator (for flips).
507  template<class T, class NegateOp>
508  void distribute
509  (
510  List<T>& fld,
511  const NegateOp& negOp,
512  const bool dummyTransform = true,
513  const int tag = UPstream::msgType()
514  ) const;
515 
516  //- Distribute List data using specified commsType
517  //- and the specified negate operator (for flips).
518  template<class T, class NegateOp>
519  void distribute
520  (
521  const UPstream::commsTypes commsType,
522  List<T>& fld,
523  const NegateOp& negOp,
524  const bool dummyTransform = true,
525  const int tag = UPstream::msgType()
526  ) const;
527 
528  //- Reverse distribute data using default commsType.
529  template<class T>
530  void reverseDistribute
531  (
532  const label constructSize,
533  List<T>& fld,
534  const bool dummyTransform = true,
535  const int tag = UPstream::msgType()
536  ) const;
537 
538  //- Reverse distribute data using specified commsType.
539  template<class T>
540  void reverseDistribute
541  (
542  const UPstream::commsTypes commsType,
543  const label constructSize,
544  List<T>& fld,
545  const bool dummyTransform = true,
546  const int tag = UPstream::msgType()
547  ) const;
548 
549  //- Reverse distribute data using default commsType.
550  // Since constructSize might be larger than supplied size supply
551  // a nullValue
552  template<class T>
553  void reverseDistribute
554  (
555  const label constructSize,
556  const T& nullValue,
557  List<T>& fld,
558  const bool dummyTransform = true,
559  const int tag = UPstream::msgType()
560  ) const;
561 
562  //- Reverse distribute data using specified commsType.
563  // Since constructSize might be larger than supplied size supply
564  // a nullValue
565  template<class T>
566  void reverseDistribute
567  (
568  const UPstream::commsTypes commsType,
569  const label constructSize,
570  const T& nullValue,
571  List<T>& fld,
572  const bool dummyTransform = true,
573  const int tag = UPstream::msgType()
574  ) const;
575 
576  //- Distribute with transforms
577  template<class T, class TransformOp>
578  void distribute
579  (
581  List<T>& fld,
582  const TransformOp& top,
583  const int tag = UPstream::msgType()
584  ) const;
585 
586 
587  //- Distribute with transforms
588  template<class T, class TransformOp>
589  void distribute
590  (
591  const UPstream::commsTypes commsType,
593  List<T>& fld,
594  const TransformOp& top,
595  const int tag = UPstream::msgType()
596  ) const;
597 
598  //- Reverse distribute with transforms
599  template<class T, class TransformOp>
600  void reverseDistribute
601  (
603  const label constructSize,
604  List<T>& fld,
605  const TransformOp& top,
606  const int tag = UPstream::msgType()
607  ) const;
608 
609  //- Reverse distribute with transforms
610  template<class T, class TransformOp>
611  void reverseDistribute
612  (
613  const UPstream::commsTypes commsType,
615  const label constructSize,
616  List<T>& fld,
617  const TransformOp& top,
618  const int tag = UPstream::msgType()
619  ) const;
620 
621  //- Reverse distribute with transforms
622  template<class T, class TransformOp>
623  void reverseDistribute
624  (
626  const label constructSize,
627  const T& nullValue,
628  List<T>& fld,
629  const TransformOp& top,
630  const int tag = UPstream::msgType()
631  ) const;
632 
633  //- Reverse distribute with transforms
634  template<class T, class TransformOp>
635  void reverseDistribute
636  (
637  const UPstream::commsTypes commsType,
639  const label constructSize,
640  const T& nullValue,
641  List<T>& fld,
642  const TransformOp& top,
643  const int tag = UPstream::msgType()
644  ) const;
645 
646  //- Debug: print layout. Can only be used on maps with sorted
647  // storage (local data first, then non-local data)
648  void printLayout(Ostream& os) const;
649 
650 
651  // Member Operators
652 
653  //- Copy assignment
654  void operator=(const mapDistribute& rhs);
655 
656  //- Move assignment
657  void operator=(mapDistribute&& rhs);
658 
659 
660  // IOstream Operators
661 
662  //- Read entries from dictionary format
663  void readDict(const dictionary& dict);
664 
665  //- Write entries in dictionary format
666  void writeEntries(Ostream& os) const;
667 
668  //- Read plain content (not dictionary) from Istream
670 
671  //- Write plain content (not dictionary) to Ostream
672  friend Ostream& operator<<(Ostream&, const mapDistribute&);
673 
674 
675  // Housekeeping
676 
677  //- No correction for topo change
678  void updateMesh(const mapPolyMesh&)
679  {
681  }
682 };
683 
684 
685 // Template specialisation for primitives that do not need transform
686 template<>
687 void mapDistribute::transform::operator()
688 (
689  const vectorTensorTransform&,
690  const bool,
691  List<label>&
692 ) const;
693 template<>
694 void mapDistribute::transform::operator()
695 (
696  const coupledPolyPatch&,
697  UList<label>&
698 ) const;
699 template<>
700 void mapDistribute::transform::operator()
701 (
702  const coupledPolyPatch&,
703  Map<label>&
704 ) const;
705 template<>
706 void mapDistribute::transform::operator()
707 (
708  const coupledPolyPatch&,
709  EdgeMap<label>&
710 ) const;
711 
712 template<>
713 void mapDistribute::transform::operator()
714 (
715  const coupledPolyPatch&,
716  UList<scalar>&
717 ) const;
718 template<>
719 void mapDistribute::transform::operator()
720 (
721  const vectorTensorTransform&,
722  const bool,
723  List<scalar>&
724 ) const;
725 template<>
726 void mapDistribute::transform::operator()
727 (
728  const coupledPolyPatch&,
729  Map<scalar>&
730 ) const;
731 template<>
732 void mapDistribute::transform::operator()
733 (
734  const coupledPolyPatch&,
735  EdgeMap<scalar>&
736 ) const;
737 
738 template<>
739 void mapDistribute::transform::operator()
740 (
741  const coupledPolyPatch& cpp,
742  UList<bool>& fld
743 ) const;
744 template<>
745 void mapDistribute::transform::operator()
746 (
747  const vectorTensorTransform&,
748  const bool,
749  List<bool>&
750 ) const;
751 template<>
752 void mapDistribute::transform::operator()
753 (
754  const coupledPolyPatch&,
755  Map<bool>&
756 ) const;
757 template<>
758 void mapDistribute::transform::operator()
759 (
760  const coupledPolyPatch&,
761  EdgeMap<bool>&
762 ) const;
763 
764 
765 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
766 
767 } // End namespace Foam
768 
769 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
770 
771 #ifdef NoRepository
772  #include "mapDistributeTemplates.C"
773 #endif
774 
775 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
776 
777 #endif
778 
779 // ************************************************************************* //
dictionary dict
rDeltaTY field()
void clear()
Reset to zero size, only retaining communicator.
void operator()(const vectorTensorTransform &vt, const bool forward, List< Type > &fld) const
commsTypes
Communications types.
Definition: UPstream.H:72
void writeEntries(Ostream &os) const
Write entries in dictionary format.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
friend Istream & operator>>(Istream &, mapDistribute &)
Read plain content (not dictionary) from Istream.
void distribute(List< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
Distribute List data using default commsType, default flip/negate operator.
Vector-tensor class used to perform translations and rotations in 3D space.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
label whichTransform(const label index) const
Find transform from transformElements.
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...
static int & msgType() noexcept
Message tag of standard messages.
Definition: UPstream.H:1229
void printLayout(Ostream &os) const
Debug: print layout. Can only be used on maps with sorted.
void operator=(const mapDistribute &rhs)
Copy assignment.
friend Ostream & operator<<(Ostream &, const mapDistribute &)
Write plain content (not dictionary) to Ostream.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:157
virtual const tensorField & forwardT() const
Return face transformation tensor.
void updateMesh(const mapPolyMesh &)
No correction for topo change.
bool subHasFlip() const noexcept
Does subMap include a sign.
virtual bool parallel() const
Are the cyclic planes parallel.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
Definition: globalIndex.H:61
Default transformation behaviour.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
Definition: DynamicList.H:51
Istream & operator>>(Istream &, directionInfo &)
const labelListList & transformElements() const noexcept
For every globalIndexAndTransform::transformPermutations gives the elements that need to be transform...
#define forAllIters(container, iter)
Iterate across all elements in the container object.
Definition: stdFoam.H:336
autoPtr< mapDistribute > clone() const
Clone.
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
Definition: HashTable.H:106
Default transformation behaviour for position.
void reverseDistribute(const label constructSize, List< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
Reverse distribute data using default commsType.
Class containing processor-to-processor mapping information.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
const direction noexcept
Definition: Scalar.H:258
bool constructHasFlip() const noexcept
Does constructMap include a sign.
OBJstream os(runTime.globalPath()/outputName)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Spatial transformation functions for list of values and primitive fields.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
const labelListList & constructMap() const noexcept
From subsetted data to new reconstructed data.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Definition: boundaryPatch.C:77
void readDict(const dictionary &dict)
Read entries from dictionary format.
void transformList(const tensor &rotTensor, UList< T > &field)
Inplace transform a list of elements.
Definition: transformList.C:48
Class containing processor-to-processor mapping information.
void transfer(mapDistribute &map)
Transfer the contents of the argument and annul the argument.
virtual void transformPosition(pointField &) const =0
Transform a patch-based position from other side to this side.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
ClassName("mapDistribute")
void operator()(const vectorTensorTransform &vt, const bool forward, List< point > &fld) const
List< label > labelList
A List of labels.
Definition: List.H:62
const labelList & transformStart() const noexcept
Destination in constructMap for transformed elements.
mapDistributeBase() noexcept
Default construct (uses worldComm)
const labelListList & subMap() const noexcept
From subsetted data back to original data.
Tensor of scalars, i.e. Tensor<scalar>.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:686
mapDistribute() noexcept
Default construct - uses worldComm.
Inter-processor communications stream.
Definition: UPstream.H:60
Namespace for OpenFOAM.
forAllConstIters(mixture.phases(), phase)
Definition: pEqn.H:28
Determination and storage of the possible independent transforms introduced by coupledPolyPatches, as well as all of the possible permutations of these transforms generated by the presence of multiple coupledPolyPatches, i.e. more than one cyclic boundary. Note that any given point can be on maximum 3 transforms only (and these transforms have to be perpendicular)
A HashTable to objects of type <T> with a label key.