ENH: setsToZones: allow -time options

This commit is contained in:
mattijs
2012-11-13 13:57:14 +00:00
parent 434e2fafcd
commit 14da496a0e
2 changed files with 6 additions and 11 deletions

View File

@ -2,4 +2,5 @@ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \
-lmeshTools
-lmeshTools \
-lsampling

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -48,6 +48,7 @@ Description
#include "IFstream.H"
#include "IOobjectList.H"
#include "SortableList.H"
#include "timeSelector.H"
using namespace Foam;
@ -57,6 +58,7 @@ using namespace Foam;
int main(int argc, char *argv[])
{
timeSelector::addOptions(true, false);
argList::addNote
(
"add point/face/cell Zones from similar named point/face/cell Sets"
@ -76,15 +78,7 @@ int main(int argc, char *argv[])
const bool noFlipMap = args.optionFound("noFlipMap");
// Get times list
instantList Times = runTime.times();
label startTime = Times.size()-1;
label endTime = Times.size();
// check -time and -latestTime options
#include "checkTimeOption.H"
runTime.setTime(Times[startTime], startTime);
(void)timeSelector::selectIfPresent(runTime, args);
#include "createNamedPolyMesh.H"