Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes
workflowControls Class Reference
Collaboration diagram for workflowControls:
Collaboration graph
[legend]

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< wordcompletedSteps () 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, labelpopulateWorkflowSteps ()
 populate workflowSteps with values More...
 

Private Attributes

polyMeshGenmesh_
 reference to the mesh More...
 
word currentStep_
 current step in the workflow More...
 
word restartAfterStep_
 step for restarting the workflow More...
 
DynList< wordcompletedStepsBeforeRestart_
 completed step before restart More...
 
bool isRestarted_
 holds information whether the workflow has been restarted More...
 

Static Private Attributes

static const std::map< word, labelworkflowSteps_
 

Detailed Description

Definition at line 55 of file workflowControls.H.

Constructor & Destructor Documentation

◆ workflowControls()

◆ ~workflowControls()

Definition at line 271 of file workflowControls.C.

Member Function Documentation

◆ restartRequested()

bool restartRequested ( ) const
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setStepCompleted()

void setStepCompleted ( ) const
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isStepCompleted()

bool isStepCompleted ( ) const
private

is the current step already completed

Definition at line 94 of file workflowControls.C.

References workflowControls::currentStep_, workflowControls::lastCompletedStep(), and workflowControls::workflowSteps_.

Here is the call graph for this function:

◆ exitAfterCurrentStep()

bool exitAfterCurrentStep ( ) const
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lastCompletedStep()

word lastCompletedStep ( ) const
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ completedSteps()

DynList< word > completedSteps ( ) const
private

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clearCompletedSteps()

void clearCompletedSteps ( )
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stopAfterCurrentStep()

bool stopAfterCurrentStep ( ) const
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ runAfterCurrentStep()

bool runAfterCurrentStep ( ) const
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ populateWorkflowSteps()

std::map< word, label > populateWorkflowSteps ( )
staticprivate

populate workflowSteps with values

Definition at line 231 of file workflowControls.C.

◆ runCurrentStep()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ workflowCompleted()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ mesh_

polyMeshGen& mesh_
private

◆ currentStep_

word currentStep_
private

◆ restartAfterStep_

word restartAfterStep_
private

step for restarting the workflow

Definition at line 65 of file workflowControls.H.

Referenced by workflowControls::runAfterCurrentStep(), and workflowControls::workflowControls().

◆ completedStepsBeforeRestart_

DynList<word> completedStepsBeforeRestart_
private

completed step before restart

Definition at line 68 of file workflowControls.H.

Referenced by workflowControls::runCurrentStep(), and workflowControls::workflowControls().

◆ isRestarted_

bool isRestarted_
mutableprivate

holds information whether the workflow has been restarted

Definition at line 71 of file workflowControls.H.

Referenced by workflowControls::runAfterCurrentStep(), and workflowControls::runCurrentStep().

◆ workflowSteps_

const std::map< word, label > workflowSteps_
staticprivate

The documentation for this class was generated from the following files:
Foam::workflowControls::populateWorkflowSteps
static std::map< word, label > populateWorkflowSteps()
populate workflowSteps with values
Definition: workflowControls.C:231