1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 \*---------------------------------------------------------------------------*/
27 #include "dummyControlDict.H"
30 // * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * * //
34 defineTypeNameAndDebug(dummyControlDict, 0);
38 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
40 Foam::dummyControlDict::dummyControlDict()
42 this->set("deltaT", 1);
43 this->set("writeFrequency", 1);
47 Foam::dummyControlDict::dummyControlDict(const fileName& mcdFile)
49 this->set("deltaT", 1);
50 this->set("writeFrequency", 1);
52 IFstream mcdStream(mcdFile);
53 if (!mcdStream.good())
55 FatalErrorIn("dummyControlDict::dummyControlDict")
56 << "Cannot find the multiControlDict file " << mcdFile << "."
59 dictionary mcdDict(mcdStream);
60 if (mcdDict.subDict("multiSolverControl").found("timeFormat"))
62 word tf(mcdDict.subDict("multiSolverControl").lookup("timeFormat"));
63 this->set("timeFormat", tf);
65 if (mcdDict.subDict("multiSolverControl").found("timePrecision"))
71 mcdDict.subDict("multiSolverControl").lookup("timePrecision")
74 this->set("timePrecision", tp);
79 Foam::dummyControlDict::dummyControlDict(const dictionary& mcdDict)
81 this->set("deltaT", 1);
82 this->set("writeFrequency", 1);
84 if (mcdDict.subDict("multiSolverControl").found("timeFormat"))
86 word tf(mcdDict.subDict("multiSolverControl").lookup("timeFormat"));
87 this->set("timeFormat", tf);
89 if (mcdDict.subDict("multiSolverControl").found("timePrecision"))
95 mcdDict.subDict("multiSolverControl").lookup("timePrecision")
98 this->set("timePrecision", tp);
104 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
106 Foam::dummyControlDict::~dummyControlDict()
110 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //