24 auto& dataRef =
mesh.dataRef();
29 "geometry",
"cellCount",
mesh.globalData().nTotalCells()
33 "geometry",
"faceCount",
mesh.globalData().nTotalFaces()
37 "geometry",
"pointCount",
mesh.globalData().nTotalPoints()
41 "geometry",
"patchCount",
mesh.boundaryMesh().nNonProcessor()
46 DynamicList<Tuple2<word, label>> errorCounts;
47 DynamicList<Tuple2<word, label>> warningCounts;
54 auto* warnPtr = metricDict.findEntry(
"warningCount");
57 if (label nWarn(
readLabel(warnPtr->stream())); nWarn > 0)
59 warningCounts.emplace_back(iter().keyword(), nWarn);
63 auto* errPtr = metricDict.findEntry(
"errorCount");
66 if (label nErr(
readLabel(errPtr->stream())); nErr > 0)
68 errorCounts.emplace_back(iter().keyword(), nErr);
74 if (warningCounts.size())
76 dataRef.setMeshMetric(
"summary",
"warningCounts", warningCounts);
79 if (errorCounts.size())
81 dataRef.setMeshMetric(
"summary",
"state",
"fail");
82 dataRef.setMeshMetric(
"summary",
"errorCounts", errorCounts);
86 dataRef.setMeshMetric(
"summary",
"state",
"pass");
90 if (UPstream::master())
92 fileName
path(
mesh.time().globalPath()/
"checkMesh");
93 if (
mesh.name() != polyMesh::defaultRegion)
100 Info<<
"Writing mesh data to " << os.name() <<
nl <<
endl;
116 data.writeHeader(os);
118 mesh.data().meshDict().write(os,
false);
120 IOobject::writeEndDivider(os);
126 JSONformatter json(os);
127 json.writeDict(
mesh.data().meshDict());
const Enum< writeChecksFormatType > writeChecksFormatTypeNames
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
label readLabel(const char *buf)
Parse entire buffer as a label, skipping leading/trailing whitespace.
writeChecksFormatType writeChecksFormat(writeChecksFormatType::none)
fileName path(UMean.rootPath()/UMean.caseName()/"graphs"/UMean.instance())
messageStream Info
Information stream (stdout output on master, null elsewhere)
forAllConstIters(mixture.phases(), phase)