19 if (doDecompose && Pstream::parRun())
22 faMeshReconstructor reconstructor(
aMesh, IOobjectOption::READ_IF_PRESENT);
24 if (!reconstructor.good())
26 Info<<
"Missing volume proc-addressing, " 27 "cannot generate area proc-addressing." <<
nl 28 <<
"Also skip decomposing area fields...." 33 reconstructor.writeMesh();
34 reconstructor.writeAddressing();
36 Info<<
"Wrote proc-addressing and serial mesh" <<
nl <<
endl;
41 faFieldDecomposer::fieldsCache areaFieldsCache;
43 const faMesh& serialMesh = reconstructor.mesh();
56 bitSet haveMeshOnProc;
57 std::unique_ptr<faMeshSubset> subsetter;
58 IOobjectList objects(0);
60 const bool oldDistributed =
fileHandler().distributed();
61 auto oldHandler =
fileHandler(fileOperation::NewUncollated());
64 if (Pstream::master())
66 haveMeshOnProc.set(Pstream::myProcNo());
67 subsetter.reset(
new faMeshSubset(serialMesh));
69 const bool oldParRun = Pstream::parRun(
false);
71 objects = IOobjectList(serialMesh.time(),
runTime.timeName());
73 Pstream::parRun(oldParRun);
83 areaFieldsCache.readAllFields
92 const label nAreaFields = areaFieldsCache.size();
96 Info<<
"Decomposing " << nAreaFields <<
" area fields" <<
nl;
98 faFieldDecomposer fieldDecomposer
102 reconstructor.edgeProcAddressing(),
103 reconstructor.faceProcAddressing(),
104 reconstructor.boundaryProcAddressing()
108 areaFieldsCache.decomposeAllFields(fieldDecomposer,
true);
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
autoPtr< fileOperation > fileHandler(std::nullptr_t)
Delete current file handler.
messageStream Info
Information stream (stdout output on master, null elsewhere)