mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -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));
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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));
|
||||
|
||||
|
||||
@ -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"))
|
||||
{
|
||||
|
||||
@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user