How can I speed up the execution of jython file in Flux?


In order to speed up the execution of jython file, you can use the following python commands:

Command
Allows
startMacroTransaction()
Opening a macro transaction
endMacroTransaction()
Closing a macro transaction

Example: Transaction of parameters modification:

startMacroTransaction()
ParameterGeom['Param_1'].expression='1'
ParameterGeom['Param_2'].expression='2'
ParameterGeom['Param_3'].expression='3'
ParameterGeom['Param_4'].expression='4'
endMacroTransaction()

Note 1: Use these commands only for the same type of transaction such as creation or modification or deletion.

Note 2: A macro transaction opened with startMacroTransaction() should always be closed with endMacroTransaction()

Note 3: Do not put commands such as deleteMesh() or buildFace() within a macro transaction.

Note 4: Add as many blocks of macro transactions as needed.