IntroductionThe 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 CompatibilityThe 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:
Step-in ExampleThe 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_
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". | |||||||||||||||||||||||||||||||