mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: make ITstream positioning methods noexcept
ENH: add rank() method for compound tokens
ENH: add IOstream::minPrecision(unsigned)
- reduced typing, more expressive, no namespace ambiguity with max()
new: IOstream::minPrecision(10);
old: IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
STYLE: namespace qualify min/max for some buffer sizing [clang/hipp]
This commit is contained in:
@ -155,8 +155,8 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the precision of the points data to 10
|
||||
IOstream::defaultPrecision(10);
|
||||
// More precision (for points data)
|
||||
IOstream::minPrecision(10);
|
||||
|
||||
Info<< nl << "Write finite area mesh." << nl;
|
||||
aMesh.write();
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2018-2022 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2024 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -551,9 +551,13 @@ void subsetMesh
|
||||
Info<< "Writing refined mesh to time " << runTime.timeName() << nl
|
||||
<< endl;
|
||||
|
||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||
// More precision (for points data)
|
||||
const auto oldPrec = IOstream::minPrecision(10);
|
||||
|
||||
mesh.write();
|
||||
refLevel.write();
|
||||
|
||||
IOstream::defaultPrecision(oldPrec);
|
||||
}
|
||||
|
||||
// Update cutCells for removed cells.
|
||||
@ -922,9 +926,13 @@ int main(int argc, char *argv[])
|
||||
Info<< " Writing refined mesh to time " << runTime.timeName()
|
||||
<< nl << endl;
|
||||
|
||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||
// More precision (for points data)
|
||||
const auto oldPrec = IOstream::minPrecision(10);
|
||||
|
||||
mesh.write();
|
||||
refLevel.write();
|
||||
|
||||
IOstream::defaultPrecision(oldPrec);
|
||||
}
|
||||
|
||||
// Update mesh edge stats.
|
||||
@ -993,20 +1001,29 @@ int main(int argc, char *argv[])
|
||||
<< endl;
|
||||
|
||||
// Write final mesh
|
||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||
|
||||
// More precision (for points data)
|
||||
const auto oldPrec = IOstream::minPrecision(10);
|
||||
|
||||
mesh.write();
|
||||
refLevel.write();
|
||||
|
||||
IOstream::defaultPrecision(oldPrec);
|
||||
}
|
||||
else if (!writeMesh)
|
||||
{
|
||||
// Write final mesh. (will have been written already if writeMesh=true)
|
||||
|
||||
Info<< "Writing refined mesh to time " << runTime.timeName() << nl
|
||||
<< endl;
|
||||
|
||||
// Write final mesh. (will have been written already if writeMesh=true)
|
||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||
// More precision (for points data)
|
||||
const auto oldPrec = IOstream::minPrecision(10);
|
||||
|
||||
mesh.write();
|
||||
refLevel.write();
|
||||
|
||||
IOstream::defaultPrecision(oldPrec);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2024 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -704,8 +704,8 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
|
||||
// Set the precision of the points data to 10
|
||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||
// More precision (for points data)
|
||||
IOstream::minPrecision(10);
|
||||
|
||||
Info<< "Writing polyMesh" << endl;
|
||||
pShapeMesh.removeFiles();
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2022 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2024 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -198,8 +198,8 @@ int main(int argc, char *argv[])
|
||||
: IOstreamOption::BINARY
|
||||
);
|
||||
|
||||
// Increase the precision of the points data
|
||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||
// More precision (for points data)
|
||||
IOstream::minPrecision(10);
|
||||
|
||||
|
||||
// Read control options
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2024 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -756,8 +756,8 @@ int main(int argc, char *argv[])
|
||||
defaultFacesType
|
||||
);
|
||||
|
||||
// Set the precision of the points data to 10
|
||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||
// More precision (for points data)
|
||||
IOstream::minPrecision(10);
|
||||
|
||||
Info<< "Writing polyMesh" << endl;
|
||||
pShapeMesh.removeFiles();
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2022 OpenCFD Ltd.
|
||||
Copyright (C) 2022-2024 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -90,8 +90,8 @@ int main(int argc, char *argv[])
|
||||
argList args(argc, argv);
|
||||
Time runTime(args.rootPath(), args.caseName());
|
||||
|
||||
// Increase the precision of the points data
|
||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||
// More precision (for points data)
|
||||
IOstream::minPrecision(10);
|
||||
|
||||
const fileName geomFile(args.get<fileName>(1));
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2024 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -97,8 +97,8 @@ int main(int argc, char *argv[])
|
||||
: IOstreamOption::BINARY
|
||||
);
|
||||
|
||||
// increase the precision of the points data
|
||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||
// More precision (for points data)
|
||||
IOstream::minPrecision(10);
|
||||
|
||||
|
||||
fileFormats::FIREMeshReader reader
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016,2022 OpenFOAM Foundation
|
||||
Copyright (C) 2021 OpenCFD Ltd.
|
||||
Copyright (C) 2021-2024 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -1430,8 +1430,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
mesh.setInstance(runTime.constant());
|
||||
|
||||
// Set the precision of the points data to 10
|
||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||
// More precision (for points data)
|
||||
IOstream::minPrecision(10);
|
||||
|
||||
Info<< nl << "Writing mesh to " << mesh.objectPath() << endl;
|
||||
mesh.write();
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2024 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -1550,8 +1550,8 @@ int main(int argc, char *argv[])
|
||||
repatcher.repatch();
|
||||
|
||||
|
||||
// Set the precision of the points data to 10
|
||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||
// More precision (for points data)
|
||||
IOstream::minPrecision(10);
|
||||
|
||||
|
||||
// Re-do face matching to write sets
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2024 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -868,8 +868,8 @@ int main(int argc, char *argv[])
|
||||
defaultFacesType
|
||||
);
|
||||
|
||||
// Set the precision of the points data to 10
|
||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||
// More precision (for points data)
|
||||
IOstream::minPrecision(10);
|
||||
|
||||
Info<< "Writing polyMesh" << endl;
|
||||
pShapeMesh.removeFiles();
|
||||
|
||||
@ -1691,8 +1691,8 @@ int main(int argc, char *argv[])
|
||||
repatcher.changePatches(newPatches);
|
||||
}
|
||||
|
||||
// Set the precision of the points data to 10
|
||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||
// More precision (for points data)
|
||||
IOstream::minPrecision(10);
|
||||
|
||||
mesh.write();
|
||||
|
||||
|
||||
@ -1268,8 +1268,8 @@ int main(int argc, char *argv[])
|
||||
Info << endl;
|
||||
}
|
||||
|
||||
// Set the precision of the points data to 10
|
||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||
// More precision (for points data)
|
||||
IOstream::minPrecision(10);
|
||||
|
||||
mesh.write();
|
||||
|
||||
|
||||
@ -569,8 +569,8 @@ polyMesh pShapeMesh
|
||||
defaultFacesType
|
||||
);
|
||||
|
||||
// Set the precision of the points data to 10
|
||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||
// More precision (for points data)
|
||||
IOstream::minPrecision(10);
|
||||
|
||||
Info << "Writing polyMesh" << endl;
|
||||
pShapeMesh.removeFiles();
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2021 OpenCFD Ltd.
|
||||
Copyright (C) 2021-2024 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -161,8 +161,8 @@ int main(int argc, char *argv[])
|
||||
wordList()
|
||||
);
|
||||
|
||||
// Set the precision of the points data to 10
|
||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||
// More precision (for points data)
|
||||
IOstream::minPrecision(10);
|
||||
|
||||
Info<< "Writing mesh ..." << endl;
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2024 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -318,8 +318,8 @@ int main(int argc, char *argv[])
|
||||
patchPhysicalTypes
|
||||
);
|
||||
|
||||
// Set the precision of the points data to 10
|
||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||
// More precision (for points data)
|
||||
IOstream::minPrecision(10);
|
||||
|
||||
Info<< "Writing mesh ..." << endl;
|
||||
mesh.removeFiles();
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2024 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -264,8 +264,8 @@ int main(int argc, char *argv[])
|
||||
patchPhysicalTypes
|
||||
);
|
||||
|
||||
// Set the precision of the points data to 10
|
||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||
// More precision (for points data)
|
||||
IOstream::minPrecision(10);
|
||||
|
||||
Info<< "Writing polyMesh" << endl;
|
||||
pShapeMesh.removeFiles();
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2024 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -103,8 +103,8 @@ int main(int argc, char *argv[])
|
||||
: IOstreamOption::BINARY
|
||||
);
|
||||
|
||||
// Increase the precision of the points data
|
||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||
// More precision (for points data)
|
||||
IOstream::minPrecision(10);
|
||||
|
||||
|
||||
// Remove extensions and/or trailing '.'
|
||||
|
||||
@ -542,8 +542,8 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
}
|
||||
|
||||
// Set the precision of the points data to 10
|
||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||
// More precision (for points data)
|
||||
IOstream::minPrecision(10);
|
||||
|
||||
Info<< "Writing mesh to " << runTime.constant() << endl << endl;
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
Copyright (C) 2021 OpenCFD Ltd.
|
||||
Copyright (C) 2021-2024 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -88,8 +88,8 @@ int main(int argc, char *argv[])
|
||||
wordList()
|
||||
);
|
||||
|
||||
// Set the precision of the points data to 10
|
||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||
// More precision (for points data)
|
||||
IOstream::minPrecision(10);
|
||||
|
||||
Info<< "Writing mesh ..." << endl;
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2019-2022 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2024 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -231,8 +231,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
polyMesh& mesh = *meshPtr;
|
||||
|
||||
// Set the precision of the points data to 10
|
||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||
// More precision (for points data)
|
||||
IOstream::minPrecision(10);
|
||||
|
||||
Info<< nl << "Writing polyMesh with "
|
||||
<< mesh.cellZones().size() << " cellZones" << endl;
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2016-2023 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2024 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -289,8 +289,8 @@ int main(int argc, char *argv[])
|
||||
// Handle cyclic patches
|
||||
#include "handleCyclicPatches.H"
|
||||
|
||||
// Set the precision of the points data to 10
|
||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||
// More precision (for points data)
|
||||
IOstream::minPrecision(10);
|
||||
|
||||
Info<< nl << "Writing polyMesh with "
|
||||
<< mesh.cellZones().size() << " cellZones";
|
||||
|
||||
@ -67,8 +67,8 @@ scalar getMergeDistance
|
||||
const scalar mergeTol =
|
||||
args.getOrDefault<scalar>("mergeTol", defaultMergeTol);
|
||||
|
||||
scalar writeTol =
|
||||
Foam::pow(scalar(10), -scalar(IOstream::defaultPrecision()));
|
||||
const scalar writeTol =
|
||||
std::pow(scalar(10), -scalar(IOstream::defaultPrecision()));
|
||||
|
||||
Info<< "Merge tolerance : " << mergeTol << nl
|
||||
<< "Write tolerance : " << writeTol << endl;
|
||||
|
||||
@ -269,8 +269,8 @@ int main(int argc, char *argv[])
|
||||
mesh.setInstance(oldInstance);
|
||||
}
|
||||
|
||||
// Set the precision of the points data to 10
|
||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||
// More precision (for points data)
|
||||
IOstream::minPrecision(10);
|
||||
|
||||
mesh.write();
|
||||
|
||||
|
||||
@ -1456,8 +1456,8 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
// Set the precision of the points data to 10
|
||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||
// More precision (for points data)
|
||||
IOstream::minPrecision(10);
|
||||
|
||||
// Write resulting mesh
|
||||
forAll(meshes, meshi)
|
||||
|
||||
@ -100,8 +100,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
twoDCorr.correctPoints(points);
|
||||
|
||||
// Set the precision of the points data to 10
|
||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||
// More precision (for points data)
|
||||
IOstream::minPrecision(10);
|
||||
|
||||
Info<< "Writing points into directory " << points.path() << nl << endl;
|
||||
points.write();
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2024 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -101,8 +101,8 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
|
||||
// Set the precision of the points data to 10
|
||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||
// More precision (for points data)
|
||||
IOstream::minPrecision(10);
|
||||
|
||||
// Generate the mirrorred mesh
|
||||
const fvMesh& mMesh = mesh.mirrorMesh();
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019-2023 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2024 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -153,8 +153,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
points = transform(rotT, points);
|
||||
|
||||
// Set the precision of the points data to 10
|
||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||
// More precision (for points data)
|
||||
IOstream::minPrecision(10);
|
||||
|
||||
Info<< "Writing points into directory "
|
||||
<< runTime.relativePath(points.path()) << nl
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2017-2023 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2024 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -440,8 +440,8 @@ int main(int argc, char *argv[])
|
||||
//PtrList<surfaceTensorField> surfaceTensorFields;
|
||||
//ReadFields(mesh, objects, surfaceTensorFields);
|
||||
|
||||
// Increase precision for output mesh points
|
||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||
// More precision (for points data)
|
||||
IOstream::minPrecision(10);
|
||||
|
||||
polyTopoChanger stitcher(mesh, IOobject::NO_READ);
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2017-2022 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2024 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -552,9 +552,8 @@ int main(int argc, char *argv[])
|
||||
// Output scaling
|
||||
applyScaling(points, getScalingOpt("scale", args));
|
||||
|
||||
|
||||
// Set the precision of the points data to 10
|
||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||
// More precision (for points data)
|
||||
IOstream::minPrecision(10);
|
||||
|
||||
Info<< "Writing points into directory "
|
||||
<< runTime.relativePath(points.path()) << nl
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019-2023 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2024 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -735,8 +735,8 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets)
|
||||
}
|
||||
}
|
||||
|
||||
// Set the precision of the points data to be min 10
|
||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||
// More precision (for points data)
|
||||
IOstream::minPrecision(10);
|
||||
|
||||
procMesh.write();
|
||||
|
||||
|
||||
@ -657,7 +657,7 @@ int main(int argc, char *argv[])
|
||||
if (fullMatch || procMatch)
|
||||
{
|
||||
const scalar writeTol =
|
||||
Foam::pow(10.0, -scalar(IOstream::defaultPrecision()));
|
||||
std::pow(scalar(10), -scalar(IOstream::defaultPrecision()));
|
||||
|
||||
Info<< "Merge tolerance : " << mergeTol << nl
|
||||
<< "Write tolerance : " << writeTol << endl;
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2015-2023 OpenCFD Ltd.
|
||||
Copyright (C) 2015-2024 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -951,8 +951,8 @@ autoPtr<mapDistributePolyMesh> redistributeAndWrite
|
||||
}
|
||||
|
||||
|
||||
// Set the minimum write precision
|
||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||
// More precision (for points data)
|
||||
IOstream::minPrecision(10);
|
||||
|
||||
|
||||
if (!overwrite)
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2021 OpenCFD Ltd.
|
||||
Copyright (C) 2021-2024 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -47,8 +47,8 @@ using namespace Foam;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
// Increase the precision of the output for JANAF coefficients
|
||||
Ostream::defaultPrecision(10);
|
||||
// More precision (for output of JANAF coefficients)
|
||||
IOstream::minPrecision(10);
|
||||
|
||||
argList::addNote
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user