54#ifndef Foam_parPointFieldDistributor_H
55#define Foam_parPointFieldDistributor_H
84 const label nOldPoints_;
133 const bool savePoints,
134 const bool isWriteProc
145 const bool savePoints,
161 const bool savePoints,
162 const bool isWriteProc
177 const bool savePoints,
269# include "parPointFieldDistributor.txx"
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,...
Class containing processor-to-processor mapping information.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
label distributeAllFields(const IOobjectList &objects, const wordRes &selectedFields=wordRes()) const
Read, distribute and write all/selected point field types (scalar, vector, ... types).
bool hasPatchPointMaps() const
True if patch maps (per boundary) exist.
parPointFieldDistributor(const pointMesh &srcMesh, const bool savePoints, refPtr< fileOperation > &writeHandler)
Basic construction.
parPointFieldDistributor(const parPointFieldDistributor &)=delete
No copy construct.
tmp< GeometricField< Type, pointPatchField, pointMesh > > distributePointField(const IOobject &fieldObject) const
Read and distribute point field.
void distributeAndStore(const PtrList< GeometricField< Type, pointPatchField, pointMesh > > &) const
Distributed each (unregistered!) point field and store the result on its objectRegistry.
void resetTarget()
Clear target mesh / distribution map.
void operator=(const parPointFieldDistributor &)=delete
No copy assignment.
parPointFieldDistributor(const pointMesh &srcMesh, const pointMesh &tgtMesh, const mapDistributePolyMesh &distMap, const bool savePoints, const bool isWriteProc)
Full construction of source/target.
void clearMeshPoints()
Clear out meshPoints (per boundary) for the source mesh.
void clearPatchPointMaps()
Clear out patch maps (per boundary).
tmp< GeometricField< Type, pointPatchField, pointMesh > > distributeField(const GeometricField< Type, pointPatchField, pointMesh > &fld) const
Distribute point field.
label distributePointFields(const IOobjectList &objects, const wordRes &selectedFields=wordRes()) const
Read, distribute and write all/selected point fields.
void saveMeshPoints()
Create/recreate meshPoints (per boundary) for the source mesh.
static int verbose_
Output verbosity when writing.
parPointFieldDistributor(const pointMesh &srcMesh, const bool savePoints, const bool isWriteProc)
Basic construction.
void resetTarget(const pointMesh &tgtMesh, const mapDistributePolyMesh &distMap)
Reset target mesh / distribution map.
void createPatchPointMaps()
Construct per-patch addressing.
bool hasTarget() const
True if a target mesh/distribution map has been attached.
bool hasMeshPoints() const
True if meshPoints (per boundary) for the source mesh have been saved.
parPointFieldDistributor(const pointMesh &srcMesh, const pointMesh &tgtMesh, const mapDistributePolyMesh &distMap, const bool savePoints, refPtr< fileOperation > &writeHandler)
Full construction of source/target.
Mesh representing a set of points created from polyMesh.
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 and collection of common point field types.