API ReferenceΒΆ

This is the reference for the MORe API.

There is a single entry point to the entire API: ApiGateway. This single entry point is responsible for creating all other API related objects.

The Fluent API style is generally followed for setting parameters.

Examples are shown below:

Minimum Example

In order to start using the MORe api run the following

>>> from more.api import ApiGateway
>>> api = ApiGateway(proj=proj)

Example

Try running the following lines in an empty MORe project and see what happens:

>>> from more.api import ApiGateway
>>> api = ApiGateway(proj=proj)
>>> simulation_setup = api.create_simulation_setup()
>>> load_case_container_setup = simulation_setup.create_load_case_container_setup()
>>> load_case_container_setup.set_name(name='example lcc name')
>>> load_case_container_setup.create_load_case_setup(lc_type='mech') \\
...                          .set_name(name='example_load_case') # Let's create an empty mechanical load for demonstration purposes
>>> study_setup = simulation_setup.create_study_setup()
>>> study_setup.set_study_name(name='some_study_name') \\
...            .add_tags(tags=['some_tag'])
>>> print("Available job types: {}".format(study_setup.get_available_job_type_names()))# To check which job type names are available
>>> job_setup = study_setup.create_job_setup(job_name='Static Job')
>>> print("Available general parameters: {}".format(job_setup.get_general_job_settings_description())) # To check which general settings are available
>>> print("Available job parameters: {}".format(job_setup.get_job_type_specific_settings_description())) # To check which general settings are available
>>> job_setup.set_general_job_settings_parameter(parameter_name='tags', value=['some_tag']) \\
...          .set_general_job_settings_parameter(parameter_name='label', value='example_job') \\
...          .set_job_specific_parameter(parameter_name='single_load_case_choice', value='example_load_case') \\
...          .create()

In order to learn more about how to use this API refer to this documentation often and remember that there is a search function available.

Contents: