Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/ansys/dpf/core/server_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ class LicenseContextManager:
Examples
--------
Using a context manager

>>> from ansys.dpf import core as dpf
>>> dpf.set_default_server_context(dpf.AvailableServerContexts.premium)
>>> field = dpf.Field()
Expand All @@ -129,13 +130,15 @@ class LicenseContextManager:
... out = op.outputs.field()

Using an instance

>>> lic = dpf.LicenseContextManager()
>>> op.inputs.field(field)
>>> op.inputs.threshold(0.0)
>>> out = op.outputs.field()
>>> lic = None

Using a context manager and choosing license options

>>> op.inputs.field(field)
>>> op.inputs.threshold(0.0)
>>> out = op.outputs.field()
Expand All @@ -149,6 +152,7 @@ class LicenseContextManager:
Notes
-----
Available from 6.1 server version.

"""

def __init__(
Expand Down
Loading