mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use the more succinct forms for argList (issue #307)
* args[int] vs args.args()[int] * args[word] vs args.options()[word] etc.
This commit is contained in:
@ -374,7 +374,7 @@ int main(int argc, char *argv[])
|
||||
#include "createTime.H"
|
||||
runTime.functionObjects().off();
|
||||
|
||||
const fileName exportName = args.args()[1];
|
||||
const fileName exportName = args[1];
|
||||
|
||||
Info<< "Reading surfaces as specified in the foamyHexMeshDict and"
|
||||
<< " writing a re-sampled surface to " << exportName
|
||||
|
||||
@ -36,6 +36,7 @@ Description
|
||||
#include "searchableSurfaces.H"
|
||||
#include "conformationSurfaces.H"
|
||||
#include "triSurfaceMesh.H"
|
||||
#include "labelVector.H"
|
||||
|
||||
#include "MarchingCubes.h"
|
||||
|
||||
@ -52,7 +53,6 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
"Re-sample surfaces used in foamyHexMesh operation"
|
||||
);
|
||||
//argList::validArgs.append("inputFile");
|
||||
argList::validArgs.append("(nx ny nz)");
|
||||
argList::validArgs.append("outputName");
|
||||
|
||||
@ -60,8 +60,8 @@ int main(int argc, char *argv[])
|
||||
#include "createTime.H"
|
||||
runTime.functionObjects().off();
|
||||
|
||||
const Vector<label> n(IStringStream(args.args()[1])());
|
||||
const fileName exportName = args.args()[2];
|
||||
const labelVector n(args.argRead<labelVector>(1));
|
||||
const fileName exportName = args[2];
|
||||
|
||||
Info<< "Reading surfaces as specified in the foamyHexMeshDict and"
|
||||
<< " writing re-sampled " << n << " to " << exportName
|
||||
|
||||
@ -93,10 +93,9 @@ int main(int argc, char *argv[])
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~
|
||||
CV2D mesh(runTime, controlDict);
|
||||
|
||||
if (args.options().found("pointsFile"))
|
||||
if (args.optionFound("pointsFile"))
|
||||
{
|
||||
fileName pointFileName(IStringStream(args.options()["pointsFile"])());
|
||||
mesh.insertPoints(pointFileName);
|
||||
mesh.insertPoints(args["pointsFile"]);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user