code_aster package¶
This is the main entry point for the users.
code_aster.Commands is the high level user interface.
It provides the Commands.
code_aster.CA is a lower level interface that gives access the
DataStructure objects (and also Commands for convenience).
Standard users should use the high level interface:
>>> import code_aster
>>> from code_aster.Commands import *
>>> DEBUT()
>>> mesh = LIRE_MAILLAGE(...)
- Note::
The first two lines that import
code_asterand all commands fromcode_aster.Commandsare automatically inserted in the user commands file by run_aster.
The lower level user interface is used as:
>>> import code_aster
>>> from code_aster import CA
>>> mesh = CA.Mesh()
>>> mesh.readMedFile(...)
See code_aster.rc object to adjust the initialization parameters.
Here is the diagram of the packages organization:
- Implementation of commands
- Objects / DataStructures
- Description of the user’s keywords
- Cata package
- Language for Commands description
- Syntax Objects
- Syntax Checker
- DataStructures types
- DataStructure object for syntax checking
DataStructureAsType()PythonVariableUnitBaseTypeUnitDefaultUnitMedUnitAsterUnitType()ASSDCOnot_checkedformuleformule_ccabl_precontcara_elemcham_gd_sdastercarte_sdastercham_elemcham_no_sdastercham_geom_sdastercham_materchar_acouchar_cine_acouchar_cine_mecachar_cine_therchar_contactchar_contchar_frotchar_genechar_mecachar_thercompor_sdastercompor_mgiscorresp_2_maillaentierfiss_xfemfonction_classfonction_sdasterfonction_cnappe_sdasterfond_fissuregfibre_sdasterinterf_dyna_clasinterspectrelist_instlistis_sdasterlistr8_sdastermacr_elem_dynamacr_elem_statmaillage_sdastersuper_meshmaillage_pmaillage_partielgrille_sdastersquelettemater_sdastermatr_assematr_asse_gdmatr_asse_depl_cmatr_asse_depl_rmatr_asse_elim_rmatr_asse_pres_cmatr_asse_pres_rmatr_asse_temp_cmatr_asse_temp_rmatr_asse_genematr_asse_gene_rmatr_asse_gene_cmatr_elemmatr_elem_depl_cmatr_elem_depl_rmatr_elem_pres_cmatr_elem_temp_rmelasflu_sdastermode_cyclmodele_genemodele_sdasternume_ddl_genenume_ddl_sdasternume_ddl_preelresultat_sdastercomb_fourierfourier_elasfourier_thermult_elasmode_empievol_sdasterevol_charevol_elasevol_nolievol_therevol_sechevol_varcdyna_genedyna_physharm_genetran_geneacou_harmodyna_harmodyna_transmode_acoumode_flambmode_mecamode_meca_cmode_genespectre_sdastertable_sdastertable_fonctiontable_containertype_flui_struvect_asse_genevect_elemvect_elem_depl_rvect_elem_pres_cvect_elem_temp_rds_dictevol_noli_dictevol_elas_dictevol_ther_dict
- Validators
- Rules between keywords
- Syntax Utilities
_F_ListFactListFact()warn_to_stdout()deprecate()mixedcopy()is_undefined()remove_none()add_none_sdprod()search_for()force_list()force_tuple()value_is_sequence()array_to_list()old_complex()convert_complex()enable_0key()disable_0key()block_utils()sorted_dict()debug_mode()debug_message()
- Interface with the user syntax
- Detailed description
- Base classes
command_execution()ExecuteCommandcheck_jeveux()ExecuteMacroUserMacro()COpublish_in()get_user_name()command_separator()command_header()command_result()command_memory()command_time()loop_on_dsdictExceptHookManagerSerializer— Serialization of code_aster objectsFinalizeOptionsSerializersaveObjects()saveObjectsFromContext()loadObjects()contains_datastructure()PicklingHelpersubtypes()AsterPickler_filteringContext()read_signature()file_signature()CommandSyntax— Interface between C++/Fortran operators and user syntaxCommandSyntax_check_strings()- Definition of code_aster exceptions
format()format_exception()get_idmess()typeaster— Understanding code_aster typestypeaster()
- Detailed description
- Features for the user messages
- Helpers functions for Commands
- Common utilities
base_utils— General purpose utilitiesno_new_attributes()import_object()get_caller_context()force_list()force_tuple()cmp()is_int()is_float()is_float_or_int()is_complex()is_number()is_str()is_sequence()value_is_sequence()array_to_list()accept_array()SingletonReadOnlyDictcompatibility— Manage compatibility with legacy versionwarn_to_stdout()deprecate()deprecated()compat_listr8()_if_exists()_if_not_exists()remove_keyword()unsupported()required()ExecutionParameter— Management of the execution parametersExecutionParameterExecutionParameter._argsExecutionParameter._boolExecutionParameter._catalcExecutionParameter._unitExecutionParameter._syntaxExecutionParameter.__init__()ExecutionParameter._computed()ExecutionParameter.set_argv()ExecutionParameter.set_option()ExecutionParameter.get_option()ExecutionParameter.enable()ExecutionParameter.disable()ExecutionParameter.optionExecutionParameter.timerExecutionParameter.exportExecutionParameter.parse_args()ExecutionParameter.sub_tpmax()ExecutionParameter.incr_command_counter()ExecutionParameter.register_global_object()ExecutionParameter.catalcExecutionParameter.logical_unitExecutionParameter.syntaxExecutionParameter.print_headerExecutionParameter.checksdExecutionParameter.testresu_printExecutionParameter.iniranExecutionParameter.getran
MemoryActionget_program_path()disable_fpe()Optionsi18n— Internationalization supportget_language()Languagetranslate()injector— Methods injection in pybind11 Objectsinjector()logger— Logging and messages outputPerLevelFormatterPerLevelColorFormatterHgStreamHandlerbuild_logger()loglevel()with_loglevel()_colorize()red()green()blue()magenta()cyan()yellow()grey()outputs— Utilities for outputs on consoleCommandRepresentationCommandRepresentation._limitCommandRepresentation._limit_reachedCommandRepresentation._linesCommandRepresentation._curlineCommandRepresentation._indentCommandRepresentation.__init__()CommandRepresentation._newline()CommandRepresentation._endline()CommandRepresentation._add_indent()CommandRepresentation._reset_indent()CommandRepresentation.get_text()CommandRepresentation.repr_command()CommandRepresentation.repr_keywords()CommandRepresentation.repr_sequence()CommandRepresentation.repr_value()CommandRepresentation._limited()CommandRepresentation.end()CommandRepresentation.clean()
decorate_name()command_text()Profilerprofile()print_stats()reset_stats()strfunc— String manipulations utilitiesget_encoding()to_unicode()from_unicode()convert()ufmt()clean_string()cut_long_lines()maximize_lines()force_split()copy_text_to()_fixed_length()textbox()center()Tester— Checking code_aster execution of testcasesaddSuccess()where()AssertRaisesContextTestCaseTestCase.__init__()TestCase.last_failedTestCase.runTest()TestCase.printSummary()TestCase.writeResult()TestCase.assertRaises()TestCase.assertRaisesRegex()TestCase.assertArrayEqual()TestCase.assertAlmostEqual()TestCase.assertCountEqual()TestCase.assertDictContainsSubset()TestCase.assertEqual()TestCase.assertFalse()TestCase.assertGreater()TestCase.assertGreaterEqual()TestCase.assertIn()TestCase.assertIs()TestCase.assertIsInstance()TestCase.assertIsNone()TestCase.assertIsNot()TestCase.assertIsNotNone()TestCase.assertLess()TestCase.assertLessEqual()TestCase.assertMultiLineEqual()TestCase.assertNotAlmostEqual()TestCase.assertNotEqual()TestCase.assertNotIn()TestCase.assertNotIsInstance()TestCase.assertNotRegex()TestCase.assertRegex()TestCase.assertSequenceEqual()TestCase.assertSetEqual()TestCase.assertTrue()TestCase.assertTupleEqual()