COMP: access transformedElements by reference, not copy

- better code style and seems to avoid triggering a gcc warning about
  possibly uninitialized values

COMP: JSONformatter writeEntry missing a return value

STYLE: accept 'json' for checkMesh write format

- consistent with caseInfo functionObject
This commit is contained in:
Mark Olesen
2023-12-15 11:44:41 +01:00
parent 79993bba43
commit 0352a224b7
6 changed files with 49 additions and 54 deletions

View File

@ -8,6 +8,7 @@ const Enum<writeChecksFormatType> writeChecksFormatTypeNames
{
{ writeChecksFormatType::none, "none" },
{ writeChecksFormatType::dictionary, "dictionary" },
{ writeChecksFormatType::JSON, "json" },
{ writeChecksFormatType::JSON, "JSON" },
};
@ -15,7 +16,7 @@ writeChecksFormatType writeChecksFormat(writeChecksFormatType::none);
auto writeMeshChecks = [](const fvMesh& mesh, const writeChecksFormatType fmt)
{
if (Pstream::master())
if (UPstream::master())
{
switch (fmt)
{
@ -33,15 +34,14 @@ auto writeMeshChecks = [](const fvMesh& mesh, const writeChecksFormatType fmt)
)
);
Info<< "Writing mesh data to " << os.name() << nl << endl;
data.writeHeader(os);
mesh.data().meshDict().write(os, false);
IOobject::writeEndDivider(os);
Info<< "Writing mesh data to " << data.objectPath()
<< nl << endl;
break;
}
case writeChecksFormatType::JSON: