46 void Foam::processorMeshes::read()
50 pBoundaryProcAddressing_.free();
53 boundaryProcAddressing_.free();
54 cellProcAddressing_.free();
55 faceProcAddressing_.free();
56 pointProcAddressing_.free();
77 meshes_[proci].facesInstance(),
79 meshes_[proci].thisDb(),
85 ioAddr.rename(
"pointProcAddressing");
86 pointProcAddressing_.emplace_set(proci, ioAddr);
89 ioAddr.rename(
"faceProcAddressing");
90 faceProcAddressing_.emplace_set(proci, ioAddr);
93 ioAddr.rename(
"cellProcAddressing");
94 cellProcAddressing_.emplace_set(proci, ioAddr);
97 ioAddr.rename(
"boundaryProcAddressing");
98 boundaryProcAddressing_.emplace_set(proci, ioAddr);
114 pBoundaryProcAddressing_.set
121 "boundaryProcAddressing",
122 meshes_[proci].facesInstance(),
124 pMeshes_[proci].thisDb(),
129 boundaryProcAddressing_[proci]
138 Foam::processorMeshes::processorMeshes
140 PtrList<Time>& databases,
145 databases_(databases),
146 meshes_(databases.size()),
147 pointProcAddressing_(databases.size()),
148 faceProcAddressing_(databases.size()),
149 cellProcAddressing_(databases.size()),
150 boundaryProcAddressing_(databases.size()),
151 pMeshes_(databases.size()),
152 pBoundaryProcAddressing_(databases.size())
184 else if (stat != procStat)
187 <<
"Processor " << proci
188 <<
" has a different polyMesh at time " 189 << databases_[proci].timeName()
190 <<
" compared to any previous processors." <<
nl 191 <<
"Please check time " << databases_[proci].timeName()
192 <<
" directories on all processors for consistent" 214 PtrList<pointIOField> procsPoints(meshes_.size());
228 meshes_[proci].thisDb(),
242 const vectorField& procPoints = procsPoints[proci];
244 const labelList& pointProcAddr = pointProcAddressing_[proci];
246 if (pointProcAddr.size() != procPoints.size())
250 <<
" pointProcAddr:" << pointProcAddr.size()
251 <<
" procPoints:" << procPoints.size()
255 UIndirectList<point>(newPoints, pointProcAddr) = procPoints;
290 io.
rename(
"boundaryProcAddressing");
310 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...
Reading is optional [identical to LAZY_READ].
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)
static word meshSubDir
Return the mesh sub-directory name (usually "pointMesh")
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)
static autoPtr< T > New(Args &&... args)
Construct autoPtr with forwarding arguments.
Do not request registration (bool: false)