45 void Foam::processorMeshes::read()
51 boundaryProcAddressing_.set(proci,
nullptr);
52 cellProcAddressing_.set(proci,
nullptr);
53 faceProcAddressing_.set(proci,
nullptr);
54 pointProcAddressing_.set(proci,
nullptr);
55 meshes_.set(proci,
nullptr);
79 meshes_[proci].facesInstance(),
81 meshes_[proci].thisDb(),
87 ioAddr.rename(
"pointProcAddressing");
88 pointProcAddressing_.set(proci,
new labelIOList(ioAddr));
91 ioAddr.rename(
"faceProcAddressing");
92 faceProcAddressing_.set(proci,
new labelIOList(ioAddr));
95 ioAddr.rename(
"cellProcAddressing");
96 cellProcAddressing_.set(proci,
new labelIOList(ioAddr));
99 ioAddr.rename(
"boundaryProcAddressing");
100 boundaryProcAddressing_.set(proci,
new labelIOList(ioAddr));
107 Foam::processorMeshes::processorMeshes
109 PtrList<Time>& databases,
114 databases_(databases),
115 meshes_(databases.size()),
116 pointProcAddressing_(databases.size()),
117 faceProcAddressing_(databases.size()),
118 cellProcAddressing_(databases.size()),
119 boundaryProcAddressing_(databases.size())
151 else if (stat != procStat)
154 <<
"Processor " << proci
155 <<
" has a different polyMesh at time " 156 << databases_[proci].timeName()
157 <<
" compared to any previous processors." <<
nl 158 <<
"Please check time " << databases_[proci].timeName()
159 <<
" directories on all processors for consistent" 181 PtrList<pointIOField> procsPoints(meshes_.size());
195 meshes_[proci].thisDb(),
209 const vectorField& procPoints = procsPoints[proci];
211 const labelList& pointProcAddr = pointProcAddressing_[proci];
213 if (pointProcAddr.size() != procPoints.size())
217 <<
" pointProcAddr:" << pointProcAddr.size()
218 <<
" procPoints:" << procPoints.size()
222 UIndirectList<point>(newPoints, pointProcAddr) = procPoints;
257 io.
rename(
"boundaryProcAddressing");
static void removeFiles(const polyMesh &mesh)
Helper: remove all procAddressing files from mesh instance.
errorManipArg< error, int > exit(error &err, const int errNo=1)
const fileName & facesInstance() const
Return the current instance directory for faces.
label nPoints() const noexcept
Number of mesh points.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
vectorIOField pointIOField
pointIOField is a vectorIOField.
virtual bool write(const bool valid=true) const
Write mesh using IO settings from time.
constexpr char nl
The newline '\n' character (0x0a)
virtual void rename(const word &newName)
Rename the object.
static word meshSubDir
Return the mesh sub-directory name (usually "polyMesh")
virtual void movePoints(const pointField &)
Move points, returns volumes swept by faces in motion.
autoPtr< fileOperation > fileHandler(std::nullptr_t)
Delete current file handler.
Ignore writing from objectRegistry::writeObject()
polyMesh::readUpdateState readUpdate()
Update the meshes based on the mesh files saved in time directories.
fileName objectPath() const
The complete path + object name.
bool read(const char *buf, int32_t &val)
Same as readInt32.
virtual const objectRegistry & thisDb() const
Return the object registry - resolve conflict polyMesh/lduMesh.
#define forAll(list, i)
Loop across all elements in list.
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
errorManip< error > abort(error &err)
void reconstructPoints(fvMesh &)
Reconstruct point position after motion in parallel.
defineTypeNameAndDebug(combustionModel, 0)
Field< vector > vectorField
Specialisation of Field<T> for vector.
readUpdateState
Enumeration defining the state of the mesh after a read update.
List< label > labelList
A List of labels.
IOList< label > labelIOList
Label container classes.