General Information

This section shows general information as well as the basic parameters for the DRIVER command.

Introduction

The DRIVER command is compatible with the Tosca Python Control. Please refer to the CONFIG-command for a similar command used with the classic Tosca Perl Control.

The statements entered under DRIVER are lines of Python code which are embedded into the control script and executed at a certain point of the job-initialization. Thus syntax rules for the Python language apply to the way these statements should be written by the user. This manual gives an insight of the objects and variable specific to the Tosca Python Control which are also accessible through the DRIVER-command.

Backwards Compatibility

The DRIVER and CONFIG commands serve the same purpose for the two available control scripts: the novel Tosca Python Control, and the classic Tosca Perl Control), respectively. While the Tosca Perl Control and the Tosca Preprocessor completely ignore any DRIVER-commands encountered in the optimization parameter-file, the Tosca Python Control acts as follows:
  1. If a single DRIVER-command is encountered, the Tosca Python Control processes it in a regular, native way.
  2. If a single CONFIG-command is encountered, the Tosca Python Control issues a warning, and attempts to translate the statements from the Perl to the Python language. Only a very limited subset of the possible Perl-statements are supported for translation. For a list of these statements, please refer to the section: Perl-To-Python Conversion.
  3. If both DRIVER and CONFIG commands are encountered, a warning is issued, and only the DRIVER-command is interpreted. The CONFIG-command is ignored in this case. The DRIVER-command should contain at least one statement in order to be respected.

Step-in Example

The next example illustrates some typical statements used in a DRIVER-command.
DRIVER
  driver.registerSaveRule( UpdateRules.COPY, CheckPoints.PERT_BEGIN, EventTimes.EVER, [  ], r'', r'_%i_%p' )
  driver.Modules[ ToscaModules.TOSCA_PREP ].Path = r'e:\FE_APP\TOSCA\SMATsoToscaPrep.exe'
  driver.Solver.Path = r'e:\FE_APP\abaqus\SMALauncher.exe'
  driver.LifeSolver.Path = r'e:\FE_APP\fesafe.exe'
  driver.Logger.LogLevel = LogLevels.DEBUG
END_

Configuration Parameter

Example

Remarks

Type

driver.registerSaveRule

driver.registerSaveRule( UpdateRules.COPY, CheckPoints.PERT_BEGIN, EventTimes.EVER, [ ], r'', r'_%i_%p' )

Adds new file archiving rule

Function

driver.Modules

driver.Modules[ ToscaModules.TOSCA_PREP ].Path = r'e:\FE_APP\TOSCA\SMATsoToscaPrep.exe'

Tosca modules register

Dictionary

driver.Solver

driver.Solver.Path = r'e:\FE_APP\abaqus\SMALauncher.exe'

Fe-Solver associated with the current job

Object

driver.LifeSolver

driver.LifeSolver.Path = r'e:\FE_APP\fesafe.exe'

Life solver associated with the current job

Object

driver.Logger

driver.Logger.LogLevel = LogLevels.DEBUG

Gets or sets the logging instance infrastructure

Object

Note: Please notice the handy usage of "raw" Python strings, for example r'e:\FE_APP\fesafe.exe'. If strings are entered with the r-prefix the Python interpreter does not consider any escape-character sequences in the string and it is used "as-is".