mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
adjust solvers and utilities to use new argList methods
- also drop various unused time options from src/OpenFOAM/include
This commit is contained in:
@ -87,7 +87,7 @@ int main(int argc, char *argv[])
|
||||
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||
|
||||
bool surfaceOnly = false;
|
||||
if (args.options().found("surface") or args.options().found("tri"))
|
||||
if (args.optionFound("surface") || args.optionFound("tri"))
|
||||
{
|
||||
surfaceOnly = true;
|
||||
}
|
||||
@ -98,16 +98,15 @@ int main(int argc, char *argv[])
|
||||
exportName = meshWriter::defaultSurfaceName;
|
||||
}
|
||||
|
||||
if (args.options().found("case"))
|
||||
if (args.optionFound("case"))
|
||||
{
|
||||
exportName += '-' + args.globalCaseName();
|
||||
}
|
||||
|
||||
// default: rescale from [m] to [mm]
|
||||
scalar scaleFactor = 1000;
|
||||
if (args.options().found("scale"))
|
||||
if (args.optionReadIfPresent("scale", scaleFactor))
|
||||
{
|
||||
scaleFactor = readScalar(IStringStream(args.options()["scale"])());
|
||||
if (scaleFactor <= 0)
|
||||
{
|
||||
scaleFactor = 1;
|
||||
@ -129,7 +128,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
meshWriters::STARCD writer(mesh, scaleFactor);
|
||||
|
||||
if (args.options().found("noBnd"))
|
||||
if (args.optionFound("noBnd"))
|
||||
{
|
||||
writer.noBoundary();
|
||||
}
|
||||
@ -142,7 +141,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (surfaceOnly)
|
||||
{
|
||||
if (args.options().found("tri"))
|
||||
if (args.optionFound("tri"))
|
||||
{
|
||||
writer.writeSurface(meshName, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user