Files
openfoam/src/finiteVolume/cfdTools/general/include/readTimeControls.H
Mark Olesen 80b8071e75 ENH: add default control values to ease SIMPLE->PIMPLE transition
- add const-ness for control variables

- drop unused fluxGradp variable

- use lookupOrDefault instead of found/lookup combination
2010-05-20 08:24:55 +02:00

42 lines
1.6 KiB
C

/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Global
readTimeControls
Description
Read the control parameters used by setDeltaT
\*---------------------------------------------------------------------------*/
const bool adjustTimeStep =
runTime.controlDict().lookupOrDefault<bool>("adjustTimeStep", false);
scalar maxCo =
runTime.controlDict().lookupOrDefault<scalar>("maxCo", 1.0);
scalar maxDeltaT =
runTime.controlDict().lookupOrDefault<scalar>("maxDeltaT", GREAT);
// ************************************************************************* //