41#ifndef Foam_faMeshDistributor_H
42#define Foam_faMeshDistributor_H
76 mutable std::unique_ptr<mapDistributeBase> internalEdgeMapPtr_;
94 void createInternalEdgeMap()
const;
97 void createPatchMaps()
const;
100 void checkAddressing()
const;
137 const bool isWriteProc
242# include "faMeshDistributor.txx"
Forwards and collection of common area field types.
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))
Generic GeometricField class.
List of IOobjects with searching and retrieving facilities. Implemented as a HashTable,...
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
label distributeAllFields(const IOobjectList &objects, const wordRes &selectedFields=wordRes()) const
Read, distribute and write all/selected point field types (scalar, vector, ... types).
void operator=(const faMeshDistributor &)=delete
No copy assignment.
faMeshDistributor(const faMesh &srcMesh, const faMesh &tgtMesh, const mapDistributePolyMesh &faDistMap, refPtr< fileOperation > &writeHandler)
Construct from components, using file handler to control writing.
tmp< GeometricField< Type, faPatchField, areaMesh > > distributeAreaField(const IOobject &fieldObject) const
Read and distribute area field.
tmp< GeometricField< Type, faPatchField, areaMesh > > distributeField(const GeometricField< Type, faPatchField, areaMesh > &fld) const
Distribute area field.
faMeshDistributor(const faMeshDistributor &)=delete
No copy construct.
static int verbose_
Output verbosity when writing.
static mapDistributePolyMesh distribute(const faMesh &oldMesh, const mapDistributePolyMesh &distMap, const polyMesh &tgtPolyMesh, autoPtr< faMesh > &newMeshPtr)
Distribute mesh according to the given (volume) mesh distribution.
static mapDistributePolyMesh distribute(const faMesh &oldMesh, const mapDistributePolyMesh &distMap, autoPtr< faMesh > &newMeshPtr)
Distribute mesh according to the given (volume) mesh distribution.
tmp< GeometricField< Type, faePatchField, edgeMesh > > distributeEdgeField(const IOobject &fieldObject) const
Read and distribute edge field.
tmp< GeometricField< Type, faePatchField, edgeMesh > > distributeField(const GeometricField< Type, faePatchField, edgeMesh > &fld) const
Distribute edge field.
label distributeEdgeFields(const IOobjectList &objects, const wordRes &selectedFields=wordRes()) const
Read, distribute and write all/selected area fields.
label distributeAreaFields(const IOobjectList &objects, const wordRes &selectedFields=wordRes()) const
Read, distribute and write all/selected area fields.
faMeshDistributor(const faMesh &srcMesh, const faMesh &tgtMesh, const mapDistributePolyMesh &faDistMap, const bool isWriteProc)
Construct from components, using bool to control writing.
Finite area mesh (used for 2-D non-Euclidian finite area method) defined using a patch of faces on a ...
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Mesh consisting of general polyhedral cells.
A class for managing references or pointers (no reference counting).
A class for managing temporary objects.
A List of wordRe with additional matching capabilities.
Forwards for edge field types.
UList< label > labelUList
A UList of labels.