PostprocessorSetup¶
Qualified name: api.postprocessor.postprocessor_setup.PostprocessorSetup
- class api.postprocessor.postprocessor_setup.PostprocessorSetup(proj)[source]¶
Bases:
ABC
Entry point for postprocessing API
- Parameters:
proj (Project) – The project instance
Methods
Creates a
SimresultSetup
for an already existing simulation resultGets the names of existing simresults
Removes a simresults object
- abstractmethod get_simresult(name: str) SimresultSetup [source]¶
Creates a
SimresultSetup
for an already existing simulation resultExample
>>> from more.api import ApiGateway >>> api = ApiGateway(proj=proj) >>> postprocessor_setup = api.create_postprocessor_setup()
>>> simresult_setup = postprocessor_setup.get_simresult(name='example_simresult') # The simresult object must already exist
- Parameters:
name (str) – The name of the existing simulation result for which to return a
SimresultSetup
- Returns:
A
SimresultSetup
object for the found simulation results object- Return type:
- Raises:
NameNotFoundError – Raised if no simulation result with the given name was found
- abstractmethod get_simresult_names() List[str] [source]¶
Gets the names of existing simresults
Example
>>> from more.api import ApiGateway >>> api = ApiGateway(proj=proj) >>> postprocessor_setup = api.create_postprocessor_setup()
>>> postprocessor_setup.get_simresult_names() [...]
- Returns:
Names of existing simresults
- Return type:
list of strings
- abstractmethod remove_simresult(name: str) PostprocessorSetup [source]¶
Removes a simresults object
Example
>>> from more.api import ApiGateway >>> api = ApiGateway(proj=proj) >>> postprocessor_setup = api.create_postprocessor_setup()
>>> postprocessor_setup = postprocessor_setup.remove_simresult(name='example_simresult') # The simresult object must already exist
- Parameters:
name (str) – The name of the simresults object to remove
- Returns:
self
- Return type:
- Raises:
NameNotFoundError – Raised if no simresults with the given name exist