mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add ZoneMesh::findIndices() method
STYLE: use findIndices instead of findAll for coordinateSystems
This commit is contained in:
@ -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]));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user