Skip to content

Commit 86b22b6

Browse files
anslpaPProfizi
andauthored
Documentation: improvements for the DPF Server getting started section (#675)
* Environment flag replaced by environment variable * Update customer portal link (support before) * Fix DPFPreviewLicenseAgreement term * DPF page of the ansys customer portal * Update the pydpf-core and post related information in getting_started_with_dpf_server * Update Ansys Installer install instructions in index of getting_started * Make the information about the DPF Preview License Agreement clearer * entry/premium space clearer * print(entry_server.context) * Add Install with plotting capabilities section in install and troubleshooting * Fix ref_compatibility * Update entry/premium capabilities check/checkout information * Update troubleshooting * Update troubleshoot (pyvista sentence) * Update docs/source/user_guide/troubleshooting.rst Co-authored-by: PProfizi <[email protected]> * Update docs/source/getting_started/index.rst Co-authored-by: PProfizi <[email protected]> * increments typo * Replace via by using * Small fixes after building * Small fixes Co-authored-by: PProfizi <[email protected]>
1 parent 87cbed9 commit 86b22b6

File tree

7 files changed

+82
-25
lines changed

7 files changed

+82
-25
lines changed

ansys/dpf/core/server_context.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@
1616

1717
class LicensingContextType(Enum):
1818
premium = 1
19-
"""Allows capabilities requiring Licenses checkout."""
19+
"""Loads the entry and the premium capabilities that require a license checkout.
20+
Blocks an increment."""
2021
entry = 4
21-
"""Loads minimum capabilities without requiring any Licenses checkout."""
22+
"""Loads the minimum number of plugins for basic use. Checks if at least one
23+
increment exists. This increment won't be blocked."""
2224

2325
def __int__(self):
2426
return self.value

docs/source/getting_started/compatibility.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ To get a specific version of the ``ansys-dpf-core`` package, such as 0.7.0, use
8383
8484
pip install --force-reinstall ansys-dpf-core==0.7.0
8585
86+
.. _target_environment_variable_with_dpf_section:
8687

8788
Environment variable
8889
--------------------

docs/source/getting_started/index.rst

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,14 @@ Installing DPF Server
3030
---------------------
3131

3232
#. DPF Server is packaged within the **Ansys Unified Installer** starting with Ansys 2021 R1.
33-
To use it, install Ansys following the installer instructions. If you experience problems,
34-
see :ref:`Environment variable section <ref_compatibility>`. For information on getting
33+
To use it, download the standard installation using your preferred distribution channel,
34+
and install Ansys following the installer instructions. If you experience problems,
35+
see :ref:`Environment variable section <target_environment_variable_with_dpf_section>`. For information on getting
3536
a licensed copy of Ansys, visit the `Ansys website <https://www.ansys.com/>`_.
3637

37-
#. DPF Server is available as a **standalone** package (independent of the Ansys installer) on the `Ansys Customer Portal <https://support.ansys.com/Home/HomePage>`_.
38-
As explained in :ref:`Ansys licensing section <ref_getting_started_with_dpf_server>`,
38+
#. DPF Server is available as a **standalone** package (independent of the Ansys installer) on the
39+
`DPF page of the Ansys Customer Portal <https://download.ansys.com/>`_.
40+
As explained in :ref:`Ansys licensing section <target_to_ansys_license_mechanism>`,
3941
DPF Server is protected by an Ansys license mechanism. Once you have access to an
4042
Ansys license, install DPF Server:
4143

@@ -52,15 +54,16 @@ Installing DPF Server
5254
pip install -e .
5355
5456
* DPF Server is protected using the license terms specified in the
55-
``DPFUserLicensingAgreement.txt`` file, which is available on the
57+
``DPFPreviewLicenseAgreement`` file, which is available on the
5658
Ansys Customer Portal. To accept these terms, you must set the
57-
following environment flag:
59+
following environment variable:
5860

5961
.. code::
6062
6163
ANSYS_DPF_ACCEPT_LA=Y
6264
63-
65+
For more information about the license terms, see the :ref:`DPF Preview License Agreement<target_to_license_terms>`
66+
section.
6467

6568
For installation methods that do not use pip, such as using **Docker containers**, see
6669
:ref:`ref_getting_started_with_dpf_server`.

docs/source/getting_started/install.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,18 @@ clone the repository and install it using ``pip`` with the ``-e``
5454
development flag:
5555

5656
.. include:: ../pydpf-core_clone_install.rst
57+
58+
59+
.. _target_to_install_with_plotting_capabilities:
60+
61+
Install with plotting capabilities
62+
----------------------------------
63+
64+
PyDPF-Core plotting capabilities are based on PyVista. That means that PyVista must be installed with PyDPF-Core.
65+
To proceed, use:
66+
67+
.. code::
68+
69+
pip install ansys-dpf-core[plotting]
70+
71+
For more information about PyDPF-Core plotting capabilities, see :ref:`ref_plotter`.

docs/source/user_guide/getting_started_with_dpf_server.rst

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,23 @@ Installing DPF Server
3131
.. code::
3232
3333
pip install -e .
34-
35-
PyDPF-Core and PyDPF-Post python modules can now be used. The instructions to install and get started with PyDPF-Core
36-
(ansys-dpf-core module) can be found at `Getting Started section <https://dpf.docs.pyansys.com/getting_started/install.html>`_.
3734
3835
Using DPF Server
3936
----------------
4037

38+
DPF Server use is protected using license terms. For more information, see the :ref:`DPF Preview License Agreement<target_to_license_terms>` section.
39+
4140
Running the DPF Server with PyDPF
4241
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4342

43+
PyDPF-Core is a Python client API communicating with a **DPF Server**, either
44+
through the network using gRPC or directly in the same process. PyDPF-Post is a Python
45+
module for postprocessing based on PyDPF-Core.
46+
47+
Both PyDPF-Core and PyDPF-Post python modules can be used with the DPF Server. The instructions to install and get started with PyDPF-Core
48+
can be found at `PyDPF-Core, Getting Started section <https://dpf.docs.pyansys.com/getting_started/install.html>`_. The instructions to install and get
49+
started with PyDPF-Post can be found at `PyDPF-Post, Getting Started section <https://post.docs.pyansys.com/getting_started/install.html>`_.
50+
4451
With PyDPF-Core and PyDPF-Post, the first creation of most DPF entities will start a DPF Server with the current default configuration and context.
4552
For example, the following code will automatically start a DPF Server behind the scenes:
4653

@@ -71,20 +78,20 @@ Running the DPF Server in a Docker container
7178
7279
docker build . -t dpf-core:v2023_2_pre0 --build-arg DPF_VERSION=232 --build-arg DPF_SERVER_FILE=ansys_dpf_server_lin_v2023.2.pre0.zip
7380
74-
4. To run the DPF Docker container, see the :ref:`License terms<target_to_license_terms>` section.
81+
4. To run the DPF Docker container, see the :ref:`DPF Preview License Agreement<target_to_license_terms>` section.
7582

7683
License terms
7784
-------------
7885

86+
.. _target_to_license_terms:
87+
7988
DPF Preview License Agreement
8089
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8190

82-
.. _target_to_license_terms:
83-
84-
DPF Server is protected using license terms specified in the DPFPreviewLicenseAgreement file that
91+
DPF Server use is protected using license terms specified in the DPFPreviewLicenseAgreement file that
8592
can be found on the Ansys Customer Portal.
8693

87-
To accept the DPF User Licensing Agreement terms, the following environment flag must be set:
94+
To accept the DPF User Licensing Agreement terms, the following environment variable must be set:
8895

8996
.. code::
9097
@@ -102,26 +109,31 @@ For a DPF Docker container usage, it can be set using:
102109
For any other case, set "ANSYS_DPF_ACCEPT_LA" as an environment variable with "Y" value.
103110

104111
Replace "<license_server_to_use>" mention that ANSYSLMD_LICENSE_FILE environment variable points to the Ansys license server.
105-
For more information about Ansys license mechanism use with DPF Server, see :ref:`Ansys licensing section<target_to_ansys_license_mechanism>`.
112+
For more information about Ansys license mechanism use with DPF Server, see :ref:`Ansys licensing<target_to_ansys_license_mechanism>` section.
106113

107114

115+
.. _target_to_ansys_license_mechanism:
116+
108117
Ansys licensing
109118
~~~~~~~~~~~~~~~
110119

111-
.. _target_to_ansys_license_mechanism:
112-
113120
DPF Server is protected by Ansys licensing mechanism.
114121

115-
DPF capabilities are available through the following main services:
116-
- Entry: Loads the minimum number of plugins for basic use. It is the default. It will only check if an Ansys License is available.
117-
- Premium: Loads the entry and the premium capabilities that require a license checkout.
122+
DPF capabilities are available through the following main contexts:
123+
124+
- Entry: Loads the minimum number of plugins for basic use. It is the default. Checks if at least one increment exists
125+
from the following :ref:`Ansys licensing increments list<target_to_ansys_license_increments_list>`. This increment won't be blocked.
126+
- Premium: Loads the entry and the premium capabilities that require a license checkout. Blocks an increment from the
127+
following :ref:`Ansys licensing increments list<target_to_ansys_license_increments_list>`.
118128

119129
To update the context, apply a new server context:
120130

121131
.. code::
122132
123133
dpf.apply_server_context(dpf.AvailableServerContexts.premium)
124134
135+
.. _target_to_ansys_license_increments_list:
136+
125137
The following Ansys licensing increments currently provide rights to use DPF Server:
126138

127139
- "preppost" available in Ansys Mechanical Enterprise PrepPost product

docs/source/user_guide/server_context.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,13 @@ This won't check out any license.
3939
4040
from ansys.dpf import core as dpf
4141
entry_server = dpf.start_local_server()
42-
entry_server.context
42+
print(entry_server.context)
43+
44+
.. rst-class:: sphx-glr-script-out
45+
46+
.. code-block:: none
47+
48+
Server Context of type LicensingContextType.entry with no xml path
4349
4450
Getting started with Premium capabilities
4551
-----------------------------------------

docs/source/user_guide/troubleshooting.rst

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Assume that you are importing the ``pydpf-core`` package:
3434
3535
from ansys.dpf import core as dpf
3636
37-
If an error lists missing modules, see :ref:`ref_ref_compatibility`.
37+
If an error lists missing modules, see :ref:`ref_compatibility`.
3838
The `ansys.grpc.dpf <https://pypi.org/project/ansys-grpc-dpf/>`_ module
3939
should always be synchronized with its server version.
4040

@@ -66,6 +66,24 @@ Then, with result files reproducing this issue, you can prevent the warning from
6666
However, the preceding code disables the reading and generation of the available results for the model.
6767
Any static results that are available for the model are used instead.
6868

69+
Plotting issues
70+
---------------
71+
72+
When trying to plot a result with DPF, the following error might be raised:
73+
74+
.. code-block:: default
75+
76+
ModuleNotFoundError: No module named 'pyvista'
77+
78+
In that case, simply install PyVista with:
79+
80+
.. code-block:: default
81+
82+
pip install pyvista
83+
84+
Another option is to install PyVista along PyDPF-Core. For more information, see
85+
:ref:`Install with plotting capabilities<target_to_install_with_plotting_capabilities>`
86+
6987
Performance issues
7088
------------------
7189

0 commit comments

Comments
 (0)