From b2467ff4424c941652a0d07930e366e608701508 Mon Sep 17 00:00:00 2001
From: Mark Olesen <Mark.Olesen@esi-group.com>
Date: Mon, 8 Jun 2020 20:55:23 +0200
Subject: [PATCH] STYLE: minor code style changes

---
 .../db/functionObjects/writeFile/writeFile.C  |  3 +-
 .../poolEvaporation/0.orig/T                  | 28 +++++++++----------
 2 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/src/OpenFOAM/db/functionObjects/writeFile/writeFile.C b/src/OpenFOAM/db/functionObjects/writeFile/writeFile.C
index 6b88808921a..39870e47553 100644
--- a/src/OpenFOAM/db/functionObjects/writeFile/writeFile.C
+++ b/src/OpenFOAM/db/functionObjects/writeFile/writeFile.C
@@ -221,8 +221,7 @@ bool Foam::functionObjects::writeFile::read(const dictionary& dict)
             labelMinMax::ge(0)
         );
 
-    updateHeader_ =
-        dict.lookupOrDefault("updateHeader", updateHeader_);
+    updateHeader_ = dict.getOrDefault("updateHeader", updateHeader_);
 
     // Only write on master
     writeToFile_ =
diff --git a/tutorials/multiphase/icoReactingMultiPhaseInterFoam/poolEvaporation/0.orig/T b/tutorials/multiphase/icoReactingMultiPhaseInterFoam/poolEvaporation/0.orig/T
index ff88c273285..73adcf8244e 100644
--- a/tutorials/multiphase/icoReactingMultiPhaseInterFoam/poolEvaporation/0.orig/T
+++ b/tutorials/multiphase/icoReactingMultiPhaseInterFoam/poolEvaporation/0.orig/T
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  v1912                                 |
+|  \\    /   O peration     | Version:  v2006                                 |
 |   \\  /    A nd           | Website:  www.openfoam.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -27,33 +27,33 @@ boundaryField
         Ta              constant 300.0;
         h
         {
-            type            coded;
+            type        coded;
+
             codeInclude
             #{
                 #include "volFields.H"
             #};
+
             code
             #{
-                const objectRegistry& Db =
-                    patch_.boundaryMesh().mesh().thisDb();
-
-                const volScalarField& T =
-                    Db.lookupObject<volScalarField>("T");
+                const auto& T =
+                    patch_.boundaryMesh().mesh()
+                        .lookupObject<volScalarField>("T");
 
-                tmp<scalarField> thtc(new scalarField(patch_.size(), 300.0));
-                scalarField& htc =  thtc.ref();
+                auto thtc = tmp<scalarField>::New(patch_.size(), 300.0);
+                auto& htc = thtc.ref();
 
                 const scalarField Tp(T.boundaryField()[patch_.index()]);
 
-                forAll (htc, faceI)
+                forAll(htc, facei)
                 {
-                    if (Tp[faceI] >= 1000.0)
+                    if (Tp[facei] >= 1000.0)
                     {
-                        htc[faceI] = 800;
+                        htc[facei] = 800;
                     }
-                    else if (1000.0 >= Tp[faceI] >= 600.0)
+                    else if (Tp[facei] >= 600.0)
                     {
-                         htc[faceI] = 0.2*Tp[faceI]+200;
+                        htc[facei] = 0.2*Tp[facei]+200;
                     }
                 }
 
-- 
GitLab