Test-findTimes.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
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
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Description
25 
26 \*---------------------------------------------------------------------------*/
27 
28 #include "argList.H"
29 #include "Time.H"
30 #include "timeSelector.H"
31 
32 using namespace Foam;
33 
34 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
35 // Main program:
36 
37 int main(int argc, char *argv[])
38 {
40  // timeSelector::addOptions();
41  timeSelector::addOptions(true, true);
42 
43  #include "setRootCase.H"
44  #include "createTime.H"
45 
46  Info<< "Times found:" << runTime.times() << endl;
47 
49 
50  Info<< "Times selected:" << timeDirs << endl;
51  Info<< "\nEnd\n" << endl;
52 
53  return 0;
54 }
55 
56 
57 // ************************************************************************* //
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
Foam::Info
messageStream Info
argList.H
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
setRootCase.H
timeDirs
static instantList timeDirs
Definition: globalFoam.H:44
Foam::timeSelector::addOptions
static void addOptions(const bool constant=true, const bool withZero=false)
Add the options handled by timeSelector to argList::validOptions.
Definition: timeSelector.C:114
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
main
int main(int argc, char *argv[])
Definition: Test-findTimes.C:37
timeSelector.H
createTime.H
Foam::argList::noParallel
static void noParallel()
Remove the parallel options.
Definition: argList.C:161
Foam::timeSelector::select0
static instantList select0(Time &runTime, const argList &args)
Return the set of times selected based on the argList options.
Definition: timeSelector.C:253
args
Foam::argList args(argc, argv)