Public Member Functions | |
workflowControls (polyMeshGen &mesh) | |
Construct from IOdictionary. More... | |
~workflowControls () | |
bool | runCurrentStep (const word &) |
shall the process run the current step More... | |
void | workflowCompleted () |
set the workflow completed flag More... | |
Private Member Functions | |
bool | restartRequested () const |
check if restart is requested More... | |
void | setStepCompleted () const |
sets the current step to completed More... | |
bool | isStepCompleted () const |
is the current step already completed More... | |
bool | exitAfterCurrentStep () const |
shall the procedure stop after the current step More... | |
word | lastCompletedStep () const |
return the latest completed step More... | |
DynList< word > | completedSteps () const |
return the names of completed steps More... | |
void | clearCompletedSteps () |
remove completedStep from the dictionary More... | |
bool | stopAfterCurrentStep () const |
shall the workflow stop after the current step More... | |
bool | runAfterCurrentStep () const |
shall the workflow run after the current step More... | |
Static Private Member Functions | |
static std::map< word, label > | populateWorkflowSteps () |
populate workflowSteps with values More... | |
Private Attributes | |
polyMeshGen & | mesh_ |
reference to the mesh More... | |
word | currentStep_ |
current step in the workflow More... | |
word | restartAfterStep_ |
step for restarting the workflow More... | |
DynList< word > | completedStepsBeforeRestart_ |
completed step before restart More... | |
bool | isRestarted_ |
holds information whether the workflow has been restarted More... | |
Static Private Attributes | |
static const std::map< word, label > | workflowSteps_ |
Definition at line 55 of file workflowControls.H.
workflowControls | ( | polyMeshGen & | mesh | ) |
Construct from IOdictionary.
Definition at line 249 of file workflowControls.C.
References workflowControls::clearCompletedSteps(), workflowControls::completedSteps(), workflowControls::completedStepsBeforeRestart_, workflowControls::lastCompletedStep(), workflowControls::restartAfterStep_, and workflowControls::restartRequested().
~workflowControls | ( | ) |
Definition at line 271 of file workflowControls.C.
|
private |
check if restart is requested
Definition at line 41 of file workflowControls.C.
References dictionary::found(), dictionary::isDict(), objectRegistry::lookupObject(), workflowControls::mesh_, Foam::readBool(), polyMeshGenPoints::returnTime(), and dictionary::subDict().
Referenced by workflowControls::runCurrentStep(), and workflowControls::workflowControls().
|
private |
sets the current step to completed
Definition at line 67 of file workflowControls.C.
References dictionary::add(), workflowControls::completedSteps(), workflowControls::currentStep_, dictionary::found(), dictionary::lookup(), workflowControls::mesh_, polyMeshGen::metaData(), and dictionary::set().
Referenced by workflowControls::runCurrentStep(), and workflowControls::stopAfterCurrentStep().
|
private |
is the current step already completed
Definition at line 94 of file workflowControls.C.
References workflowControls::currentStep_, workflowControls::lastCompletedStep(), and workflowControls::workflowSteps_.
|
private |
shall the procedure stop after the current step
Definition at line 110 of file workflowControls.C.
References workflowControls::currentStep_, dictionary::found(), dictionary::isDict(), objectRegistry::lookupObject(), workflowControls::mesh_, polyMeshGenPoints::returnTime(), and dictionary::subDict().
Referenced by workflowControls::stopAfterCurrentStep().
|
private |
return the latest completed step
Definition at line 136 of file workflowControls.C.
References dictionary::found(), dictionary::lookup(), workflowControls::mesh_, and polyMeshGen::metaData().
Referenced by workflowControls::isStepCompleted(), and workflowControls::workflowControls().
return the names of completed steps
Definition at line 148 of file workflowControls.C.
References dictionary::found(), dictionary::lookup(), workflowControls::mesh_, and polyMeshGen::metaData().
Referenced by workflowControls::setStepCompleted(), and workflowControls::workflowControls().
|
private |
remove completedStep from the dictionary
Definition at line 158 of file workflowControls.C.
References workflowControls::mesh_, polyMeshGen::metaData(), and dictionary::remove().
Referenced by workflowControls::workflowControls().
|
private |
shall the workflow stop after the current step
Definition at line 164 of file workflowControls.C.
References workflowControls::currentStep_, Foam::endl(), Foam::exit(), workflowControls::exitAfterCurrentStep(), Foam::FatalError, FatalErrorIn, Foam::Info, workflowControls::mesh_, Foam::returnReduce(), workflowControls::setStepCompleted(), and polyMeshGen::write().
Referenced by workflowControls::runCurrentStep().
|
private |
shall the workflow run after the current step
Definition at line 202 of file workflowControls.C.
References workflowControls::currentStep_, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, Foam::Info, workflowControls::isRestarted_, workflowControls::mesh_, polyMeshGen::read(), and workflowControls::restartAfterStep_.
Referenced by workflowControls::runCurrentStep().
populate workflowSteps with values
Definition at line 231 of file workflowControls.C.
bool runCurrentStep | ( | const word & | stepName | ) |
shall the process run the current step
this step has already been executed
the process shall exit within the stopAfterCurrentStep function
check if the requested step exists in the database of steps
Definition at line 276 of file workflowControls.C.
References DynList< T, staticSize >::append(), workflowControls::completedStepsBeforeRestart_, workflowControls::currentStep_, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, Foam::Info, workflowControls::isRestarted_, workflowControls::restartRequested(), workflowControls::runAfterCurrentStep(), workflowControls::setStepCompleted(), workflowControls::stopAfterCurrentStep(), and workflowControls::workflowSteps_.
Referenced by cartesian2DMeshGenerator::generateMesh(), cartesianMeshGenerator::generateMesh(), tetMeshGenerator::generateMesh(), and voronoiMeshGenerator::generateMesh().
void workflowCompleted | ( | ) |
set the workflow completed flag
Definition at line 323 of file workflowControls.C.
References dictionary::found(), workflowControls::mesh_, polyMeshGen::metaData(), and dictionary::remove().
Referenced by cartesian2DMeshGenerator::generateMesh(), tetMeshGenerator::generateMesh(), and cartesianMeshGenerator::generateMesh().
|
private |
reference to the mesh
Definition at line 59 of file workflowControls.H.
Referenced by workflowControls::clearCompletedSteps(), workflowControls::completedSteps(), workflowControls::exitAfterCurrentStep(), workflowControls::lastCompletedStep(), workflowControls::restartRequested(), workflowControls::runAfterCurrentStep(), workflowControls::setStepCompleted(), workflowControls::stopAfterCurrentStep(), and workflowControls::workflowCompleted().
|
private |
current step in the workflow
Definition at line 62 of file workflowControls.H.
Referenced by workflowControls::exitAfterCurrentStep(), workflowControls::isStepCompleted(), workflowControls::runAfterCurrentStep(), workflowControls::runCurrentStep(), workflowControls::setStepCompleted(), and workflowControls::stopAfterCurrentStep().
|
private |
step for restarting the workflow
Definition at line 65 of file workflowControls.H.
Referenced by workflowControls::runAfterCurrentStep(), and workflowControls::workflowControls().
completed step before restart
Definition at line 68 of file workflowControls.H.
Referenced by workflowControls::runCurrentStep(), and workflowControls::workflowControls().
|
mutableprivate |
holds information whether the workflow has been restarted
Definition at line 71 of file workflowControls.H.
Referenced by workflowControls::runAfterCurrentStep(), and workflowControls::runCurrentStep().
Definition at line 74 of file workflowControls.H.
Referenced by workflowControls::isStepCompleted(), and workflowControls::runCurrentStep().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.