Session#

class ansys.dpf.core.session.Session(server=None)#

A class used to a user session on the server, it allows to plan events call backs from the server when workflows are running. A session is started every time a 'DpfServer' is created.

add_workflow(workflow, identifier)#

Add a workflow to the session. It allows to follow the workflow’s events while it’s running. This method is automatically called when a workflow’s output is requested.

Parameters
  • workflow (Workflow) –

  • identifier (str) – name given to the workflow

add_operator(operator, pin, identifier)#

Add a workflow made of the input operator and all his ancestors to the session. It allows to follow the workflow’s events while it’s running. This method is automatically called when an operator’s output is requested and the opetion op.progress_bar is set to 'True'.

Parameters
  • operator (Operator) –

  • pin (int) – output pin number requested

  • identifier (str) – name given to the workflow

listen_to_progress()#

Starts a progress bar and update it every time an operator is finished.

add_progress_system()#

Asks the session to start recording progress events. Called when the session is started.

flush_workflows()#

This removes the handle on the workflow by the session