From fb19cb073b6942668b657264177bd6913801875e Mon Sep 17 00:00:00 2001
From: andy <andy>
Date: Tue, 25 Oct 2011 11:50:31 +0100
Subject: [PATCH] BUG: pimpleControl: do not store *PrevIter* fields

---
 .../solutionControl/solutionControlTemplates.C            | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControlTemplates.C b/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControlTemplates.C
index a0f0a3579bb..2b20a75ae22 100644
--- a/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControlTemplates.C
+++ b/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControlTemplates.C
@@ -41,12 +41,16 @@ void Foam::solutionControl::storePrevIter() const
     {
         GeoField& fld = const_cast<GeoField&>(*iter());
 
-        if (mesh_.relaxField(fld.name()))
+        const word& fName = fld.name();
+
+        size_t prevIterField = fName.find("PrevIter");
+
+        if ((prevIterField == word::npos) && mesh_.relaxField(fName))
         {
             if (debug)
             {
                 Info<< algorithmName_ << ": storing previous iter for "
-                    << fld.name() << endl;
+                    << fName << endl;
             }
 
             fld.storePrevIter();
-- 
GitLab