mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use newer argList access methods
This commit is contained in:
@ -93,7 +93,7 @@ int main(int argc, char *argv[])
|
||||
Info<< nl << "Specify an option! " << nl << endl;
|
||||
}
|
||||
|
||||
if (args.optionFound("labelListList"))
|
||||
if (args.found("labelListList"))
|
||||
{
|
||||
for (label argi=1; argi < args.size(); ++argi)
|
||||
{
|
||||
|
||||
@ -360,10 +360,9 @@ int main(int argc, char *argv[])
|
||||
const fileName surfFileName = args[1];
|
||||
const bool checkSelfIntersect = args.found("checkSelfIntersection");
|
||||
const bool splitNonManifold = args.found("splitNonManifold");
|
||||
const label outputThreshold =
|
||||
args.lookupOrDefault("outputThreshold", 10);
|
||||
const label outputThreshold = args.lookupOrDefault("outputThreshold", 10);
|
||||
word surfaceFormat;
|
||||
const bool writeSets = args.optionReadIfPresent("writeSets", surfaceFormat);
|
||||
const bool writeSets = args.readIfPresent("writeSets", surfaceFormat);
|
||||
|
||||
autoPtr<surfaceWriter> surfWriter;
|
||||
word edgeFormat;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Foam::autoPtr<Foam::fvMesh> meshPtr(nullptr);
|
||||
|
||||
if (args.optionFound("dry-run") || args.optionFound("dry-run-write"))
|
||||
if (args.found("dry-run") || args.found("dry-run-write"))
|
||||
{
|
||||
Foam::Info
|
||||
<< "Operating in 'dry-run' mode: case will run for 1 time step. "
|
||||
@ -11,18 +11,19 @@ if (args.optionFound("dry-run") || args.optionFound("dry-run-write"))
|
||||
// Create a simplified 1D mesh and attempt to re-create boundary conditions
|
||||
meshPtr.reset(new Foam::simplifiedMeshes::columnFvMesh(runTime));
|
||||
|
||||
// Stopping after 1 iteration of the simplified mesh
|
||||
// Note: using saNoWriteNow will only trigger the function object execute
|
||||
// function and not the write function
|
||||
runTime.stopAt(Foam::Time::saNoWriteNow);
|
||||
// Stop after 1 iteration of the simplified mesh
|
||||
|
||||
if (args.optionFound("dry-run-write"))
|
||||
if (args.found("dry-run-write"))
|
||||
{
|
||||
// Stopping after 1 iteration of the simplified mesh
|
||||
// Note: using saWriteNow to trigger writing/execution of function
|
||||
// objects
|
||||
// Using saWriteNow triggers function objects execute(), write()
|
||||
runTime.stopAt(Foam::Time::saWriteNow);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Using saNoWriteNow triggers function objects execute(),
|
||||
// but not write()
|
||||
runTime.stopAt(Foam::Time::saNoWriteNow);
|
||||
}
|
||||
|
||||
Foam::functionObject::outputPrefix = "postProcessing-dry-run";
|
||||
}
|
||||
|
||||
@ -95,26 +95,27 @@ Foam::autoPtr<Foam::dynamicFvMesh> Foam::dynamicFvMesh::New
|
||||
const Time& runTime
|
||||
)
|
||||
{
|
||||
if (args.optionFound("dry-run") || args.optionFound("dry-run-write"))
|
||||
if (args.found("dry-run") || args.found("dry-run-write"))
|
||||
{
|
||||
Info
|
||||
<< "Operating in 'dry-run' mode: case will run for 1 time step. "
|
||||
<< "All checks assumed OK on a clean exit" << Foam::endl;
|
||||
<< "All checks assumed OK on a clean exit" << endl;
|
||||
|
||||
FieldBase::allowConstructFromLargerSize = true;
|
||||
|
||||
// Stopping after 1 iteration of the simplified mesh
|
||||
// Note: using saNoWriteNow will only trigger the function object execute
|
||||
// function and not the write function
|
||||
runTime.stopAt(Foam::Time::saNoWriteNow);
|
||||
// Stop after 1 iteration of the simplified mesh
|
||||
|
||||
if (args.optionFound("dry-run-write"))
|
||||
if (args.found("dry-run-write"))
|
||||
{
|
||||
// Stopping after 1 iteration of the simplified mesh
|
||||
// Note: using saWriteNow to trigger writing/execution of function
|
||||
// objects
|
||||
// Using saWriteNow triggers function objects execute(), write()
|
||||
runTime.stopAt(Foam::Time::saWriteNow);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Using saNoWriteNow triggers function objects execute(),
|
||||
// but not write()
|
||||
runTime.stopAt(Foam::Time::saNoWriteNow);
|
||||
}
|
||||
|
||||
functionObject::outputPrefix = "postProcessing-dry-run";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user