19 if (doDecompose && UPstream::parRun())
22 faMeshReconstructor reconstructor(aMesh, IOobjectOption::LAZY_READ);
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;
60 refPtr<fileOperation> newHandler(fileOperation::NewUncollated());
62 const bool oldDistributed =
fileHandler().distributed();
66 if (UPstream::master())
68 haveMeshOnProc.set(UPstream::myProcNo());
69 subsetter.reset(
new faMeshSubset(serialMesh));
71 const bool oldParRun = UPstream::parRun(
false);
73 objects = IOobjectList
78 IOobjectOption::NO_REGISTER
81 UPstream::parRun(oldParRun);
88 areaFieldsCache.readAllFields
97 const label nAreaFields = areaFieldsCache.size();
101 Info<<
"Decomposing " << nAreaFields <<
" area fields" <<
nl;
103 faFieldDecomposer fieldDecomposer
107 reconstructor.edgeProcAddressing(),
108 reconstructor.faceProcAddressing(),
109 reconstructor.boundaryProcAddressing()
113 areaFieldsCache.decomposeAllFields(fieldDecomposer,
true);
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
refPtr< fileOperation > fileHandler(std::nullptr_t)
Delete current file handler - forwards to fileOperation::handler()
messageStream Info
Information stream (stdout output on master, null elsewhere)