45void 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));
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"
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()
248 ioAddr.
rename(
"pointProcAddressing");
252 ioAddr.
rename(
"faceProcAddressing");
256 ioAddr.
rename(
"cellProcAddressing");
260 ioAddr.
rename(
"boundaryProcAddressing");
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
A primitive field of type <T> with automated input and output.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
virtual void rename(const word &newName)
Rename the object.
fileName objectPath() const
The complete path + object name.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
const T * set(const label i) const
A List with indirect addressing. Like IndirectList but does not store addressing.
void size(const label n)
Older name for setAddressableSize.
void removeFiles() const
Remove all files from mesh instance()
Mesh data needed to do the Finite Volume discretisation.
virtual const objectRegistry & thisDb() const
Return the object registry - resolve conflict polyMesh/lduMesh.
virtual bool write(const bool valid=true) const
Write mesh using IO settings from time.
virtual void movePoints(const pointField &)
Move points, returns volumes swept by faces in motion.
void reconstructPoints()
Helper: reconstruct and write mesh points.
Mesh consisting of general polyhedral cells.
const fileName & facesInstance() const
Return the current instance directory for faces.
readUpdateState
Enumeration defining the state of the mesh after a read update.
static word meshSubDir
Return the mesh sub-directory name (usually "polyMesh")
label nPoints() const noexcept
Number of mesh points.
Container for processor mesh addressing.
polyMesh::readUpdateState readUpdate()
Update the meshes based on the mesh files saved in time directories.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
bool rm(const fileName &file)
Remove a file (or its gz equivalent), returning true if successful.
bool read(const char *buf, int32_t &val)
Same as readInt32.
errorManip< error > abort(error &err)
IOList< label > labelIOList
Label container classes.
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.