TRACE control file (controlfile
)¶
TRACE control file
Associated Modules¶
TRACE control file environment |
|
Definition of one TRACE command |
|
Description which block(s) will be concerned by the command |
|
Description how the command will be executed |
Usage¶
This class will read in a TRACE control file:
#########################################################
#
# TRACE control file
#
# TRACE 8.0.032
#
#########################################################
all immediate StartZonalDebug
group 0 iteration 999 writeProbeData 10 1000
block 12 periodic 4 5 writeRadialDistribution ../output/radial/bd_radial
#all immediate StartWriteBlockResidual
This module is imported using:
from mojo.traceSuiteControl.controlfile import TraceCommandList
example:
myTraceCommand = TraceCommandList()
myTraceCommand.convertCommandFile()
myTraceCommand.writeCommandFile("goofy.input")
Modules¶
TRACE control file environment¶
-
class
TraceCommandList
(name='TRACE_control', filename='TRACE_control.input', version='', comment='')[source]¶ TRACE control file environment
-
activateCommandLine
(name)[source]¶ Activates a command present in the TRACE command list given by its name.
- Parameters
name (str): name of the TRACE command (e.g “WriteSurfaceData”)
- Return
(bool) flag whether activation setting is changed
-
addCommand
(name, active=True, ensemble='all', ensembleNumber=- 1, execution='immediate', stepNumber=- 1, periodicity=- 1, options=None)[source]¶ Add a Trace command line to the TRACE command list.
- Parameters
name (str): name of the TRACE command (e.g “WriteSurfaceData”)
active (bool): activation setting for TRACE command
ensemble (str): membership type
ensembleNumber (int): related index
execution (str): execution mode
stepNumber (int): iteration number for execution
periodicity (int): repetition rate
options (list of strings): additional option list
- Return
(bool) flag whether TRACE command has been added
-
addCommandLine
(tracecommandLine)[source]¶ Add a Trace command line to the TRACE command list.
- Parameters
tracecommandLine (str): Trace command to be added
-
addCommandList
(tracecommandlist)[source]¶ Add a Trace command line to the TRACE command list.
- Parameters
tracecommandlist (traceCommandList): TraceCommandList to be concatenated.
-
changeExecutionmode
(name, execution, stepNumber=- 1, periodicity=- 1, ind=0)[source]¶ [tcommand.name for tcommand in self.listofcommands] Change attributes of execution mode
- Parameters:
name (str): name of the TRACE command (e.g “WriteSurfaceData”)
execution (str): execution mode
stepNumber (int): iteration number for execution
periodicity (int): repetition rate
-
changeMembership
(name, ensemble, ensembleNumber=- 1, ind=0)[source]¶ Change attributes of membership
- Parameters:
name (str): name of the TRACE command (e.g “WriteSurfaceData”)
ensemble (str): membership type
ensembleNumber (int): related index
-
changeOptions
(name, options=None)[source]¶ Change option list
- Parameters:
name (str): name of the TRACE command (e.g “WriteSurfaceData”)
options (list of strings): additional option list
-
convertCommandFile
(filename='')[source]¶ Read commands from a TRACE control file and add them to the command list
- Parameters
filename (str): name of the TRACE control file
-
deactivateCommandLine
(name)[source]¶ Deactivates a command present in the TRACE command list given by its name.
- Parameters
name (str): name of the TRACE command (e.g “WriteSurfaceData”)
- Return
(bool) flag whether activation setting is changed
-
getCommand
(name)[source]¶ Return command
- Parameters:
name (str): name of the TRACE command (e.g “WriteSurfaceData”)
- Return
(Tracecommand instance or None) searched TRACE command
-
removeCommandItem
(name, ind=- 1)[source]¶ Remove a command from the TRACE command list.
- Parameters
name (str): name of the TraceCommand (e.g “WriteSurfaceData”)
id (str): index of removed settings (default: -1)
- Return
(bool) flag whether TRACE command has been removed
-
Definition of one TRACE command¶
-
class
Tracecommand
(active=True, name='', ensemble='', ensembleNumber=- 1, execution='', stepNumber=- 1, periodicity=- 1, options=None)[source]¶ Class used to define one TRACE command.
- Parameters
-
addCommandFromString
(tracecommandLine)[source]¶ Fill Trace command settings from a string
- Parameters
tracecommandLine (str): Trace command to be added
-
addCommandSettings
(active=True, ensemble='all', ensembleNumber=- 1, execution='immediate', stepNumber=- 1, periodicity=- 1, options=None)[source]¶ Add command settings to the related lists
-
changeExecutionmode
(execution, stepNumber=- 1, periodicity=- 1, ind=0)[source]¶ Change attributes of execution mode
- Parameters:
execution (str): execution mode
stepNumber (int): iteration number for execution
periodicity (int): repetition rate
- Return
(bool) flag whether attributes have been changed
-
changeMembership
(ensemble, ensembleNumber=- 1, ind=0)[source]¶ Change attributes of membership
- Parameters:
ensemble (str): membership type
ensembleNumber (int): related index
- Return
(bool) flag whether attributes have been changed
-
changeOptions
(options, ind=0)[source]¶ Change option list
- Parameters:
options (list of strings): additional option list
id (integer): index of options
-
getOptions
(ind=0)[source]¶ Return option list for specified index
- Parameters:
id (integer): index of options
Description which block(s) will be concerned by the command¶
-
class
Membership
(ensemble='', ensembleNumber=- 1)[source]¶ Class used to describe which block(s) will be concerned by the command.