3. Global SDs#

All global data structures exchanged in Code_Aster exist in Python space. There are three types of SDglobales:

  • Strictly Python global SDs: they only exist in the Python space and have no counterpart in the Fortran space.

  • Strictly Fortran global SDs: they exist in Python space but are simply declared as types. They have no methods or specific attributes (i.e., other than those in hat class ASSD).

  • The mixed global SDs. They exist in the Python space, have specific methods and/or attributes. Moreover, they exist in Fortran space.

The global SDs are declared in the code_aster/cata/cata/legacy/ds/co_**.py files.

These global SDs that are passed from one command to another are called « concepts »: they are the Python objects known to the command set. The concepts all derive, directly or indirectly, from the hat class ASSD. The cata_sdj class attribute (like « Jeveux data structure catalog ») specifies the Python class that defines the Fortran data structure.

For example:

cata_sdj = “sd.sd_function.sd_function_aster”

which indicates that the Fortran data structure of the functions is defined by the sd_function_aster class in the sd_fonction.py module in the SD library.

Next, we are interested in SD objects JEVEUX and their verification.

The global SD verification mechanism is activated in most test cases, except when this check is too expensive or fails. Activation is done in two ways:

  • Overall, throughout the command file, via the keyword SDVERI =” OUI “in the command DEBUT

  • Locally, between each order, via the keyword SDVERI =” OUI “in the command DEBUG

Verification is the responsibility of the developer of the global data structure. As we use a Python class, the checks can be as thorough as necessary (name and type of objects JEVEUX, consistency of dimensions, SDspécialisées depending on the operators, etc.).

3.1. SD purely in Python#

Very few exist. It is recommended to declare such classes in the command file (or in a Python module imported into the command file). There are currently four such classes. Here is their statement in DataStructure.py:

class no (GEOM): pass

class grno (GEOM): pass

class ma (GEOM): pass

class grma (GEOM): pass

These classes all derive from the GEOM parent class described in the N_ GEOM file in the BIBPYT/kernel library. They are only used to define a specific type for geometric entities for the management of GROUP_MA/GROUP_NO keywords in the command catalog syntactic decoder.

3.2. SD with Fortran space#

All these classes are imported into the catalog header (code_aster/Cata/DataStructure.py). Examples:

class cabl_precont (ASSD):

cata_sdj = "sd.sd_cabl_precont.sd_cabl_precont"

cabl_precontest is a purely Fortran class, no specific method is defined.

cham_elem is a class containing, for example, its own EXTR_COMP method.

Classes can also inherit other classes. For example, the evol_noli class inherits the evol_sdaster class, which itself inherits the resultat_sdaster class.

As said before, the cata_sdj attribute declares the class used to describe and verify the JEVEUX Fortran SD objects associated with the concept (mode SDVERI). These classes are all grouped together in the BibPyt/SD directory (python library), under the name sd_****.py.