ENH: change argList get<> and getList<> from read<>, readList<>

- more consistent with dictionary method naming. The get<> or
  getList<> returns a value, doesn't read into a existing location.
This commit is contained in:
Mark Olesen
2018-08-09 11:27:36 +02:00
parent b5162f91fc
commit ae36f5f504
47 changed files with 101 additions and 99 deletions

View File

@ -91,7 +91,7 @@ int main(int argc, char *argv[])
<< " s\n" << endl << endl;
const scalar featureAngle = args.read<scalar>(1);
const scalar featureAngle = args.get<scalar>(1);
const bool overwrite = args.found("overwrite");
const scalar minCos = Foam::cos(degToRad(featureAngle));

View File

@ -48,7 +48,7 @@ int main(int argc, char *argv[])
#include "setRootCase.H"
const scalar scaleFactor = args.read<scalar>(1);
const scalar scaleFactor = args.get<scalar>(1);
#include "createTime.H"
#include "createNamedMesh.H"

View File

@ -58,7 +58,7 @@ int main(int argc, char *argv[])
#include "createNamedPolyMesh.H"
const word zoneName = args[1];
const point outsidePoint = args.read<point>(2);
const point outsidePoint = args.get<point>(2);
Info<< "Orienting faceZone " << zoneName
<< " such that " << outsidePoint << " is outside"

View File

@ -401,7 +401,7 @@ int main(int argc, char *argv[])
}
}
const scalar featureAngle = args.read<scalar>(1);
const scalar featureAngle = args.get<scalar>(1);
const scalar minCos = Foam::cos(degToRad(featureAngle));
Info<< "Feature:" << featureAngle << endl

View File

@ -83,11 +83,8 @@ int main(int argc, char *argv[])
#include "setRootCase.H"
#include "createTime.H"
vector n1(args.read<vector>(1));
n1 /= mag(n1);
vector n2(args.read<vector>(2));
n2 /= mag(n2);
const vector n1(args.get<vector>(1).normalise());
const vector n2(args.get<vector>(2).normalise());
const tensor rotT(rotationTensor(n1, n2));

View File

@ -391,7 +391,6 @@ int main(int argc, char *argv[])
meshInstance = fieldsInstance;
}
Info<< "Reading cell set from " << selectionName << nl << endl;
@ -400,12 +399,12 @@ int main(int argc, char *argv[])
if (args.found("patches"))
{
const wordRes patchNames(args.readList<wordRe>("patches"));
const wordRes patchNames(args.getList<wordRe>("patches"));
exposedPatchIDs = mesh.boundaryMesh().patchSet(patchNames).sortedToc();
Info<< "Adding exposed internal faces to nearest of patches "
<< patchNames << nl << endl;
<< flatOutput(patchNames) << nl << endl;
if (exposedPatchIDs.empty())
{
@ -414,7 +413,6 @@ int main(int argc, char *argv[])
<< mesh.boundaryMesh().names()
<< exit(FatalError);
}
}
else if (args.found("patch"))
{

View File

@ -363,7 +363,7 @@ int main(int argc, char *argv[])
List<scalar> scaling;
if (args.readListIfPresent("scale", scaling))
{
// readList handles single or multiple values
// readListIfPresent handles single or multiple values
if (scaling.size() == 1)
{