From 0c24327b32c371eb69fb029156e74ad24274ef97 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Wed, 28 Jun 2017 14:20:28 +0100 Subject: [PATCH] functionObjects::fieldMinMax: corrected parallel operation of the file logging --- src/functionObjects/field/fieldMinMax/fieldMinMax.C | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/functionObjects/field/fieldMinMax/fieldMinMax.C b/src/functionObjects/field/fieldMinMax/fieldMinMax.C index d45f180b88..0d5c608cef 100644 --- a/src/functionObjects/field/fieldMinMax/fieldMinMax.C +++ b/src/functionObjects/field/fieldMinMax/fieldMinMax.C @@ -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-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -145,7 +145,7 @@ bool Foam::functionObjects::fieldMinMax::write() { logFiles::write(); - if (!location_) writeTime(file()); + if (Pstream::master() && !location_) writeTime(file()); Log << type() << " " << name() << " write:" << nl; forAll(fieldSet_, fieldi) @@ -157,7 +157,7 @@ bool Foam::functionObjects::fieldMinMax::write() calcMinMaxFields(fieldSet_[fieldi], mode_); } - if (!location_) file()<< endl; + if (Pstream::master() && !location_) file() << endl; Log << endl; return true;