2. Launch, interactive and non-interactive mode#

The macro command CALC_ESSAI is started with the python routine calc_essai_ops.py located in the /bibpyt/macro folder. This routine performs the operations described below

2.1. Retrieving pre-declared concepts#

For the tabs for identifying efforts and for structural modification, it is necessary to declare when calling the macro-command the name of the concepts output from it, using the keyword RESU_XXX = CO (“NAME”). The names of the pre-declared concepts are carried into all the macro command calculation execution classes in the form of a list (RESU_MODIFSTRU) or a dictionary (RESU_IDENTIFICATION) containing the names, and, in the case of the identification tab, the result type, a counter (incremented by 1 each time the user declares an outgoing concept) and the DeclareOut routine.

For the data expansion tab, results can be declared interactively. However, they can only be used in the further calculation as part of a lawsuit.

For the signal processing tab, the names of the outgoing concepts are hardcoded (see section 5.5).

2.2. Launch in non-interactive mode#

It is not very relevant to launch the macro-command in non-interactive mode, except, possibly, in the case of identifying efforts, a mode that cannot be replaced by the use of another command. Thus, for model expansion, it is better to use the MACRO_EXPANS macro command directly. For structural modification, reference may be made to the command sequence described in the documentation U2.07.03. For signal processing, you can use the macro command CALC_SPEC (see U4.32.01).

The non-interactive mode is therefore used for the identification of efforts, and, most often, for the validation of test cases associated with CALC_ESSAI.

In this mode, we refer directly to the CalcesSaitTest routine.

2.3. Launch in interactive mode#

The launch is done in calc_essai_ops.py in the create_interactive_window routine. In this routine:

  • we import the CalcessAIObjects class (aster concept manager),

  • we create a TabbedWindow object (routine create_tab_mess_widget): this object is a tabbed window (see section 4.1) with the message window at the foot,

  • we import all the graphics classes, called interfaceXXXXXXX,

  • we create instances of each graphic class, which we display in the tabs window (instance of TabbedWindow) defined above,

  • we create a message file that will be displayed in the mess window defined at the bottom of the tabs instance.