Skip to content

Commit

Permalink
Update documentation for 2025.1.pre0 (#1675)
Browse files Browse the repository at this point in the history
* Update Compatibility for 2025.1.pre0

Signed-off-by: paul.profizi <[email protected]>

* Update dpf_server.rst for 2025.1.pre0

Signed-off-by: paul.profizi <[email protected]>

* Update doc/source/getting_started/compatibility.rst

* Fix typing in collection_base.py

Signed-off-by: paul.profizi <[email protected]>

* Fix docstring in plugins.py

Signed-off-by: paul.profizi <[email protected]>

* Fix example references for hdf5

Signed-off-by: paul.profizi <[email protected]>

* Fix example references for modal cyclic

Signed-off-by: paul.profizi <[email protected]>

* Fix example 03-fluids_isosurface.py formatting

Signed-off-by: paul.profizi <[email protected]>

* Fix formatting in licensing.rst

Signed-off-by: paul.profizi <[email protected]>

* Remove direct references to getting_started_with_dpf_server

Signed-off-by: paul.profizi <[email protected]>

---------

Signed-off-by: paul.profizi <[email protected]>
  • Loading branch information
PProfizi authored Aug 1, 2024
1 parent 035b41b commit ba49766
Show file tree
Hide file tree
Showing 13 changed files with 46 additions and 25 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ To reach the project support team, email [[email protected]](mailto:pyansys

PyDPF-Core requires DPF to be available. You can either have a compatible Ansys version installed
or install the standalone ``ansys-dpf-server`` server package. For more information, see
[Getting Started with DPF Server](https://dpf.docs.pyansys.com/version/stable/user_guide/getting_started_with_dpf_server.html)
[Getting Started with DPF Server](https://dpf.docs.pyansys.com/version/stable/getting_started/dpf_server.html)
in the PyDPF-Core documentation.

For the compatibility between PyDPF-Core and Ansys, see
Expand Down
12 changes: 11 additions & 1 deletion doc/source/getting_started/compatibility.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ package should also be synchronized with the server version.
- ``ansys.grpc.dpf`` Python module version
- ``ansys.dpf.gatebin`` binaries Python module version
- ``ansys.dpf.gate`` Python module version
* - 9.0 (Ansys 2025 R1 pre0)
- 0.13.0 and later
- None
- None
- None
* - 8.2 (Ansys 2024 R2)
- 0.12.1 and later
- None
- None
- None
* - 8.1 (Ansys 2024 R2 pre1)
- 0.12.0 and later
- None
Expand Down Expand Up @@ -124,7 +134,7 @@ package should also be synchronized with the server version.
- None
- None
* - 2.0 (Ansys 2021 R2)
- 0.3.0 and later**
- 0.3.0 to 0.9.0**
- 0.3.0
- None
- None
Expand Down
12 changes: 6 additions & 6 deletions doc/source/getting_started/dpf_server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ Install DPF Server

.. _target_installing_server:

#. Download the ``ansys_dpf_server_win_v2024.2.pre0.zip`` or ``ansys_dpf_server_lin_v2024.2.pre0.zip`` file as appropriate.
#. Download the ``ansys_dpf_server_win_v2025.1.pre0.zip`` or ``ansys_dpf_server_lin_v2025.1.pre0.zip`` file as appropriate.
#. Unzip the package.
#. Optional: download any other plugin ZIP file as appropriate and unzip the package. For example, to access the ``composites`` plugin for Linux,
download ``ansys_dpf_composites_lin_v2024.2.pre0.zip`` and unzip the package in the same location as ``ansys_dpf_server_lin_v2024.2.pre0.zip``.
#. Change to the root folder (``ansys_dpf_server_win_v2024.2.pre0``) of the unzipped package.
download ``ansys_dpf_composites_lin_v2025.1.pre0.zip`` and unzip the package in the same location as ``ansys_dpf_server_lin_v2025.1.pre0.zip``.
#. Change to the root folder (``ansys_dpf_server_win_v2025.1.pre0``) of the unzipped package.
#. In a Python environment, run this command:

.. code::
Expand Down Expand Up @@ -107,15 +107,15 @@ Run DPF Server in a Docker container
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DPF Server can be run in a Docker container.

#. Along with the ``ansys_dpf_server_lin_v2024.2.pre0.zip`` file mentioned earlier
#. Along with the ``ansys_dpf_server_lin_v2025.1.pre0.zip`` file mentioned earlier
in :ref:`Install DPF Server <target_installing_server>`, download the ``Dockerfile`` file.
#. Optional: download any other plugin ZIP file as appropriate. For example, to access the ``composites`` plugin for Linux,
download ``ansys_dpf_composites_lin_v2024.2.pre0.zip``.
download ``ansys_dpf_composites_lin_v2025.1.pre0.zip``.
#. Copy all the ZIP files and ``Dockerfile`` file in a folder and navigate into that folder.
#. To build the DPF Docker container, run the following command:

.. code::
docker build . -t dpf-core:v2024.2.pre0 --build-arg DPF_VERSION=242
docker build . -t dpf-core:v2025.1.pre0 --build-arg DPF_VERSION=251
5. To run the DPF Docker container, license it. For more information, see :ref:`DPF Preview License Agreement<target_to_license_terms>`.
6 changes: 6 additions & 0 deletions doc/source/getting_started/licensing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ For more information on installing DPF Server, see :ref:`ref_dpf_server`.


.. _target_to_license_terms:

License terms
-------------

Expand Down Expand Up @@ -46,6 +47,7 @@ existing license for the edition and version of DPF Server that you intend to us


.. _configure_licensing:

Configure licensing
-------------------

Expand Down Expand Up @@ -78,6 +80,7 @@ the Ansys license mechanism that is used with DPF Server.


.. _target_to_ansys_license_mechanism:

License checks and usage
------------------------

Expand Down Expand Up @@ -119,6 +122,7 @@ location is not the native result location. In that case, averaging occurs which
as data transformation (such as elemental to nodal, nodal to elemental, or any other location change).

.. _licensing_server_context:

Server context
~~~~~~~~~~~~~~

Expand All @@ -137,6 +141,7 @@ To update the context, apply a new server context:
server.apply_context(dpf.AvailableServerContexts.premium)
.. _licensing_errors:

Licensing errors
~~~~~~~~~~~~~~~~

Expand All @@ -153,6 +158,7 @@ The following user actions may fail due to licensing:


.. _target_to_ansys_license_increments_list:

Compatible Ansys license increments
-----------------------------------

Expand Down
2 changes: 1 addition & 1 deletion doc/source/user_guide/how_to.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ How-tos

plotting.rst
custom_operators.rst
getting_started_with_dpf_server.rst
dpf_server.rst
server_types.rst
server_context.rst
xmlfiles.rst
Expand Down
2 changes: 1 addition & 1 deletion examples/05-file-IO/00-hdf5_double_float_comparison.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# noqa: D400
"""
.. _ref_basic_hdf5:
.. _ref_io_hdf5_export_precision:
HDF5 export and compare precision
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion examples/05-file-IO/02-hdf5_serialize_and_read.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
.. _ref_basic_hdf5:
.. _ref_io_hdf5_import_export:
HDF5 export and import operations
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,4 +264,4 @@
dpf.download_file(os.path.join(tmp, "out.glb"), os.path.join(os.getcwd(), "out.glb"))

# %%
# You can download :download:`output <images/thumb/out02.glb>` from the ``gltf`` operator.
# You can download :download:`output <images/thumb/out.glb>` from the ``gltf`` operator.
14 changes: 7 additions & 7 deletions examples/12-fluids/03-fluids_isosurface.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
.. _ref_fluids_isosurface:
Compute iso-surfaces on fluid models
------------------------------------------
------------------------------------
This example demonstrates how to compute iso-surfaces on fluid models.
Expand All @@ -14,15 +14,15 @@

###############################################################################
# Import the ``dpf-core`` module and its examples files.
# ~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

import ansys.dpf.core as dpf
from ansys.dpf.core import examples
from ansys.dpf.core.plotter import DpfPlotter

###############################################################################
# Specify the file path.
# ~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~
# We work on a cas/dat.h5 file with only nodal variables.

path = examples.download_cfx_heating_coil()
Expand All @@ -33,7 +33,7 @@

###############################################################################
# Whole mesh scoping.
# ~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~
# We evaluate the mesh with the mesh_provider operator to scope the mesh_cut operator
# with the whole mesh.

Expand All @@ -44,7 +44,7 @@

###############################################################################
# Extract the physics variable
# ~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Here we choose to work with the static pressure by default which is a scalar and
# nodal variable without multi-species/phases. With a multi-species case,
# select one using qualifier ellipsis pins and connecting a LabelSpace "species"/"phase".
Expand All @@ -63,7 +63,7 @@

###############################################################################
# Evaluate iso-surfaces
# ~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~
# We can finally use the iso_surfaces operator on this specific variable.
# We choose to cut the whole mesh with 9 iso-surface manually selected between
# the min and max of the static_pressure variable.
Expand Down Expand Up @@ -102,7 +102,7 @@

###############################################################################
# Important note
# ------------------------------
# --------------
# Iso-surfaces computation through the `mesh_cut` operator are only supported for Nodal Fields.
# For Elemental variables, you must perform an averaging operation on the Nodes before
# running the `mesh_cut` operator. This can be done by chaining the `elemental_to_nodal` operator
Expand Down
5 changes: 4 additions & 1 deletion src/ansys/dpf/core/collection_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
dpf_vector,
dpf_array,
)
from typing import Optional, Generic, TypeVar
from typing import Optional, Generic, TypeVar, TYPE_CHECKING

if TYPE_CHECKING:
from ansys.dpf.core.support import Support

from ansys.dpf.gate.integral_types import MutableListInt32

Expand Down
2 changes: 1 addition & 1 deletion src/ansys/dpf/core/operator_specification.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ class SpecificationProperties:
Optional license name to check out that is used to run the operator.
The value "any_dpf_supported_increments" tells DPF than any DPF-accepted license
is accepted by this operator (see `here
<https://dpf.docs.pyansys.com/version/stable/user_guide/getting_started_with_dpf_server.html#ansys-licensing>`_). # noqa
<https://dpf.docs.pyansys.com/version/stable/getting_started/licensing.html#license-checks-and-usage>`_). # noqa
"""

Expand Down
7 changes: 5 additions & 2 deletions src/ansys/dpf/core/plugins.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
Python DPF plugins utilities
============================
Contains the utilities specific to installing and using Python DPF plugins.
"""
import os.path
try:
Expand All @@ -17,14 +17,17 @@
def load_plugin_on_server(plugin, server=None, symbol="load_operators", generate_operators=False):
"""Load a DPF Python plugin on the global or given DPF server.
Parameters
Parameters
----------
plugin:
DPF Python plugin to load.
server:
DPF server to load the plugin onto.
symbol:
Name of the function recording the operators in the plugin.
generate_operators:
Whether to generate the Python code for the operators in the plugin.
"""
server = server_module.get_or_create_server(server)
plugin_name = plugin.split("-")[-1]
Expand Down
3 changes: 1 addition & 2 deletions src/ansys/dpf/core/server_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ class LicenseContextManager:
License increment to check out. To improve script efficiency, this license increment
should be consistent with the increments required by the following Operators. If ``None``,
the first available increment of this
`list <https://dpf.docs.pyansys.com/version/dev/user_guide/getting_started_with_dpf_server.
html#ansys-licensing>`_
`list <https://dpf.docs.pyansys.com/version/stable/getting_started/licensing.html#compatible-ansys-license-increments>`_
is checked out.
license_timeout_in_seconds: float, optional
If an increment is not available by the maximum time set here, check out fails. Default is:
Expand Down

0 comments on commit ba49766

Please sign in to comment.