136#ifndef Foam_mapDistribute_H
137#define Foam_mapDistribute_H
181 template<
class T,
class TransformOp>
186 const TransformOp& top
193 template<
class T,
class TransformOp>
194 void applyInverseTransforms
198 const TransformOp& top
221 [[maybe_unused]]
const bool forward,
227 const tensor rot(forward ? vt.
R() : vt.
R().
T());
236 [[maybe_unused]]
const bool forward,
242 const tensor rot(forward ? vt.
R() : vt.
R().
T());
243 for (
auto&
fld : flds)
264 template<
class Type,
template<
class>
class Container>
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);
326 cpp.transformPosition(
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,
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,
Info<< nl;Info<< "Write faMesh in vtk format:"<< nl;{ vtk::uindirectPatchWriter writer(aMesh.patch(), fileName(aMesh.time().globalPath()/vtkBaseFileName));writer.writeGeometry();globalIndex procAddr(aMesh.nFaces());labelList cellIDs;if(UPstream::master()) { cellIDs.resize(procAddr.totalSize());for(const labelRange &range :procAddr.ranges()) { auto slice=cellIDs.slice(range);slice=identity(range);} } writer.beginCellData(4);writer.writeProcIDs();writer.write("cellID", cellIDs);writer.write("area", aMesh.S().field());writer.write("normal", aMesh.faceAreaNormals());writer.beginPointData(1);writer.write("normal", aMesh.pointAreaNormals());Info<< " "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.time().globalPath()/(vtkBaseFileName+"-edges")));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A HashTable to objects of type <T> with a label key.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Tensor< Cmpt > T() const
Return non-Hermitian transpose.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Inter-processor communications stream.
commsTypes
Communications types.
static int & msgType() noexcept
Message tag of standard messages.
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
The coupledPolyPatch is an abstract base class for patches that couple regions of the computational d...
virtual bool parallel() const
Are the cyclic planes parallel.
virtual void transformPosition(pointField &) const =0
Transform a patch-based position from other side to this side.
virtual const tensorField & forwardT() const
Return face transformation tensor.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Calculates a non-overlapping list of offsets based on an input size (eg, number of cells) from differ...
mapDistributeBase() noexcept
Default construct (uses worldComm).
const labelListList & constructMap() const noexcept
From subsetted data to new reconstructed data.
bool constructHasFlip() const noexcept
Does constructMap include a sign.
const labelListList & subMap() const noexcept
From subsetted data back to original data.
bool subHasFlip() const noexcept
Does subMap include a sign.
label comm() const noexcept
The communicator used.
label constructSize() const noexcept
Constructed data size.
Class containing processor-to-processor mapping information.
mapDistributeBase() noexcept
Inherit constructors.
friend Istream & operator>>(Istream &, mapDistribute &)
Read plain content (not dictionary) from Istream.
label whichTransform(const label index) const
Find transform from transformElements.
void operator=(const mapDistribute &rhs)
Copy assignment.
void printLayout(Ostream &os) const
Debug: print layout. Can only be used on maps with sorted.
friend Ostream & operator<<(Ostream &, const mapDistribute &)
Write plain content (not dictionary) to Ostream.
ClassName("mapDistribute")
void readDict(const dictionary &dict)
Read entries from dictionary format.
const labelListList & transformElements() const noexcept
For every globalIndexAndTransform::transformPermutations gives the elements that need to be transform...
mapDistribute() noexcept
Default construct - uses worldComm.
void transfer(mapDistribute &map)
Transfer the contents of the argument and annul the argument.
void writeEntries(Ostream &os) const
Write entries in dictionary format.
void reverseDistribute(const label constructSize, List< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
Reverse distribute data using default commsType.
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.
const labelList & transformStart() const noexcept
Destination in constructMap for transformed elements.
autoPtr< mapDistribute > clone() const
Clone.
void clear()
Reset to zero size, only retaining communicator.
void updateMesh(const mapPolyMesh &)
No correction for topo change.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
#define ClassName(TypeNameString)
Add typeName information from argument TypeNameString to a class.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
OBJstream os(runTime.globalPath()/outputName)
List< labelPair > labelPairList
List of labelPair.
List< labelList > labelListList
List of labelList.
List< label > labelList
A List of labels.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces).
Istream & operator>>(Istream &, directionInfo &)
void rhs(fvMatrix< typename Expr::value_type > &m, const Expr &expression)
constexpr bool is_rotational_vectorspace_v
The is_rotational_vectorspace value of Type.
void transformList(const tensor &rotTensor, UList< T > &field)
Inplace transform a list of elements.
vectorField pointField
pointField is a vectorField.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
#define forAllIters(container, iter)
Iterate across all elements in the container object.
#define forAllConstIters(container, iter)
Iterate across all elements of the container object with const access.