ENH: add ZoneMesh::findIndices() method

STYLE: use findIndices instead of findAll for coordinateSystems
This commit is contained in:
Mark Olesen
2010-07-26 13:18:59 +02:00
parent 0b9ff0aa53
commit 12837a67d5
9 changed files with 137 additions and 78 deletions

View File

@ -206,8 +206,8 @@ int main(int argc, char *argv[])
{
const word csName = args["from"];
label csId = csLst.find(csName);
if (csId < 0)
const label csIndex = csLst.findIndex(csName);
if (csIndex < 0)
{
FatalErrorIn(args.executable())
<< "Cannot find -from " << csName << nl
@ -215,15 +215,15 @@ int main(int argc, char *argv[])
<< exit(FatalError);
}
fromCsys.reset(new coordinateSystem(csLst[csId]));
fromCsys.reset(new coordinateSystem(csLst[csIndex]));
}
if (args.optionFound("to"))
{
const word csName = args["to"];
label csId = csLst.find(csName);
if (csId < 0)
const label csIndex = csLst.findIndex(csName);
if (csIndex < 0)
{
FatalErrorIn(args.executable())
<< "Cannot find -to " << csName << nl
@ -231,7 +231,7 @@ int main(int argc, char *argv[])
<< exit(FatalError);
}
toCsys.reset(new coordinateSystem(csLst[csId]));
toCsys.reset(new coordinateSystem(csLst[csIndex]));
}