136 #ifndef Foam_mapDistribute_H 137 #define Foam_mapDistribute_H 150 class globalIndexAndTransform;
153 Istream&
operator>>(Istream&, mapDistribute&);
154 Ostream&
operator<<(Ostream&,
const mapDistribute&);
181 template<
class T,
class TransformOp>
186 const TransformOp& top
193 template<
class T,
class TransformOp>
194 void applyInverseTransforms
198 const TransformOp& top
225 if constexpr (is_rotational_vectorspace_v<Type>)
227 const tensor rot(forward ? vt.
R() : vt.
R().T());
240 if constexpr (is_rotational_vectorspace_v<Type>)
242 const tensor rot(forward ? vt.R() : vt.R().T());
243 for (
auto&
fld : flds)
254 if constexpr (is_rotational_vectorspace_v<Type>)
264 template<
class Type,
template<
class>
class Container>
268 if constexpr (is_rotational_vectorspace_v<Type>)
292 vt.transformPositionList(
fld);
296 vt.invTransformPositionList(
fld);
309 for (
auto&
fld : flds)
311 vt.transformPositionList(
fld);
316 for (
auto&
fld : flds)
318 vt.invTransformPositionList(
fld);
329 template<
template<
class>
class Container>
330 void operator()(
const coupledPolyPatch& cpp, Container<point>& map)
333 Field<point>
fld(map.size());
339 cpp.transformPosition(
fld);
407 const
int tag =
UPstream::msgType(),
420 const
int tag =
UPstream::msgType(),
464 return transformElements_;
470 return transformStart_;
491 const bool dummyTransform =
true,
501 const bool dummyTransform =
true,
529 template<
class T,
class NegateOp>
533 const NegateOp& negOp,
540 template<
class T,
class NegateOp>
545 const NegateOp& negOp,
599 template<
class T,
class TransformOp>
604 const TransformOp& top,
610 template<
class T,
class TransformOp>
616 const TransformOp& top,
621 template<
class T,
class TransformOp>
627 const TransformOp& top,
632 template<
class T,
class TransformOp>
639 const TransformOp& top,
644 template<
class T,
class TransformOp>
651 const TransformOp& top,
656 template<
class T,
class TransformOp>
664 const TransformOp& top,
void clear()
Reset to zero size, only retaining communicator.
commsTypes
Communications types.
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...
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.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
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.
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.
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...
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
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.
autoPtr< mapDistribute > clone() const
Clone.
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
void reverseDistribute(const label constructSize, List< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
Reverse distribute data using default commsType.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Class containing processor-to-processor mapping information.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
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)
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)
void readDict(const dictionary &dict)
Read entries from dictionary format.
void transformList(const tensor &rotTensor, UList< T > &field)
Inplace transform a list of elements.
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...
ClassName("mapDistribute")
List< label > labelList
A List of labels.
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.
mapDistribute() noexcept
Default construct - uses worldComm.
Inter-processor communications stream.
forAllConstIters(mixture.phases(), phase)
A HashTable to objects of type <T> with a label key.