From e71b699cc2dc74934d4e13df3f239cf8d62cea2b Mon Sep 17 00:00:00 2001 From: "paul.profizi" Date: Thu, 1 Aug 2024 17:25:14 +0200 Subject: [PATCH 01/10] Update Compatibility for 2025.1.pre0 Signed-off-by: paul.profizi --- doc/source/getting_started/compatibility.rst | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/doc/source/getting_started/compatibility.rst b/doc/source/getting_started/compatibility.rst index ebb19e327b8..b1bb0b2e80f 100644 --- a/doc/source/getting_started/compatibility.rst +++ b/doc/source/getting_started/compatibility.rst @@ -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.12.1 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 @@ -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 From 416027ddaf334d39fc9302db476fc07afa271cd2 Mon Sep 17 00:00:00 2001 From: "paul.profizi" Date: Thu, 1 Aug 2024 17:27:23 +0200 Subject: [PATCH 02/10] Update dpf_server.rst for 2025.1.pre0 Signed-off-by: paul.profizi --- doc/source/getting_started/dpf_server.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/source/getting_started/dpf_server.rst b/doc/source/getting_started/dpf_server.rst index 05d3cfa9e9b..b45ff7fe6df 100644 --- a/doc/source/getting_started/dpf_server.rst +++ b/doc/source/getting_started/dpf_server.rst @@ -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:: @@ -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 `, 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`. From b8f0c646c331d3d5adb440e6edc241c8095d28c6 Mon Sep 17 00:00:00 2001 From: Paul Profizi <100710998+PProfizi@users.noreply.github.com> Date: Thu, 1 Aug 2024 17:30:43 +0200 Subject: [PATCH 03/10] Update doc/source/getting_started/compatibility.rst --- doc/source/getting_started/compatibility.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/getting_started/compatibility.rst b/doc/source/getting_started/compatibility.rst index b1bb0b2e80f..c1252e8048f 100644 --- a/doc/source/getting_started/compatibility.rst +++ b/doc/source/getting_started/compatibility.rst @@ -50,7 +50,7 @@ package should also be synchronized with the server version. - ``ansys.dpf.gatebin`` binaries Python module version - ``ansys.dpf.gate`` Python module version * - 9.0 (Ansys 2025 R1 pre0) - - 0.12.1 and later + - 0.13.0 and later - None - None - None From 11b76fbf8925b9447afceca18c299b4b04288a77 Mon Sep 17 00:00:00 2001 From: "paul.profizi" Date: Thu, 1 Aug 2024 18:06:06 +0200 Subject: [PATCH 04/10] Fix typing in collection_base.py Signed-off-by: paul.profizi --- src/ansys/dpf/core/collection_base.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ansys/dpf/core/collection_base.py b/src/ansys/dpf/core/collection_base.py index 9438d319a66..765fd89c480 100644 --- a/src/ansys/dpf/core/collection_base.py +++ b/src/ansys/dpf/core/collection_base.py @@ -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 From 4271b886030de9d6dd0096b1630bf8269976126b Mon Sep 17 00:00:00 2001 From: "paul.profizi" Date: Thu, 1 Aug 2024 18:08:43 +0200 Subject: [PATCH 05/10] Fix docstring in plugins.py Signed-off-by: paul.profizi --- src/ansys/dpf/core/plugins.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ansys/dpf/core/plugins.py b/src/ansys/dpf/core/plugins.py index 90e5609ed9f..a3880ff0085 100644 --- a/src/ansys/dpf/core/plugins.py +++ b/src/ansys/dpf/core/plugins.py @@ -1,8 +1,8 @@ """ Python DPF plugins utilities ============================ - Contains the utilities specific to installing and using Python DPF plugins. + """ import os.path try: @@ -17,7 +17,7 @@ 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. @@ -25,6 +25,9 @@ def load_plugin_on_server(plugin, server=None, symbol="load_operators", generate 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] From 3a18e0d0993f516085d58d2d7df50aac4310d4c6 Mon Sep 17 00:00:00 2001 From: "paul.profizi" Date: Thu, 1 Aug 2024 18:11:55 +0200 Subject: [PATCH 06/10] Fix example references for hdf5 Signed-off-by: paul.profizi --- examples/05-file-IO/00-hdf5_double_float_comparison.py | 2 +- examples/05-file-IO/02-hdf5_serialize_and_read.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/05-file-IO/00-hdf5_double_float_comparison.py b/examples/05-file-IO/00-hdf5_double_float_comparison.py index 1df96bf3e3c..b39ed918179 100644 --- a/examples/05-file-IO/00-hdf5_double_float_comparison.py +++ b/examples/05-file-IO/00-hdf5_double_float_comparison.py @@ -1,6 +1,6 @@ # noqa: D400 """ -.. _ref_basic_hdf5: +.. _ref_io_hdf5_export_precision: HDF5 export and compare precision ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/examples/05-file-IO/02-hdf5_serialize_and_read.py b/examples/05-file-IO/02-hdf5_serialize_and_read.py index 69dae164761..388269943b9 100644 --- a/examples/05-file-IO/02-hdf5_serialize_and_read.py +++ b/examples/05-file-IO/02-hdf5_serialize_and_read.py @@ -1,5 +1,5 @@ """ -.. _ref_basic_hdf5: +.. _ref_io_hdf5_import_export: HDF5 export and import operations ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From 860f742617536ca13a62ba11437c306e2101875c Mon Sep 17 00:00:00 2001 From: "paul.profizi" Date: Thu, 1 Aug 2024 18:18:05 +0200 Subject: [PATCH 07/10] Fix example references for modal cyclic Signed-off-by: paul.profizi --- .../02-python_operators_with_dependencies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/08-python-operators/02-python_operators_with_dependencies.py b/examples/08-python-operators/02-python_operators_with_dependencies.py index 1c72c0a0983..65038a566c4 100644 --- a/examples/08-python-operators/02-python_operators_with_dependencies.py +++ b/examples/08-python-operators/02-python_operators_with_dependencies.py @@ -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 ` from the ``gltf`` operator. +# You can download :download:`output ` from the ``gltf`` operator. From 726478b372ff2fb95772caee48728b59432d5d37 Mon Sep 17 00:00:00 2001 From: "paul.profizi" Date: Thu, 1 Aug 2024 18:20:04 +0200 Subject: [PATCH 08/10] Fix example 03-fluids_isosurface.py formatting Signed-off-by: paul.profizi --- examples/12-fluids/03-fluids_isosurface.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/12-fluids/03-fluids_isosurface.py b/examples/12-fluids/03-fluids_isosurface.py index 994584b8351..1dd2ac8d7dc 100644 --- a/examples/12-fluids/03-fluids_isosurface.py +++ b/examples/12-fluids/03-fluids_isosurface.py @@ -2,7 +2,7 @@ .. _ref_fluids_isosurface: Compute iso-surfaces on fluid models ------------------------------------------- +------------------------------------ This example demonstrates how to compute iso-surfaces on fluid models. @@ -14,7 +14,7 @@ ############################################################################### # Import the ``dpf-core`` module and its examples files. -# ~~~~~~~~~~~~~~~~~~ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ import ansys.dpf.core as dpf from ansys.dpf.core import examples @@ -22,7 +22,7 @@ ############################################################################### # Specify the file path. -# ~~~~~~~~~~~~~~~~~~ +# ~~~~~~~~~~~~~~~~~~~~~~ # We work on a cas/dat.h5 file with only nodal variables. path = examples.download_cfx_heating_coil() @@ -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. @@ -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". @@ -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. @@ -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 From 3ed424ec7294822872fd8c56171995f87d565a4d Mon Sep 17 00:00:00 2001 From: "paul.profizi" Date: Thu, 1 Aug 2024 18:29:28 +0200 Subject: [PATCH 09/10] Fix formatting in licensing.rst Signed-off-by: paul.profizi --- doc/source/getting_started/licensing.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/source/getting_started/licensing.rst b/doc/source/getting_started/licensing.rst index fd09b1ecb99..7138da70251 100644 --- a/doc/source/getting_started/licensing.rst +++ b/doc/source/getting_started/licensing.rst @@ -16,6 +16,7 @@ For more information on installing DPF Server, see :ref:`ref_dpf_server`. .. _target_to_license_terms: + License terms ------------- @@ -46,6 +47,7 @@ existing license for the edition and version of DPF Server that you intend to us .. _configure_licensing: + Configure licensing ------------------- @@ -78,6 +80,7 @@ the Ansys license mechanism that is used with DPF Server. .. _target_to_ansys_license_mechanism: + License checks and usage ------------------------ @@ -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 ~~~~~~~~~~~~~~ @@ -137,6 +141,7 @@ To update the context, apply a new server context: server.apply_context(dpf.AvailableServerContexts.premium) .. _licensing_errors: + Licensing errors ~~~~~~~~~~~~~~~~ @@ -153,6 +158,7 @@ The following user actions may fail due to licensing: .. _target_to_ansys_license_increments_list: + Compatible Ansys license increments ----------------------------------- From ec139821f3aec35230a8dd3191051b6d105c7d32 Mon Sep 17 00:00:00 2001 From: "paul.profizi" Date: Thu, 1 Aug 2024 18:40:38 +0200 Subject: [PATCH 10/10] Remove direct references to getting_started_with_dpf_server Signed-off-by: paul.profizi --- README.md | 2 +- doc/source/user_guide/how_to.rst | 2 +- src/ansys/dpf/core/operator_specification.py | 2 +- src/ansys/dpf/core/server_context.py | 3 +-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ab1335e008b..573668ba4ab 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ To reach the project support team, email [pyansys.core@ansys.com](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 diff --git a/doc/source/user_guide/how_to.rst b/doc/source/user_guide/how_to.rst index bc28573411d..8d4247b9328 100644 --- a/doc/source/user_guide/how_to.rst +++ b/doc/source/user_guide/how_to.rst @@ -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 diff --git a/src/ansys/dpf/core/operator_specification.py b/src/ansys/dpf/core/operator_specification.py index 3ad053c9c4a..6e7782849c0 100644 --- a/src/ansys/dpf/core/operator_specification.py +++ b/src/ansys/dpf/core/operator_specification.py @@ -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 - `_). # noqa + `_). # noqa """ diff --git a/src/ansys/dpf/core/server_context.py b/src/ansys/dpf/core/server_context.py index 3379100c016..adfc0379a94 100644 --- a/src/ansys/dpf/core/server_context.py +++ b/src/ansys/dpf/core/server_context.py @@ -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 `_ + `list `_ 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: