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 | Copyright (C) 2011-2015 OpenFOAM Foundation
6  \\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::mapDistribute
26 
27 Description
28  Class containing processor-to-processor mapping information.
29 
30  We store mapping from the bits-to-send to the complete starting list
31  (subXXXMap) and from the received bits to their location in the new
32  list (constructXXXMap).
33 
34 Note:
35  Schedule is a list of processor pairs (one send, one receive. One of
36  them will be myself) which forms a scheduled (i.e. non-buffered) exchange.
37  See distribute on how to use it.
38  Note2: number of items sent on one processor have to equal the number
39  of items received on the other processor.
40 
41  To aid constructing these maps there are the constructors from global
42  numbering, either with or without transforms.
43 
44  - without transforms:
45  Constructors using compact numbering: layout is
46  - all my own elements first (whether used or not)
47  - followed by used-only remote elements sorted by remote processor.
48  So e.g 4 procs and on proc 1 the compact
49  table will first have all globalIndex.localSize() elements from proc1
50  followed by used-only elements of proc0, proc2, proc3.
51  The constructed mapDistribute sends the local elements from and
52  receives the remote elements into their compact position.
53  compactMap[procI] is the position of elements from procI in the compact
54  map. compactMap[myProcNo()] is empty since trivial addressing.
55 
56  It rewrites the input global indices into indices into the constructed
57  data.
58 
59 
60  - with transforms:
61  This requires the precalculated set of possible transforms
62  (globalIndexAndTransform). These are given as permutations (+, -, or none)
63  of up to 3 independent transforms.
64  The layout of the data is
65  - all my own elements first (whether used or not)
66  - followed by used-only remote elements sorted by remote processor.
67  - followed by - for each transformation index - the set of local or
68  remote elements with that transformation.
69  The inputs for the constructor are
70  - the set of untransformed local or remote indices in globalIndex
71  numbering. These get rewritten to be indices into the layout of the data.
72  - the set of transformed local or remote indices in globalIndexAndTransform
73  encoding. These are labelPairs.
74 
75  Any distribute with transforms is now done as:
76  1. exchange data with other processors and receive these into the
77  slots for that processor
78  2. for all transformations transform a subset of the data according
79  to transformElements_[transformI] and store this starting from
80  transformStart_[transformI]
81 
82  In the same way a reverse distribute will
83  1. apply the inverse transform to the data starting at
84  transformStart_[transformI] and copy the result back into the
85  transformElements_[transformI]. These might be local or remote slots.
86  2. the data in the remote slots will now be sent back to the correct
87  location in the originating processor.
88 
89  E.g. a map to handle
90  - mesh points on a mesh with
91  - 1 cyclic so 3 permutations (+,-,none) will have layout
92  - on e.g. processor 1 out of 2:
93 
94  +------+ <- transformStart[2]
95  | |
96  | | <- transform2 applied to data in local or remote slots
97  | |
98  +------+ <- transformStart[1]
99  | |
100  | | <- transform1 applied to data in local or remote slots
101  | |
102  +------+ <- transformStart[1]
103  | |
104  | | <- transform0 applied to data in local or remote slots
105  | |
106  +------+ <- transformStart[0]
107  | |
108  | | <- data from proc2
109  | |
110  +------+
111  | |
112  | | <- data from proc0
113  | |
114  +------+ <- mesh.nPoints()
115  | |
116  | |
117  | |
118  +------+ 0
119 
120 
121  When constructing from components optionally a 'flip' on
122  the maps can be specified. This will interpret the map
123  values as index+flip, similar to e.g. faceProcAddressing. The flip
124  will only be applied to fieldTypes (scalar, vector, .. triad)
125 
126 
127 SourceFiles
128  mapDistribute.C
129  mapDistributeTemplates.C
130 
131 \*---------------------------------------------------------------------------*/
132 
133 #ifndef mapDistribute_H
134 #define mapDistribute_H
135 
136 #include "mapDistributeBase.H"
137 #include "transformList.H"
138 #include "vectorTensorTransform.H"
139 #include "coupledPolyPatch.H"
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
143 namespace Foam
144 {
145 
146 class globalIndexAndTransform;
147 //class vectorTensorTransform;
148 
149 /*---------------------------------------------------------------------------*\
150  Class mapDistribute Declaration
151 \*---------------------------------------------------------------------------*/
152 
153 class mapDistribute
154 :
155  public mapDistributeBase
156 {
157  // Private data
158 
159  //- For every globalIndexAndTransform::transformPermutations
160  // gives the elements that need to be transformed
162 
163  //- Destination in constructMap for transformed elements
165 
166  // Private Member Functions
167 
168  //- Helper function: copy transformElements without transformation
169  template<class T>
170  void applyDummyTransforms(List<T>& field) const;
171 
172  template<class T, class TransformOp>
173  void applyTransforms
174  (
175  const globalIndexAndTransform& globalTransforms,
176  List<T>& field,
177  const TransformOp& top
178  ) const;
179 
180  //- Helper function: copy transformElements without transformation
181  template<class T>
182  void applyDummyInverseTransforms(List<T>& field) const;
183 
184  template<class T, class TransformOp>
186  (
187  const globalIndexAndTransform& globalTransforms,
188  List<T>& field,
189  const TransformOp& top
190  ) const;
191 
192 public:
193 
194  // Public classes
195 
196  //- Default transformation behaviour
197  class transform
198  {
199  public:
200 
201  template<class Type>
202  void operator()
203  (
204  const vectorTensorTransform& vt,
205  const bool forward,
206  List<Type>& fld
207  ) const
208  {
209  const tensor T(forward ? vt.R() : vt.R().T());
210  transformList(T, fld);
211  }
212 
213  template<class Type>
214  void operator()
215  (
216  const vectorTensorTransform& vt,
217  const bool forward,
218  List<List<Type> >& flds
219  ) const
220  {
221  forAll(flds, i)
222  {
223  operator()(vt, forward, flds[i]);
224  }
225  }
226 
227  //- Transform patch-based field
228  template<class Type>
229  void operator()(const coupledPolyPatch& cpp, UList<Type>& fld) const
230  {
231  if (!cpp.parallel())
232  {
233  transformList(cpp.forwardT(), fld);
234  }
235  }
236 
237  //- Transform sparse field
238  template<class Type, template<class> class Container>
239  void operator()(const coupledPolyPatch& cpp, Container<Type>& map)
240  const
241  {
242  if (!cpp.parallel())
243  {
244  transformList(cpp.forwardT(), map);
245  }
246  }
247  };
248 
249  //- Default transformation behaviour for position
250  class transformPosition
251  {
252  public:
253 
254  void operator()
255  (
256  const vectorTensorTransform& vt,
257  const bool forward,
259  ) const
260  {
261  pointField pfld(fld.xfer());
262  if (forward)
263  {
264  fld = vt.transformPosition(pfld);
265  }
266  else
267  {
268  fld = vt.invTransformPosition(pfld);
269  }
270  }
271  void operator()
272  (
273  const vectorTensorTransform& vt,
274  const bool forward,
275  List<List<point> >& flds
276  ) const
277  {
278  forAll(flds, i)
279  {
280  operator()(vt, forward, flds[i]);
281  }
282  }
283  //- Transform patch-based field
284  void operator()(const coupledPolyPatch& cpp, pointField& fld) const
285  {
286  cpp.transformPosition(fld);
287  }
288  template<template<class> class Container>
289  void operator()(const coupledPolyPatch& cpp, Container<point>& map)
290  const
291  {
292  Field<point> fld(map.size());
293  label i = 0;
294  forAllConstIter(typename Container<point>, map, iter)
295  {
296  fld[i++] = iter();
297  }
298  cpp.transformPosition(fld);
299  i = 0;
300  forAllIter(typename Container<point>, map, iter)
301  {
302  iter() = fld[i++];
303  }
304  }
305  };
306 
307 
308  // Declare name of the class and its debug switch
309  ClassName("mapDistribute");
310 
311 
312  // Constructors
313 
314  //- Construct null
315  mapDistribute();
316 
317  //- Construct from components
319  (
320  const label constructSize,
323  const bool subHasFlip = false,
324  const bool constructHasFlip = false
325  );
326 
327  //- Construct from components
329  (
330  const label constructSize,
335  const bool subHasFlip = false,
336  const bool constructHasFlip = false
337  );
338 
339  //- Construct from reverse addressing: per data item the send
340  // processor and the receive processor. (note: data is not stored
341  // sorted per processor so cannot use printLayout).
343  (
344  const labelList& sendProcs,
345  const labelList& recvProcs
346  );
347 
348  //- Construct from list of (possibly) remote elements in globalIndex
349  // numbering (or -1). Determines compact numbering (see above) and
350  // distribute map to get data into this ordering and renumbers the
351  // elements to be in compact numbering.
353  (
354  const globalIndex&,
355  labelList& elements,
356  List<Map<label> >& compactMap,
357  const int tag = Pstream::msgType()
358  );
359 
360  //- Special variant that works with the info sorted into bins
361  // according to local indices. E.g. think cellCells where
362  // cellCells[localCellI] is a list of global cells
364  (
365  const globalIndex&,
366  labelListList& cellCells,
367  List<Map<label> >& compactMap,
368  const int tag = Pstream::msgType()
369  );
370 
371  //- Construct from list of (possibly remote) untransformed elements
372  // in globalIndex numbering (or -1) and (possibly remote)
373  // transformded 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 = Pstream::msgType()
386  );
387 
388  //- As above but with ListLists.
390  (
391  const globalIndex&,
392  labelListList& cellCells,
394  const List<labelPairList>& transformedElements,
395  labelListList& transformedIndices,
396  List<Map<label> >& compactMap,
397  const int tag = Pstream::msgType()
398  );
399 
400  //- Construct by transferring parameter content
402 
403  //- Construct copy
405 
406  //- Construct from Istream
408 
409  //- Clone
411 
412 
413  //- Destructor
414  virtual ~mapDistribute()
415  {}
416 
417 
418  // Member Functions
419 
420  // Access
421 
422  //- For every globalIndexAndTransform::transformPermutations
423  // gives the elements that need to be transformed
424  const labelListList& transformElements() const
425  {
426  return transformElements_;
427  }
428 
429  //- Destination in constructMap for transformed elements
430  const labelList& transformStart() const
431  {
432  return transformStart_;
433  }
434 
435  //- Find transform from transformElements
436  label whichTransform(const label index) const;
437 
438 
439  // Other
440 
441  //- Transfer the contents of the argument and annul the argument.
442  void transfer(mapDistribute&);
443 
444  //- Transfer contents to the Xfer container
446 
447 
448  //- Distribute data using default commsType.
449  template<class T>
450  void distribute
451  (
452  List<T>& fld,
453  const bool dummyTransform = true,
454  const int tag = UPstream::msgType()
455  ) const;
456 
457  //- Distribute data using default commsType.
458  template<class T, class negateOp>
459  void distribute
460  (
461  List<T>& fld,
462  const negateOp& negOp,
463  const bool dummyTransform = true,
464  const int tag = UPstream::msgType()
465  ) const;
466 
467  //- Distribute data using default commsType.
468  template<class T>
469  void distribute
470  (
472  const bool dummyTransform = true,
473  const int tag = UPstream::msgType()
474  ) const;
475 
476  //- Reverse distribute data using default commsType.
477  template<class T>
478  void reverseDistribute
479  (
480  const label constructSize,
481  List<T>&,
482  const bool dummyTransform = true,
483  const int tag = UPstream::msgType()
484  ) const;
485 
486  //- Reverse distribute data using default commsType.
487  // Since constructSize might be larger than supplied size supply
488  // a nullValue
489  template<class T>
490  void reverseDistribute
491  (
492  const label constructSize,
493  const T& nullValue,
494  List<T>& fld,
495  const bool dummyTransform = true,
496  const int tag = UPstream::msgType()
497  ) const;
498 
499  //- Distribute with transforms
500  template<class T, class TransformOp>
501  void distribute
502  (
504  List<T>& fld,
505  const TransformOp& top,
506  const int tag = UPstream::msgType()
507  ) const;
508 
509  //- Reverse distribute with transforms
510  template<class T, class TransformOp>
511  void reverseDistribute
512  (
514  const label constructSize,
515  List<T>& fld,
516  const TransformOp& top,
517  const int tag = UPstream::msgType()
518  ) const;
519 
520  //- Reverse distribute with transforms
521  template<class T, class TransformOp>
522  void reverseDistribute
523  (
525  const label constructSize,
526  const T& nullValue,
527  List<T>& fld,
528  const TransformOp& top,
529  const int tag = UPstream::msgType()
530  ) const;
531 
532  //- Debug: print layout. Can only be used on maps with sorted
533  // storage (local data first, then non-local data)
534  void printLayout(Ostream& os) const;
535 
536  //- Correct for topo change.
537  void updateMesh(const mapPolyMesh&)
538  {
540  }
541 
542  // Member Operators
543 
544  void operator=(const mapDistribute&);
545 
546  // IOstream operators
547 
548  //- Read dictionary from Istream
550 
551  //- Write dictionary to Ostream
552  friend Ostream& operator<<(Ostream&, const mapDistribute&);
553 
554 };
555 
556 
557 // Template specialisation for primitives that do not need transform
558 template<>
559 void mapDistribute::transform::operator()
560 (
561  const vectorTensorTransform&,
562  const bool,
563  List<label>&
564 ) const;
565 template<>
566 void mapDistribute::transform::operator()
567 (
568  const coupledPolyPatch&,
569  UList<label>&
570 ) const;
571 template<>
572 void mapDistribute::transform::operator()
573 (
574  const coupledPolyPatch&,
575  Map<label>&
576 ) const;
577 template<>
578 void mapDistribute::transform::operator()
579 (
580  const coupledPolyPatch&,
581  EdgeMap<label>&
582 ) const;
583 
584 template<>
585 void mapDistribute::transform::operator()
586 (
587  const coupledPolyPatch&,
588  UList<scalar>&
589 ) const;
590 template<>
591 void mapDistribute::transform::operator()
592 (
593  const vectorTensorTransform&,
594  const bool,
595  List<scalar>&
596 ) const;
597 template<>
598 void mapDistribute::transform::operator()
599 (
600  const coupledPolyPatch&,
601  Map<scalar>&
602 ) const;
603 template<>
604 void mapDistribute::transform::operator()
605 (
606  const coupledPolyPatch&,
607  EdgeMap<scalar>&
608 ) const;
609 
610 template<>
611 void mapDistribute::transform::operator()
612 (
613  const coupledPolyPatch& cpp,
614  UList<bool>& fld
615 ) const;
616 template<>
617 void mapDistribute::transform::operator()
618 (
619  const vectorTensorTransform&,
620  const bool,
621  List<bool>&
622 ) const;
623 template<>
624 void mapDistribute::transform::operator()
625 (
626  const coupledPolyPatch&,
627  Map<bool>&
628 ) const;
629 template<>
630 void mapDistribute::transform::operator()
631 (
632  const coupledPolyPatch&,
633  EdgeMap<bool>&
634 ) const;
635 
636 
637 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
638 
639 } // End namespace Foam
640 
641 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
642 
643 #ifdef NoRepository
644 # include "mapDistributeTemplates.C"
645 #endif
646 
647 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
648 
649 #endif
650 
651 // ************************************************************************* //
Foam::mapDistributeBase::subMap
const labelListList & subMap() const
From subsetted data back to original data.
Definition: mapDistributeBase.H:256
Foam::Tensor
Templated 3D tensor derived from VectorSpace adding construction from 9 components,...
Definition: complexI.H:224
Foam::mapDistributeBase::constructHasFlip
bool constructHasFlip() const
Does constructMap include a sign.
Definition: mapDistributeBase.H:292
Foam::mapDistribute::whichTransform
label whichTransform(const label index) const
Find transform from transformElements.
Definition: mapDistribute.C:516
Foam::vectorTensorTransform::invTransformPosition
vector invTransformPosition(const vector &v) const
Inverse transform the given position.
Definition: vectorTensorTransformI.H:138
mapDistributeBase.H
forAllIter
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object of type.
Definition: UList.H:431
Foam::mapDistribute::transformPosition::operator()
void operator()(const coupledPolyPatch &cpp, Container< point > &map) const
Definition: mapDistribute.H:288
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:406
Foam::DynamicList
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Definition: DynamicList.H:56
Foam::vectorTensorTransform::R
const tensor & R() const
Definition: vectorTensorTransformI.H:73
Foam::coupledPolyPatch::forwardT
virtual const tensorField & forwardT() const
Return face transformation tensor.
Definition: coupledPolyPatch.H:294
Foam::mapDistribute::applyTransforms
void applyTransforms(const globalIndexAndTransform &globalTransforms, List< T > &field, const TransformOp &top) const
Definition: mapDistributeTemplates.C:73
Foam::Map< label >
Foam::coupledPolyPatch
The coupledPolyPatch is an abstract base class for patches that couple regions of the computational d...
Definition: coupledPolyPatch.H:51
Foam::mapDistribute::applyInverseTransforms
void applyInverseTransforms(const globalIndexAndTransform &globalTransforms, List< T > &field, const TransformOp &top) const
Definition: mapDistributeTemplates.C:104
Foam::dummyTransform
Definition: dummyTransform.H:44
Foam::mapDistribute::transformPosition
Default transformation behaviour for position.
Definition: mapDistribute.H:249
Foam::mapDistribute::transformPosition::operator()
void operator()(const vectorTensorTransform &vt, const bool forward, List< point > &fld) const
Definition: mapDistribute.H:254
Foam::mapDistribute::transformStart
const labelList & transformStart() const
Destination in constructMap for transformed elements.
Definition: mapDistribute.H:429
Foam::mapDistribute::transformPosition::operator()
void operator()(const coupledPolyPatch &cpp, pointField &fld) const
Transform patch-based field.
Definition: mapDistribute.H:283
Foam::Xfer
A simple container for copying or transferring objects of type <T>.
Definition: Xfer.H:85
Foam::mapDistribute::transform::operator()
void operator()(const coupledPolyPatch &cpp, UList< Type > &fld) const
Transform patch-based field.
Definition: mapDistribute.H:228
forAllConstIter
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
Definition: pEqn.H:39
Foam::coupledPolyPatch::parallel
virtual bool parallel() const
Are the cyclic planes parallel.
Definition: coupledPolyPatch.H:288
mapDistributeTemplates.C
Foam::mapDistribute::transfer
void transfer(mapDistribute &)
Transfer the contents of the argument and annul the argument.
Definition: mapDistribute.C:523
NotImplemented
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:365
coupledPolyPatch.H
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:57
Foam::mapDistribute
Class containing processor-to-processor mapping information.
Definition: mapDistribute.H:152
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:55
Foam::mapDistribute::operator>>
friend Istream & operator>>(Istream &, mapDistribute &)
Read dictionary from Istream.
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:155
Foam::mapDistribute::applyDummyTransforms
void applyDummyTransforms(List< T > &field) const
Helper function: copy transformElements without transformation.
Definition: mapDistributeTemplates.C:37
fld
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< ' ';}gmvFile<< nl;forAll(lagrangianScalarNames, i){ const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Foam::mapDistributeBase::subHasFlip
bool subHasFlip() const
Does subMap include a sign.
Definition: mapDistributeBase.H:280
Foam::mapDistribute::transformElements
const labelListList & transformElements() const
For every globalIndexAndTransform::transformPermutations.
Definition: mapDistribute.H:423
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::globalIndex
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
Definition: globalIndex.H:63
Foam::mapDistribute::transformElements_
labelListList transformElements_
For every globalIndexAndTransform::transformPermutations.
Definition: mapDistribute.H:160
Foam::mapDistribute::operator<<
friend Ostream & operator<<(Ostream &, const mapDistribute &)
Write dictionary to Ostream.
Foam::mapDistribute::transform
Default transformation behaviour.
Definition: mapDistribute.H:196
Foam::mapDistributeBase::constructSize
label constructSize() const
Constructed data size.
Definition: mapDistributeBase.H:244
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
Foam::mapDistribute::updateMesh
void updateMesh(const mapPolyMesh &)
Correct for topo change.
Definition: mapDistribute.H:536
Foam::UPstream::msgType
static int & msgType()
Message tag of standard messages.
Definition: UPstream.H:452
Foam::mapDistribute::transform::operator()
void operator()(const vectorTensorTransform &vt, const bool forward, List< Type > &fld) const
Definition: mapDistribute.H:202
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:103
Foam::mapDistribute::~mapDistribute
virtual ~mapDistribute()
Destructor.
Definition: mapDistribute.H:413
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::vectorTensorTransform
Vector-tensor class used to perform translations and rotations in 3D space.
Definition: vectorTensorTransform.H:61
Foam::mapDistribute::ClassName
ClassName("mapDistribute")
Foam::UList< Type >
Foam::mapPolyMesh
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:158
Foam::mapDistributeBase
Class containing processor-to-processor mapping information.
Definition: mapDistributeBase.H:91
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:187
List
Definition: Test.C:19
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
Foam::transformList
void transformList(const tensor &, UList< T > &)
Apply transformation to list. Either single transformation tensor.
Definition: transformList.C:49
Foam::mapDistribute::clone
autoPtr< mapDistribute > clone() const
Clone.
Definition: mapDistribute.C:508
transformList.H
Spatial transformation functions for 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:268
Foam::mapDistribute::xfer
Xfer< mapDistribute > xfer()
Transfer contents to the Xfer container.
Definition: mapDistribute.C:531
Foam::globalIndexAndTransform
Determination and storage of the possible independent transforms introduced by coupledPolyPatches,...
Definition: globalIndexAndTransform.H:60
Foam::mapDistribute::operator=
void operator=(const mapDistribute &)
Definition: mapDistribute.C:539
Foam::mapDistribute::applyDummyInverseTransforms
void applyDummyInverseTransforms(List< T > &field) const
Helper function: copy transformElements without transformation.
Definition: mapDistributeTemplates.C:55
Foam::mapDistribute::transform::operator()
void operator()(const coupledPolyPatch &cpp, Container< Type > &map) const
Transform sparse field.
Definition: mapDistribute.H:238
Foam::mapDistribute::mapDistribute
mapDistribute()
Construct null.
Definition: mapDistribute.C:152
Foam::Tensor::T
Tensor< Cmpt > T() const
Transpose.
Definition: TensorI.H:286
Foam::mapDistribute::transformStart_
labelList transformStart_
Destination in constructMap for transformed elements.
Definition: mapDistribute.H:163