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

get_simresult

Creates a SimresultSetup for an already existing simulation result

get_simresult_names

Gets the names of existing simresults

remove_simresult

Removes a simresults object

abstract get_simresult(name: str) SimresultSetup[source]#

Creates a SimresultSetup for an already existing simulation result

Example

>>> 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:

SimresultSetup

Raises:

NameNotFoundError – Raised if no simulation result with the given name was found

abstract 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

abstract 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:

PostprocessorSetup

Raises:

NameNotFoundError – Raised if no simresults with the given name exist