mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
stringOps::inplaceExpand: Use scientific rather than fixed format for scalar values
Resolves bug-report https://bugs.openfoam.org/view.php?id=2889
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -270,7 +270,7 @@ Foam::string Foam::stringOps::getVariable
|
||||
OStringStream buf;
|
||||
// Force floating point numbers to be printed with at least
|
||||
// some decimal digits.
|
||||
buf << fixed;
|
||||
buf << scientific;
|
||||
buf.precision(IOstream::defaultPrecision());
|
||||
|
||||
// fail for non-primitiveEntry
|
||||
@ -585,7 +585,7 @@ Foam::string& Foam::stringOps::inplaceExpand
|
||||
OStringStream buf;
|
||||
// Force floating point numbers to be printed with at least
|
||||
// some decimal digits.
|
||||
buf << fixed;
|
||||
buf << scientific;
|
||||
buf.precision(IOstream::defaultPrecision());
|
||||
if (ePtr->isDict())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user