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-2019 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 
130 SourceFiles
131  mapDistribute.C
132  mapDistributeTemplates.C
133 
134 \*---------------------------------------------------------------------------*/
135 
136 #ifndef mapDistribute_H
137 #define 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 class globalIndexAndTransform;
150 
151 
152 // Forward declaration of friend functions and operators
153 
154 class mapDistribute;
155 
156 Istream& operator>>(Istream&, mapDistribute&);
157 Ostream& operator<<(Ostream&, const mapDistribute&);
158 
159 
160 /*---------------------------------------------------------------------------*\
161  Class mapDistribute Declaration
162 \*---------------------------------------------------------------------------*/
163 
164 class mapDistribute
165 :
166  public mapDistributeBase
167 {
168  // Private data
169 
170  //- For every globalIndexAndTransform::transformPermutations
171  // gives the elements that need to be transformed
172  labelListList transformElements_;
173 
174  //- Destination in constructMap for transformed elements
175  labelList transformStart_;
176 
177 
178  // Private Member Functions
179 
180  //- Helper function: copy transformElements without transformation
181  template<class T>
182  void applyDummyTransforms(List<T>& field) const;
183 
184  template<class T, class TransformOp>
185  void applyTransforms
186  (
187  const globalIndexAndTransform& globalTransforms,
188  List<T>& field,
189  const TransformOp& top
190  ) const;
191 
192  //- Helper function: copy transformElements without transformation
193  template<class T>
194  void applyDummyInverseTransforms(List<T>& field) const;
195 
196  template<class T, class TransformOp>
197  void applyInverseTransforms
198  (
199  const globalIndexAndTransform& globalTransforms,
200  List<T>& field,
201  const TransformOp& top
202  ) const;
203 
204 
205 public:
206 
207  // Public classes
208 
209  //- Default transformation behaviour
210  class transform
211  {
212  public:
213 
214  template<class Type>
215  void operator()
216  (
217  const vectorTensorTransform& vt,
218  const bool forward,
219  List<Type>& fld
220  ) const
221  {
222  const tensor T(forward ? vt.R() : vt.R().T());
223  transformList(T, fld);
224  }
225 
226  template<class Type>
227  void operator()
228  (
229  const vectorTensorTransform& vt,
230  const bool forward,
231  List<List<Type>>& flds
232  ) const
233  {
234  for (List<Type>& fld : flds)
235  {
236  operator()(vt, forward, fld);
237  }
238  }
239 
240  //- Transform patch-based field
241  template<class Type>
242  void operator()(const coupledPolyPatch& cpp, UList<Type>& fld) const
243  {
244  if (!cpp.parallel())
245  {
246  transformList(cpp.forwardT(), fld);
247  }
248  }
249 
250  //- Transform sparse field
251  template<class Type, template<class> class Container>
252  void operator()(const coupledPolyPatch& cpp, Container<Type>& map)
253  const
254  {
255  if (!cpp.parallel())
256  {
257  transformList(cpp.forwardT(), map);
258  }
259  }
260  };
261 
262  //- Default transformation behaviour for position
263  class transformPosition
264  {
265  public:
266 
267  void operator()
268  (
269  const vectorTensorTransform& vt,
270  const bool forward,
272  ) const
273  {
274  pointField pfld(std::move(fld));
275  if (forward)
276  {
277  fld = vt.transformPosition(pfld);
278  }
279  else
280  {
281  fld = vt.invTransformPosition(pfld);
282  }
283  }
284 
285  void operator()
286  (
287  const vectorTensorTransform& vt,
288  const bool forward,
289  List<List<point>>& flds
290  ) const
291  {
292  for (List<point>& fld : flds)
293  {
294  operator()(vt, forward, fld);
295  }
296  }
297 
298  //- Transform patch-based field
299  void operator()(const coupledPolyPatch& cpp, pointField& fld) const
300  {
301  cpp.transformPosition(fld);
302  }
303 
304  template<template<class> class Container>
305  void operator()(const coupledPolyPatch& cpp, Container<point>& map)
306  const
307  {
308  Field<point> fld(map.size());
309  label i = 0;
310  forAllConstIters(map, iter)
311  {
312  fld[i++] = *iter;
313  }
314  cpp.transformPosition(fld);
315  i = 0;
316  forAllIters(map, iter)
317  {
318  *iter = fld[i++];
319  }
320  }
321  };
322 
323 
324  // Declare name of the class and its debug switch
325  ClassName("mapDistribute");
326 
327 
328  // Constructors
329 
330  //- Construct null
331  mapDistribute(const label comm = UPstream::worldComm);
332 
333  //- Copy construct
334  explicit mapDistribute(const mapDistribute& map);
335 
336  //- Move construct
337  explicit mapDistribute(mapDistribute&& map);
338 
339  //- Move construct from components
341  (
342  const label constructSize,
345  const bool subHasFlip = false,
346  const bool constructHasFlip = false,
347  const label comm = UPstream::worldComm
348  );
349 
350  //- Move construct from components
352  (
353  const label constructSize,
358  const bool subHasFlip = false,
359  const bool constructHasFlip = false,
360  const label comm = UPstream::worldComm
361  );
362 
363  //- Construct from reverse addressing: per data item the send
364  //- processor and the receive processor.
365  //
366  // \note data are not stored per processor so cannot use printLayout.
368  (
369  const labelUList& sendProcs,
370  const labelUList& recvProcs,
371  const label comm = UPstream::worldComm
372  );
373 
374  //- Construct from list of (possibly) remote elements in globalIndex
375  //- numbering (or -1).
376  // Determines compact numbering (see above) and distribute map to
377  // get data into this ordering and renumbers the elements to be in
378  // compact numbering.
380  (
381  const globalIndex&,
382  labelList& elements,
383  List<Map<label>>& compactMap,
384  const int tag = Pstream::msgType(),
385  const label comm = UPstream::worldComm
386  );
387 
388  //- Special variant that works with the info sorted into bins
389  //- according to local indices.
390  // For example, cellCells where cellCells[localCelli] is a list of
391  // global cells.
393  (
394  const globalIndex&,
395  labelListList& cellCells,
396  List<Map<label>>& compactMap,
397  const int tag = Pstream::msgType(),
398  const label comm = UPstream::worldComm
399  );
400 
401  //- Construct from list of (possibly remote) untransformed elements
402  //- in globalIndex numbering (or -1) and (possibly remote)
403  //- transformed elements in globalIndexAndTransform numbering.
404  // Determines compact numbering (see above) and
405  // distribute map to get data into this ordering and renumbers the
406  // elements to be in compact numbering.
408  (
409  const globalIndex&,
410  labelList& untransformedElements,
412  const labelPairList& transformedElements,
413  labelList& transformedIndices,
414  List<Map<label>>& compactMap,
415  const int tag = Pstream::msgType(),
416  const label comm = UPstream::worldComm
417  );
418 
419  //- As above but with ListLists.
421  (
422  const globalIndex&,
423  labelListList& cellCells,
425  const List<labelPairList>& transformedElements,
426  labelListList& transformedIndices,
427  List<Map<label>>& compactMap,
428  const int tag = Pstream::msgType(),
429  const label comm = UPstream::worldComm
430  );
431 
432  //- Construct from my elements to send. Assumes layout is my elements
433  // first followed by elements from all other processors in consecutive
434  // order
435  explicit mapDistribute
436  (
438  const bool subHasFlip = false,
439  const bool constructHasFlip = false,
440  const label comm = UPstream::worldComm
441  );
442 
443  //- Construct from Istream
444  explicit mapDistribute(Istream& is);
445 
446  //- Clone
448 
449 
450  //- Destructor
451  virtual ~mapDistribute() = default;
452 
453 
454  // Member Functions
455 
456  // Access
457 
458  //- For every globalIndexAndTransform::transformPermutations
459  // gives the elements that need to be transformed
460  const labelListList& transformElements() const
461  {
462  return transformElements_;
463  }
464 
465  //- Destination in constructMap for transformed elements
466  const labelList& transformStart() const
467  {
468  return transformStart_;
469  }
470 
471  //- Find transform from transformElements
472  label whichTransform(const label index) const;
473 
474 
475  // Other
476 
477  //- Transfer the contents of the argument and annul the argument.
478  void transfer(mapDistribute& map);
479 
480  //- Distribute data using default commsType.
481  template<class T>
482  void distribute
483  (
484  List<T>& fld,
485  const bool dummyTransform = true,
486  const int tag = UPstream::msgType()
487  ) const;
488 
489  //- Distribute data using default commsType.
490  template<class T, class negateOp>
491  void distribute
492  (
493  List<T>& fld,
494  const negateOp& negOp,
495  const bool dummyTransform = true,
496  const int tag = UPstream::msgType()
497  ) const;
498 
499  //- Distribute data using default commsType.
500  template<class T>
501  void distribute
502  (
504  const bool dummyTransform = true,
505  const int tag = UPstream::msgType()
506  ) const;
507 
508  //- Reverse distribute data using default commsType.
509  template<class T>
510  void reverseDistribute
511  (
512  const label constructSize,
513  List<T>&,
514  const bool dummyTransform = true,
515  const int tag = UPstream::msgType()
516  ) const;
517 
518  //- Reverse distribute data using default commsType.
519  // Since constructSize might be larger than supplied size supply
520  // a nullValue
521  template<class T>
522  void reverseDistribute
523  (
524  const label constructSize,
525  const T& nullValue,
526  List<T>& fld,
527  const bool dummyTransform = true,
528  const int tag = UPstream::msgType()
529  ) const;
530 
531  //- Distribute with transforms
532  template<class T, class TransformOp>
533  void distribute
534  (
536  List<T>& fld,
537  const TransformOp& top,
538  const int tag = UPstream::msgType()
539  ) const;
540 
541  //- Reverse distribute with transforms
542  template<class T, class TransformOp>
543  void reverseDistribute
544  (
546  const label constructSize,
547  List<T>& fld,
548  const TransformOp& top,
549  const int tag = UPstream::msgType()
550  ) const;
551 
552  //- Reverse distribute with transforms
553  template<class T, class TransformOp>
554  void reverseDistribute
555  (
557  const label constructSize,
558  const T& nullValue,
559  List<T>& fld,
560  const TransformOp& top,
561  const int tag = UPstream::msgType()
562  ) const;
563 
564  //- Debug: print layout. Can only be used on maps with sorted
565  // storage (local data first, then non-local data)
566  void printLayout(Ostream& os) const;
567 
568  //- Correct for topo change.
569  void updateMesh(const mapPolyMesh&)
570  {
572  }
573 
574  // Member Operators
575 
576  //- Copy assignment
577  void operator=(const mapDistribute& rhs);
578 
579  //- Move assignment
580  void operator=(mapDistribute&& rhs);
581 
582 
583  // IOstream operators
584 
585  //- Read dictionary from Istream
587 
588  //- Write dictionary to Ostream
589  friend Ostream& operator<<(Ostream&, const mapDistribute&);
590 
591 };
592 
593 
594 // Template specialisation for primitives that do not need transform
595 template<>
596 void mapDistribute::transform::operator()
597 (
598  const vectorTensorTransform&,
599  const bool,
600  List<label>&
601 ) const;
602 template<>
603 void mapDistribute::transform::operator()
604 (
605  const coupledPolyPatch&,
606  UList<label>&
607 ) const;
608 template<>
609 void mapDistribute::transform::operator()
610 (
611  const coupledPolyPatch&,
612  Map<label>&
613 ) const;
614 template<>
615 void mapDistribute::transform::operator()
616 (
617  const coupledPolyPatch&,
618  EdgeMap<label>&
619 ) const;
620 
621 template<>
622 void mapDistribute::transform::operator()
623 (
624  const coupledPolyPatch&,
625  UList<scalar>&
626 ) const;
627 template<>
628 void mapDistribute::transform::operator()
629 (
630  const vectorTensorTransform&,
631  const bool,
632  List<scalar>&
633 ) const;
634 template<>
635 void mapDistribute::transform::operator()
636 (
637  const coupledPolyPatch&,
638  Map<scalar>&
639 ) const;
640 template<>
641 void mapDistribute::transform::operator()
642 (
643  const coupledPolyPatch&,
644  EdgeMap<scalar>&
645 ) const;
646 
647 template<>
648 void mapDistribute::transform::operator()
649 (
650  const coupledPolyPatch& cpp,
651  UList<bool>& fld
652 ) const;
653 template<>
654 void mapDistribute::transform::operator()
655 (
656  const vectorTensorTransform&,
657  const bool,
658  List<bool>&
659 ) const;
660 template<>
661 void mapDistribute::transform::operator()
662 (
663  const coupledPolyPatch&,
664  Map<bool>&
665 ) const;
666 template<>
667 void mapDistribute::transform::operator()
668 (
669  const coupledPolyPatch&,
670  EdgeMap<bool>&
671 ) const;
672 
673 
674 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
675 
676 } // End namespace Foam
677 
678 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
679 
680 #ifdef NoRepository
681  #include "mapDistributeTemplates.C"
682 #endif
683 
684 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
685 
686 #endif
687 
688 // ************************************************************************* //
Foam::mapDistributeBase::subMap
const labelListList & subMap() const
From subsetted data back to original data.
Definition: mapDistributeBase.H:289
Foam::Tensor< scalar >
Foam::mapDistributeBase::constructHasFlip
bool constructHasFlip() const
Does constructMap include a sign.
Definition: mapDistributeBase.H:325
Foam::mapDistribute::whichTransform
label whichTransform(const label index) const
Find transform from transformElements.
Definition: mapDistribute.C:527
Foam::vectorTensorTransform::invTransformPosition
vector invTransformPosition(const vector &v) const
Inverse transform the given position.
Definition: vectorTensorTransformI.H:140
mapDistributeBase.H
Foam::mapDistribute::operator=
void operator=(const mapDistribute &rhs)
Copy assignment.
Definition: mapDistribute.C:548
Foam::mapDistribute::transformPosition::operator()
void operator()(const coupledPolyPatch &cpp, Container< point > &map) const
Definition: mapDistribute.H:304
Foam::DynamicList
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Definition: DynamicList.H:55
Foam::coupledPolyPatch::forwardT
virtual const tensorField & forwardT() const
Return face transformation tensor.
Definition: coupledPolyPatch.H:301
Foam::Map< label >
Foam::operator>>
Istream & operator>>(Istream &, directionInfo &)
Definition: directionInfo.C:230
Foam::coupledPolyPatch
The coupledPolyPatch is an abstract base class for patches that couple regions of the computational d...
Definition: coupledPolyPatch.H:54
Foam::dummyTransform
Definition: dummyTransform.H:47
Foam::mapDistribute::transformPosition
Default transformation behaviour for position.
Definition: mapDistribute.H:262
Foam::mapDistribute::transformPosition::operator()
void operator()(const vectorTensorTransform &vt, const bool forward, List< point > &fld) const
Definition: mapDistribute.H:267
Foam::mapDistribute::transformStart
const labelList & transformStart() const
Destination in constructMap for transformed elements.
Definition: mapDistribute.H:465
Foam::mapDistribute::transformPosition::operator()
void operator()(const coupledPolyPatch &cpp, pointField &fld) const
Transform patch-based field.
Definition: mapDistribute.H:298
Foam::mapDistribute::transfer
void transfer(mapDistribute &map)
Transfer the contents of the argument and annul the argument.
Definition: mapDistribute.C:533
Foam::mapDistribute::transform::operator()
void operator()(const coupledPolyPatch &cpp, UList< Type > &fld) const
Transform patch-based field.
Definition: mapDistribute.H:241
Foam::coupledPolyPatch::parallel
virtual bool parallel() const
Are the cyclic planes parallel.
Definition: coupledPolyPatch.H:295
mapDistributeTemplates.C
Foam::operator<<
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Definition: boundaryPatch.C:83
NotImplemented
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:517
Foam::transformList
void transformList(const tensor &rotTensor, UList< T > &field)
Inplace transform a list of elements.
Definition: transformList.C:52
coupledPolyPatch.H
Foam::Field< vector >
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
Foam::mapDistribute
Class containing processor-to-processor mapping information.
Definition: mapDistribute.H:163
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:58
Foam::mapDistribute::operator>>
friend Istream & operator>>(Istream &, mapDistribute &)
Read dictionary from Istream.
field
rDeltaTY field()
fld
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))
Definition: gmvOutputLagrangian.H:23
Foam::mapDistribute::distribute
void distribute(List< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
Distribute data using default commsType.
Definition: mapDistributeTemplates.C:152
forAllIters
#define forAllIters(container, iter)
Iterate across all elements in the container object.
Definition: stdFoam.H:223
Foam::mapDistributeBase::comm
label comm() const
Definition: mapDistributeBase.H:336
os
OBJstream os(runTime.globalPath()/outputName)
Foam::mapDistributeBase::subHasFlip
bool subHasFlip() const
Does subMap include a sign.
Definition: mapDistributeBase.H:313
Foam::mapDistribute::transformElements
const labelListList & transformElements() const
For every globalIndexAndTransform::transformPermutations.
Definition: mapDistribute.H:459
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::globalIndex
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
Definition: globalIndex.H:68
Foam::mapDistribute::~mapDistribute
virtual ~mapDistribute()=default
Destructor.
Foam::mapDistribute::operator<<
friend Ostream & operator<<(Ostream &, const mapDistribute &)
Write dictionary to Ostream.
Foam::mapDistribute::transform
Default transformation behaviour.
Definition: mapDistribute.H:209
Foam::mapDistributeBase::constructSize
label constructSize() const
Constructed data size.
Definition: mapDistributeBase.H:277
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::mapDistribute::updateMesh
void updateMesh(const mapPolyMesh &)
Correct for topo change.
Definition: mapDistribute.H:568
Foam::mapDistribute::transform::operator()
void operator()(const vectorTensorTransform &vt, const bool forward, List< Type > &fld) const
Definition: mapDistribute.H:215
Foam::UPstream::msgType
static int & msgType() noexcept
Message tag of standard messages.
Definition: UPstream.H:540
forAllConstIters
forAllConstIters(mixture.phases(), phase)
Definition: pEqn.H:28
Foam::coupledPolyPatch::transformPosition
virtual void transformPosition(pointField &) const =0
Transform a patch-based position from other side to this side.
Foam::vectorTensorTransform::transformPosition
vector transformPosition(const vector &v) const
Transform the given position.
Definition: vectorTensorTransformI.H:105
Foam::UPstream::worldComm
static label worldComm
Default communicator (all processors)
Definition: UPstream.H:293
Foam::List< labelList >
Foam::vectorTensorTransform
Vector-tensor class used to perform translations and rotations in 3D space.
Definition: vectorTensorTransform.H:63
Foam::vectorTensorTransform::R
const tensor & R() const
Definition: vectorTensorTransformI.H:75
Foam::mapDistribute::ClassName
ClassName("mapDistribute")
Foam::UList< Type >
Foam::mapDistribute::mapDistribute
mapDistribute(const label comm=UPstream::worldComm)
Construct null.
Definition: mapDistribute.C:151
bool
bool
Definition: EEqn.H:20
Foam::Tensor::T
Tensor< Cmpt > T() const
Return non-Hermitian transpose.
Definition: TensorI.H:504
Foam::mapPolyMesh
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:161
Foam::mapDistributeBase
Class containing processor-to-processor mapping information.
Definition: mapDistributeBase.H:103
Foam::mapDistribute::reverseDistribute
void reverseDistribute(const label constructSize, List< T > &, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
Reverse distribute data using default commsType.
Definition: mapDistributeTemplates.C:182
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::mapDistribute::clone
autoPtr< mapDistribute > clone() const
Clone.
Definition: mapDistribute.C:519
transformList.H
Spatial transformation functions for list of values and primitive fields.
Foam::mapDistribute::printLayout
void printLayout(Ostream &os) const
Debug: print layout. Can only be used on maps with sorted.
Definition: mapDistribute.C:133
vectorTensorTransform.H
Foam::mapDistributeBase::constructMap
const labelListList & constructMap() const
From subsetted data to new reconstructed data.
Definition: mapDistributeBase.H:301
Foam::globalIndexAndTransform
Determination and storage of the possible independent transforms introduced by coupledPolyPatches,...
Definition: globalIndexAndTransform.H:64
Foam::mapDistribute::transform::operator()
void operator()(const coupledPolyPatch &cpp, Container< Type > &map) const
Transform sparse field.
Definition: mapDistribute.H:251