Commit 66ba2dd6 authored by Andrew Heather's avatar Andrew Heather
Browse files

ENH: check case tool - updated command line arguments:

-dry-run : perform check only and no writing
-dry-run-write: perform check and write to the next time step.  This
also triggers function objects that fire on the call to write()
parent b50bbc7e
Foam::argList::addBoolOption
(
"check",
"Check set-up only using a single time step"
"dry-run",
"Check case set-up only using a single time step"
);
Foam::argList::addBoolOption
(
"dry-run-write",
"Check case set-up and write only using a single time step"
);
Foam::autoPtr<Foam::fvMesh> meshPtr(nullptr);
if (args.optionFound("check"))
if (args.optionFound("dry-run") || args.optionFound("dry-run-write"))
{
Info<< "Operating in 'check' mode: case will run for 1 time step. "
<< "All checks assumed OK on a clean exit" << endl;
Foam::Info
<< "Operating in 'dry-run' mode: case will run for 1 time step. "
<< "All checks assumed OK on a clean exit" << Foam::endl;
Field<label>::allowConstructFromLargerSize = true;
Field<scalar>::allowConstructFromLargerSize = true;
Field<vector>::allowConstructFromLargerSize = true;
Field<sphericalTensor>::allowConstructFromLargerSize = true;
Field<symmTensor>::allowConstructFromLargerSize = true;
Field<tensor>::allowConstructFromLargerSize = true;
Foam::FieldBase::allowConstructFromLargerSize = true;
// Create a simplified 1D mesh and attempt to re-create boundary conditions
meshPtr = dummyFvMesh::equivalent1DMesh(runTime);
meshPtr.reset(Foam::dummyFvMesh::equivalent1DMesh(runTime));
// Stopping after 1 iteration of the simplified mesh
// Note: using saWriteNow to trigger writing/execution of function objects
// - saNoWriteNow will only trigger the function object execute function
// Note: using saNoWriteNow will only trigger the function object execute
// function and not the write function
runTime.stopAt(Foam::Time::saNoWriteNow);
// runTime.stopAt(Foam::Time::saWriteNow);
if (args.optionFound("dry-run-write"))
{
// Stopping after 1 iteration of the simplified mesh
// Note: using saWriteNow to trigger writing/execution of function
// objects
runTime.stopAt(Foam::Time::saWriteNow);
}
Foam::functionObject::outputPrefix = "postProcessing-dry-run";
}
else
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment