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:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user