Go to the documentation of this file.
37 populateWorkflowSteps();
48 meshDict.
found(
"workflowControls") &&
49 meshDict.
isDict(
"workflowControls")
53 meshDict.
subDict(
"workflowControls");
98 if( latestStep.empty() )
104 if( latestVal == currVal )
117 meshDict.
found(
"workflowControls") &&
118 meshDict.
isDict(
"workflowControls")
122 meshDict.
subDict(
"workflowControls");
170 bool writeSuccess(
true);
179 writeSuccess =
false;
187 "bool workflowControls::stopAfterCurrentStep() const"
191 std::string message(
"Stopping after step ");
208 Info <<
"Reading mesh generated after step "
221 "bool workflowControls::restartAfterCurrentStep() const"
233 std::map<word, label> workflowSteps;
234 workflowSteps.insert(std::make_pair(
word(
"start"), 0));
235 workflowSteps.insert(std::make_pair(
word(
"templateGeneration"), 1));
236 workflowSteps.insert(std::make_pair(
word(
"surfaceTopology"), 2));
237 workflowSteps.insert(std::make_pair(
word(
"surfaceProjection"), 4));
238 workflowSteps.insert(std::make_pair(
word(
"patchAssignment"), 8));
239 workflowSteps.insert(std::make_pair(
word(
"edgeExtraction"), 16));
240 workflowSteps.insert(std::make_pair(
word(
"meshOptimisation"), 32));
241 workflowSteps.insert(std::make_pair(
word(
"boundaryLayerGeneration"), 64));
242 workflowSteps.insert(std::make_pair(
word(
"boundaryLayerRefinement"), 128));
244 return workflowSteps;
252 currentStep_(
"start"),
254 completedStepsBeforeRestart_(),
303 std::map<word, label>::const_iterator it =
workflowSteps_.find(stepName);
312 "void workflowControls::setCurrentStep(const word&)"
313 ) <<
"Step " << stepName <<
" is not a valid name."
bool runCurrentStep(const word &)
shall the process run the current step
word lastCompletedStep() const
return the latest completed step
void clearCompletedSteps()
remove completedStep from the dictionary
bool restartRequested() const
check if restart is requested
A class for handling words, derived from string.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
bool remove(const word &)
Remove an entry specified by keyword.
static std::map< word, label > populateWorkflowSteps()
populate workflowSteps with values
polyMeshGen & mesh_
reference to the mesh
Ostream & endl(Ostream &os)
Add newline and flush stream.
DynList< word > completedStepsBeforeRestart_
completed step before restart
bool isDict(const word &) const
Check if entry is a sub-dictionary.
List< word > wordList
A List of words.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
void setStepCompleted() const
sets the current step to completed
word restartAfterStep_
step for restarting the workflow
DynList< word > completedSteps() const
return the names of completed steps
void workflowCompleted()
set the workflow completed flag
const dictionary & metaData() const
return a constant reference to metaDict
A list of keyword definitions, which are a keyword followed by any number of values (e....
workflowControls(polyMeshGen &mesh)
Construct from IOdictionary.
const Time & returnTime() const
access to Time
errorManipArg< error, int > exit(error &err, const int errNo=1)
bool isRestarted_
holds information whether the workflow has been restarted
bool isStepCompleted() const
is the current step already completed
bool runAfterCurrentStep() const
shall the workflow run after the current step
static const std::map< word, label > workflowSteps_
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
word currentStep_
current step in the workflow
bool stopAfterCurrentStep() const
shall the workflow stop after the current step
bool add(entry *, bool mergeEntry=false)
Add a new entry.
void append(const T &e)
Append an element at the end of the list.
bool exitAfterCurrentStep() const
shall the procedure stop after the current step
void set(entry *)
Assign a new entry, overwrite any existing entry.