62 PtrList<entry> patchEntries;
66 const word oldTypeName = IOPtrList<entry>::typeName;
67 const_cast<word&
>(IOPtrList<entry>::typeName) =
word::null;
68 IOPtrList<entry> dictList
73 io.time().findInstance
86 const_cast<word&
>(IOPtrList<entry>::typeName) = oldTypeName;
88 const_cast<word&
>(dictList.type()) = dictList.headerClassName();
90 patchEntries.transfer(dictList);
101 toSlave << patchEntries;
112 fromMaster >> patchEntries;
120 fileHandler().filePath(io.time().path()/io.instance()/meshSubDir)
130 IOobject noReadIO(io);
143 List<polyPatch*>
patches(patchEntries.size());
148 const entry& e = patchEntries[
patchi];
149 const word
type(e.dict().lookup(
"type"));
150 const word& name = e.keyword();
154 type != processorPolyPatch::typeName
155 &&
type != processorCyclicPolyPatch::typeName
158 dictionary patchDict(e.dict());
159 patchDict.set(
"nFaces", 0);
160 patchDict.set(
"startFace", 0);
167 dummyMesh.boundaryMesh()
171 patches.setSize(nPatches);
172 dummyMesh.addFvPatches(patches,
false);
185 dummyMesh.pointZones()
197 dummyMesh.faceZones()
208 dummyMesh.cellZones()
211 dummyMesh.addZones(pz, fz, cz);
220 autoPtr<fvMesh>
meshPtr(
new fvMesh(io));
231 const polyBoundaryMesh& patches = mesh.boundaryMesh();
235 const entry& e = patchEntries[
patchi];
236 const word
type(e.dict().lookup(
"type"));
237 const word& name = e.keyword();
239 if (
type == processorPolyPatch::typeName)
244 if (
patchi >= patches.size())
247 <<
"Non-processor patches not synchronised." 250 <<
" has only " << patches.size()
251 <<
" patches, master has " 263 <<
"Non-processor patches not synchronised." 265 <<
"Master patch " <<
patchi 270 <<
" has name:" << patches[
patchi].name()
271 <<
" type:" << patches[
patchi].type()
281 wordList pointZoneNames(mesh.pointZones().names());
283 wordList faceZoneNames(mesh.faceZones().names());
285 wordList cellZoneNames(mesh.cellZones().names());
291 mesh.pointZones().clear();
292 mesh.faceZones().clear();
293 mesh.cellZones().clear();
295 List<pointZone*> pz(pointZoneNames.size());
298 pz[i] =
new pointZone
306 List<faceZone*> fz(faceZoneNames.size());
318 List<cellZone*> cz(cellZoneNames.size());
329 mesh.addZones(pz, fz, cz);
336 const fileName meshFiles = io.time().path()/io.instance()/meshSubDir;
350 mesh.boundaryMesh().checkDefinition(
true);
352 mesh.boundaryMesh().checkParallelSync(
true);
354 mesh.cellZones().checkDefinition(
true);
355 mesh.cellZones().checkParallelSync(
true);
356 mesh.faceZones().checkDefinition(
true);
357 mesh.faceZones().checkParallelSync(
true);
358 mesh.pointZones().checkDefinition(
true);
359 mesh.pointZones().checkParallelSync(
true);
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
static int masterNo()
Process index of the master.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
static int firstSlave()
Process index of first slave.
static word meshSubDir
Return the mesh sub-directory name (usually "polyMesh")
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
static word defaultRegion
Return the default region name.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static bool master(const label communicator=0)
Am I the master process.
Xfer< T > xferCopy(const T &)
Construct by copying the contents of the arg.
List< bool > boolList
Bool container classes.
vectorField pointField
pointField is a vectorField.
Load or create (0 size) a mesh. Used in distributing meshes to a larger number of processors...
static const word null
An empty word.
List< label > labelList
A List of labels.
const fileOperation & fileHandler()
Get current file handler.
defineTemplateTypeNameAndDebug(IOPtrList< ensightPart >, 0)
static void scatter(const List< commsStruct > &comms, T &Value, const int tag, const label comm)
Scatter data. Distribute without modification. Reverse of gather.
bool rmDir(const fileName &)
Remove a directory and its contents.
autoPtr< fvMesh > loadOrCreateMesh(const IOobject &io)
Load (if it exists) or create zero cell mesh given an IOobject:
word name(const complex &)
Return a string representation of a complex.
fileName::Type type(const fileName &, const bool followLink=true)
Return the file type: DIRECTORY or FILE.
List< word > wordList
A List of words.
static bool & parRun()
Is this a parallel run?
virtual bool isDir(const fileName &, const bool followLink=true) const =0
Does the name exist as a DIRECTORY in the file system?
static autoPtr< polyPatch > New(const word &patchType, const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm)
Return a pointer to a new patch created on freestore from.
static int lastSlave(const label communicator=0)
Process index of last slave.