OutputCaseContainerSetup¶
Qualified name: api.simulation.output_cases.output_case_container_setup.OutputCaseContainerSetup
- class api.simulation.output_cases.output_case_container_setup.OutputCaseContainerSetup(item)[source]¶
Bases:
ABCMethods
Creates a output case and returns a corresponding
OutputCaseSetupPipelineobjectGets the names of existing output cases, with the ordering being the same as the order in the underlying list at the moment of calling this method
Returns the name of the object
Returns a
OutputCaseSetupPipelineobject for a output case setup object with the given nameRemoves a output case
Sets the name of the output case container
- abstractmethod create_output_case_setup(oc_type) OutputCaseSetupPipeline[source]¶
Creates a output case and returns a corresponding
OutputCaseSetupPipelineobjectExample
>>> from more.api import ApiGateway >>> api = ApiGateway(proj=proj) >>> simulation_setup = api.create_simulation_setup() >>> output_case_container_setup = simulation_setup.create_output_case_container_setup() >>> output_case_setup = output_case_container_setup.create_output_case_setup(oc_type='Mechanical output case')
- Returns:
A
OutputCaseSetupPipelineobject for the created output case- Return type:
- Raises:
NameNotFoundError – Raised if no outputd case type with the given name was found
- abstractmethod get_available_output_case_names() List[str][source]¶
Gets the names of existing output cases, with the ordering being the same as the order in the underlying list at the moment of calling this method
Example
>>> from more.api import ApiGateway >>> api = ApiGateway(proj=proj) >>> simulation_setup = api.create_simulation_setup() >>> output_case_container_setup = simulation_setup.create_output_case_container_setup() >>> _ = output_case_container_setup.create_output_case_setup(oc_type='Mechanical output case') >>> _ = output_case_container_setup.create_output_case_setup(oc_type='Mechanical output case') >>> _ = output_case_container_setup.create_output_case_setup(oc_type='Mechanical output case') >>> output_case_container_setup.get_available_output_case_names() ['Mechanical output case', 'Mechanical output case 1', 'Mechanical output case 2']
- Returns:
Names of available output cases
- Return type:
list of strings
- abstractmethod get_name() str[source]¶
Returns the name of the object
Example
>>> from more.api import ApiGateway >>> api = ApiGateway(proj=proj) >>> simulation_setup = api.create_simulation_setup() >>> output_case_container_setup = simulation_setup.create_output_case_container_setup() >>> output_case_container_setup.set_name(name='new_name') <more...> >>> output_case_container_setup.get_name() 'new_name'
- Returns:
name – The name of the object
- Return type:
str
- abstractmethod get_output_case_setup(oc_type: str | None = None, name: str | None = None)[source]¶
Returns a
OutputCaseSetupPipelineobject for a output case setup object with the given nameDeprecated
the ‘oc_type’ parameter is deprecated and will be removed without replacement in a future MORe release. Please use only the ‘name’ parameter to specify the output case.
Example
>>> from more.api import ApiGateway >>> api = ApiGateway(proj=proj) >>> simulation_setup = api.create_simulation_setup() >>> output_case_container_setup = simulation_setup.create_output_case_container_setup()
>>> output_case_setup = output_case_container_setup.get_output_case_setup(name='Example OC') # This Load Case must already exist
- Parameters:
name (str) – The name of the existing output case for which to return a
OutputCaseSetupPipeline- Returns:
A
OutputCaseSetupPipelineobject for the found output case- Return type:
- Raises:
NameNotFoundError – Raised if no output case with the given name was found
- abstractmethod remove_output_case_setup(oc_type: str | None = None, name: str | None = None) OutputCaseContainerSetup[source]¶
Removes a output case
Deprecated
the ‘oc_type’ parameter is deprecated and will be removed without replacement in a future MORe release. Please use only the ‘name’ parameter to specify the output case to remove.
Example
>>> from more.api import ApiGateway >>> api = ApiGateway(proj=proj) >>> simulation_setup = api.create_simulation_setup() >>> output_case_container_setup = simulation_setup.create_output_case_container_setup()
>>> output_case_setup = output_case_container_setup.remove_output_case_setup(name='Example OC') # This Load Case must already exist
- Parameters:
name (str) – The name of the existing output case to remove
- Returns:
self
- Return type:
- Raises:
NameNotFoundError – Raised if no output case with the given name was found
- abstractmethod set_name(name: str, resolve_duplicate_name: bool = False)[source]¶
Sets the name of the output case container
Example
>>> from more.api import ApiGateway >>> api = ApiGateway(proj=proj) >>> simulation_setup = api.create_simulation_setup() >>> output_case_container_setup = simulation_setup.create_output_case_container_setup() >>> output_case_container_setup.set_name(name='new_name') <more...> >>> simulation_setup.create_output_case_container_setup() \ ... .set_name(name='new_name', resolve_duplicate_name=True) \ ... .get_name() 'new_name 1'
- Parameters:
name (str) – The new name for the output case container
resolve_duplicate_name (bool) – Whether to automatically assign a new name when the chosen one is already taken
- Returns:
self
- Return type:
- Raises:
NameNotUniqueError – Raised if the given name is not unique
TypeError – Raised if the given name is not a string