LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File openfoam-fieldAverage-Update-to-23x.patch of Package openfoam22x (Project home:dkxls:cfd)

diff -U 3 -H -d -p -r -N -x lnInclude -x linux64GccDPOpt -x '*.dep' -x runTimePostData -x probes -x postData -x 'processor*' -x 'log.*' -x '*.gz' -x polyMesh -- OpenFOAM-2.2.x/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.C OpenFOAM-2.3.x/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.C
--- OpenFOAM-2.2.x/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.C	2015-01-25 17:40:12.000000000 +0200
+++ OpenFOAM-2.3.x/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.C	2015-03-28 12:13:01.000000000 +0200
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -111,8 +111,6 @@ void Foam::fieldAverage::calcAverages()
         initialize();
     }
 
-    Info<< type() << " " << name_ << " output:" << nl;
-
     const label currentTimeIndex =
         static_cast<const fvMesh&>(obr_).time().timeIndex();
 
@@ -125,6 +123,8 @@ void Foam::fieldAverage::calcAverages()
         prevTimeIndex_ = currentTimeIndex;
     }
 
+    Info<< type() << " " << name_ << " output:" << nl;
+
     Info<< "    Calculating averages" << nl;
 
     addMeanSqrToPrime2Mean<scalar, scalar>();
@@ -317,14 +317,19 @@ void Foam::fieldAverage::execute()
     if (active_)
     {
         calcAverages();
-
         Info<< endl;
     }
 }
 
 
 void Foam::fieldAverage::end()
-{}
+{
+    if (active_)
+    {
+        calcAverages();
+        Info<< endl;
+    }
+}
 
 
 void Foam::fieldAverage::timeSet()
@@ -335,7 +340,6 @@ void Foam::fieldAverage::write()
 {
     if (active_)
     {
-        calcAverages();
         writeAverages();
         writeAveragingProperties();