From 4272820fcad1ad35c8d0e3d66283cd0d1e3fb862 Mon Sep 17 00:00:00 2001 From: Will Bainbridge <http://cfd.direct> Date: Thu, 4 Jan 2018 08:33:46 +0000 Subject: [PATCH] BUG: writeFile: Increased the number of value characters The number of characters needed to print a double in scientific format is 8 plus the number of decimal places; e.g., -6.453452e-231 (6 decimal places, 14 characters). This has been set in writeFile.C, replacing a value of 7. Presumably, the case of three digits in the exponent was not considered when this was first implemented. This change ensures at least one character of whitespace between tabulated numbers. This resolves bug report https://bugs.openfoam.org/view.php?id=2801 --- src/OpenFOAM/db/functionObjects/writeFile/writeFile.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/OpenFOAM/db/functionObjects/writeFile/writeFile.C b/src/OpenFOAM/db/functionObjects/writeFile/writeFile.C index ad68d9d4cdc..07944fad3e8 100644 --- a/src/OpenFOAM/db/functionObjects/writeFile/writeFile.C +++ b/src/OpenFOAM/db/functionObjects/writeFile/writeFile.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation \\/ M anipulation | Copyright (C) 2015-2018 OpenCFD Ltd. ------------------------------------------------------------------------------- License @@ -35,7 +35,7 @@ const Foam::word Foam::functionObjects::writeFile::outputPrefix "postProcessing" ); -Foam::label Foam::functionObjects::writeFile::addChars = 7; +Foam::label Foam::functionObjects::writeFile::addChars = 8; // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // -- GitLab