Index of Commands¶
The implementation of the most of the user commands are just a wrapping to the fortran operator.
Some other are more specific and do more things in Python.
DEBUT — Initialization of code_aster¶
The Starter starts the execution by initializing the code_aster
memory manager (Jeveux). For this task, it parses the arguments through the
ExecutionParameter object.
By default, arguments are those read from the command line and those passed
init().
If the command line arguments are not set for code_aster, they can be ignored
with CA.init(..., noargv=True).
Some Python objects that have to be available from libaster are
passed during the initialization to the
ExecutionParameter.
- class code_aster.CodeCommands.debut.ExecutionStarter[source]¶
Bases:
objectInitialize the
ExecutionParameterobject for requests from the both sides Python/Fortran.- classmethod init(set_args_callback, argv=None, fcomm=0)[source]¶
Initialization of class attributes.
- set_args_callback¶
Callback to assign parameters values after parsing arguments (but before the libaster initialization).
- Type:
func
- argv¶
List of command line arguments (defaults to sys.argv).
- Type:
list[str], None
- fcomm¶
Id of the MPI communicator.
- Type:
int, optional
- Returns:
True if the initialization has been done, False if the execution was already initialized.
- Return type:
bool
- class code_aster.CodeCommands.debut.Starter[source]¶
Bases:
ExecuteCommandDefine the commands DEBUT/POURSUITE.
- code_aster.CodeCommands.debut.DEBUT(*, caller='DEBUT', **keywords)¶
Run the Command.
- Parameters:
keywords (dict) – User keywords
- code_aster.CodeCommands.debut.POURSUITE(*, caller='POURSUITE', **keywords)¶
Run the Command.
- Parameters:
keywords (dict) – User keywords
- code_aster.CodeCommands.debut.init(*argv, **kwargs)[source]¶
Initialize code_aster as DEBUT/POURSUITE command does + command line options.
If the code_aster study is embedded under another Python program, the “–slave” option may be useful to catch exceptions (even TimeLimitError) and try not to exit the Python interpreter.
- Parameters:
argv (list) – List of command line arguments.
kwargs (dict) – Keywords arguments passed to ‘DEBUT’/’POURSUITE’ + ‘debug (bool)’ same as -g/–debug, ‘debugpy (int)’ to start a debugpy session on this port number, ‘noargv (bool)’ to ignore previously passed arguments, ‘comm (mpi4py.MPI.Comm)’ to select the MPI communicator.
FIN — Finalization of code_aster¶
The Closer finalizes the execution by closing the code_aster
memory manager (Jeveux).
The objects existing in the context where FIN()
is called are pickled while their Jeveux content is saved in glob.*
databases.
A call to the function saveObjects()
is equivalent.
- class code_aster.CodeCommands.fin.Closer[source]¶
Bases:
ExecuteCommandCommand that closes the execution.
- change_syntax(keywords)[source]¶
Adapt syntax before checking syntax.
Consume argument to force to exit after the command.
- Parameters:
keywords (dict) – Keywords arguments of user’s keywords, changed in place.
- code_aster.CodeCommands.fin.FIN(**keywords)¶
Run the Command.
- Parameters:
keywords (dict) – User keywords
- code_aster.CodeCommands.fin.close(**keywords)¶
Run the Command.
- Parameters:
keywords (dict) – User keywords