45 void Foam::processorMeshes::read()
49 boundaryProcAddressing_.free();
50 cellProcAddressing_.free();
51 faceProcAddressing_.free();
52 pointProcAddressing_.free();
73 meshes_[proci].facesInstance(),
75 meshes_[proci].thisDb(),
81 ioAddr.rename(
"pointProcAddressing");
82 pointProcAddressing_.emplace_set(proci, ioAddr);
85 ioAddr.rename(
"faceProcAddressing");
86 faceProcAddressing_.emplace_set(proci, ioAddr);
89 ioAddr.rename(
"cellProcAddressing");
90 cellProcAddressing_.emplace_set(proci, ioAddr);
93 ioAddr.rename(
"boundaryProcAddressing");
94 boundaryProcAddressing_.emplace_set(proci, ioAddr);
101 Foam::processorMeshes::processorMeshes
103 PtrList<Time>& databases,
108 databases_(databases),
109 meshes_(databases.size()),
110 pointProcAddressing_(databases.size()),
111 faceProcAddressing_(databases.size()),
112 cellProcAddressing_(databases.size()),
113 boundaryProcAddressing_(databases.size())
145 else if (stat != procStat)
148 <<
"Processor " << proci
149 <<
" has a different polyMesh at time " 150 << databases_[proci].timeName()
151 <<
" compared to any previous processors." <<
nl 152 <<
"Please check time " << databases_[proci].timeName()
153 <<
" directories on all processors for consistent" 175 PtrList<pointIOField> procsPoints(meshes_.size());
189 meshes_[proci].thisDb(),
203 const vectorField& procPoints = procsPoints[proci];
205 const labelList& pointProcAddr = pointProcAddressing_[proci];
207 if (pointProcAddr.size() != procPoints.size())
211 <<
" pointProcAddr:" << pointProcAddr.size()
212 <<
" procPoints:" << procPoints.size()
216 UIndirectList<point>(newPoints, pointProcAddr) = procPoints;
251 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.
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.
refPtr< fileOperation > fileHandler(std::nullptr_t)
Delete current file handler - forwards to fileOperation::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...
errorManip< error > abort(error &err)
void reconstructPoints(fvMesh &)
Reconstruct point position after motion in parallel.
virtual bool write(const bool writeOnProc=true) const
Write mesh using IO settings from time.
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.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
Do not request registration (bool: false)