Skip to content

Commit 991b95a

Browse files
Merge branch 'master' into doc/new-tutorials-section
2 parents 42c47eb + ce858d8 commit 991b95a

27 files changed

+663
-139
lines changed

.ci/run_examples.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@
3333
print(file)
3434
minimum_version_str = get_example_required_minimum_dpf_version(file)
3535
if float(server_version) - float(minimum_version_str) < -0.05:
36-
print(f"Example skipped as it requires DPF {minimum_version_str}.")
36+
print(f"Example skipped as it requires DPF {minimum_version_str}.", flush=True)
3737
continue
3838
try:
3939
out = subprocess.check_output([sys.executable, file])
4040
except subprocess.CalledProcessError as e:
4141
sys.stderr.write(str(e.args))
4242
if e.returncode != 3221225477:
43-
print(out)
43+
print(out, flush=True)
4444
raise e
45-
print("PASS")
45+
print("PASS", flush=True)

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ body:
101101
id: installed-packages
102102
attributes:
103103
label: Installed packages
104-
description: Run `python -m pip list` to list installed packages
105-
placeholder: Paste the output of `python -m pip list` here
104+
description: Run `python -m pip freeze` to list installed packages
105+
placeholder: Paste the output of `python -m pip freeze` here
106106
validations:
107107
required: true

.github/workflows/ci_release.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ jobs:
8888
with:
8989
ANSYS_VERSION: ${{ github.event.inputs.ansys_version || '251' }}
9090
python_versions: '["3.10", "3.11"]'
91+
DOCSTRING: false
9192
wheel: false
9293
wheelhouse: true
9394
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
@@ -109,6 +110,7 @@ jobs:
109110
with:
110111
ANSYS_VERSION: ${{ github.event.inputs.ansys_version || '251' }}
111112
python_versions: '["3.10", "3.11"]'
113+
DOCSTRING: false
112114
wheel: false
113115
wheelhouse: false
114116
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
@@ -131,6 +133,15 @@ jobs:
131133
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
132134
secrets: inherit
133135

136+
retro_242:
137+
name: "retro 242"
138+
uses: ./.github/workflows/tests.yml
139+
with:
140+
ANSYS_VERSION: "242"
141+
python_versions: '["3.9"]'
142+
DOCSTRING: false
143+
secrets: inherit
144+
134145
retro_241:
135146
name: "retro 241"
136147
uses: ./.github/workflows/tests.yml

.github/workflows/examples.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ jobs:
132132
shell: bash
133133
working-directory: .ci
134134
run: |
135-
echo on
136135
python run_examples.py
137136
138137
- name: "Kill all servers"

doc/source/_static/dpf_operators.html

Lines changed: 4 additions & 4 deletions
Large diffs are not rendered by default.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
.. _ref_dpf_ansys_file_support_table:
2+
3+
.. table:: DPF support of ANSYS files
4+
:widths: auto
5+
:align: center
6+
7+
+--------------------+------------------------+----------------------------------+----------------------------------+
8+
| **Solver** | **File format** | **Server version** | **DPF examples** |
9+
+====================+========================+==================================+==================================+
10+
| | .rst, .mode | **1.0** and later | :ref:`ref_basic_example` |
11+
| MAPDL | .rfrq, .rdsp | (*Ansys 2021 R1*) | |
12+
| +------------------------+----------------------------------+----------------------------------+
13+
| | .psd, .prs | **10.0** and later | |
14+
| | | (*Ansys 2025 R2 pre0*) | |
15+
+--------------------+------------------------+----------------------------------+----------------------------------+
16+
| LS DYNA | .d3plot, .binout | **4.0** and later | :ref:`examples_lsdyna` |
17+
| | | (*Ansys 2022 R2*) | |
18+
+--------------------+------------------------+----------------------------------+----------------------------------+
19+
| | *CFF restart files* | | :ref:`ref_fluids_model` |
20+
| | .cas/dat.h5 | +----------------------------------+
21+
| | | **7.0** and later | :ref:`ref_fluids_mesh` |
22+
| Fluent +------------------------+ (*Ansys 2024 R1 pre0*) +----------------------------------+
23+
| | *Project files* | | :ref:`ref_fluids_results` |
24+
| | .flprj | | |
25+
+--------------------+------------------------+----------------------------------+----------------------------------+
26+
| | *CFF files* | | :ref:`examples_cfx` |
27+
| | .cas/dat.cff | +----------------------------------+
28+
| | .res | **7.0** and later | :ref:`ref_fluids_model` |
29+
| CFX +------------------------+ (*Ansys 2024 R1 pre0*) +----------------------------------+
30+
| | *Project files* | | :ref:`ref_fluids_mesh` |
31+
| | .flprj | +----------------------------------+
32+
| | | | :ref:`ref_fluids_results` |
33+
+--------------------+------------------------+----------------------------------+----------------------------------+

doc/source/index.rst

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,7 @@ apps for both data input and data output, including visualization and
1414
result plots. The following table shows an exhaustive list of supported
1515
apps by DPF and their related formats:
1616

17-
.. table:: Truth table for "not"
18-
:widths: auto
19-
:align: center
20-
21-
+--------------------+------------------------+----------------------------------+----------------------------------+
22-
| **Solver** | **File format** | **Server version** | **DPF examples** |
23-
+====================+========================+==================================+==================================+
24-
| || .rst, .mode || **1.0** and later | :ref:`ref_basic_example` |
25-
| MAPDL || .rfrq, .rdsp || (*Ansys 2021 R1*) | |
26-
+--------------------+------------------------+----------------------------------+----------------------------------+
27-
| LS DYNA | .d3plot, .binout || **4.0** and later | :ref:`examples_lsdyna` |
28-
| | || (*Ansys 2022 R2*) | |
29-
+--------------------+------------------------+----------------------------------+----------------------------------+
30-
| || *CFF restart files* || | :ref:`ref_fluids_model` |
31-
| || .cas/dat.h5 || +----------------------------------+
32-
| | || **7.0** and later | :ref:`ref_fluids_mesh` |
33-
| Fluent +------------------------+| (*Ansys 2024 R1 pre0*) +----------------------------------+
34-
| || *Project files* | | :ref:`ref_fluids_results` |
35-
| || .flprj | | |
36-
+--------------------+------------------------+----------------------------------+----------------------------------+
37-
| || *CFF files* || | :ref:`examples_cfx` |
38-
| || .cas/dat.cff || +----------------------------------+
39-
| || .res || **7.0** and later | :ref:`ref_fluids_model` |
40-
| CFX +------------------------+| (*Ansys 2024 R1 pre0*) +----------------------------------+
41-
| || *Project files* | | :ref:`ref_fluids_mesh` |
42-
| || .flprj | +----------------------------------+
43-
| || | | :ref:`ref_fluids_results` |
44-
+--------------------+------------------------+----------------------------------+----------------------------------+
17+
.. include:: dpf_ansys_file_support_table.rst
4518

4619
Visualisation is ensured by VTK and leverages `PyVista tools
4720
<https://docs.pyvista.org>`_.

examples/04-advanced/13-manage_licensing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
# license increment is used, and for what maximum duration.
105105

106106
# Use the LicenseContextManager to block a specific increment for a limited duration
107-
with dpf.LicenseContextManager(increment_name="preppost", license_timeout_in_seconds=1.0) as lic:
107+
with dpf.LicenseContextManager(increment_name="preppost", license_timeout_in_seconds=5.0) as lic:
108108
# Instantiate the licensed operator
109109
out = op_premium.eval()
110110
print(out)

examples/08-python-operators/00-wrapping_numpy_capabilities.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,9 @@
5656
#
5757
# Download and display the Python script.
5858

59-
from ansys.dpf.core import examples
60-
from ansys.dpf import core as dpf
61-
59+
from ansys.dpf.core.examples import download_easy_statistics
6260

63-
GITHUB_SOURCE_URL = (
64-
"https://github.com/ansys/pydpf-core/" "raw/examples/first_python_plugins/python_plugins"
65-
)
66-
EXAMPLE_FILE = GITHUB_SOURCE_URL + "/easy_statistics.py"
67-
operator_file_path = examples.downloads._retrieve_file(
68-
EXAMPLE_FILE, "easy_statistics.py", "python_plugins"
69-
)
61+
operator_file_path = download_easy_statistics()
7062

7163
with open(operator_file_path, "r") as f:
7264
for line in f.readlines():

examples/08-python-operators/01-package_python_operators.py

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -54,33 +54,9 @@
5454
#
5555
# Download the ``average_filter_plugin`` plug-in package that has already been
5656
# created for you.
57-
58-
import os
59-
6057
from ansys.dpf.core import examples
61-
from ansys.dpf import core as dpf
62-
63-
64-
print("\033[1m average_filter_plugin")
65-
file_list = ["__init__.py", "operators.py", "operators_loader.py", "common.py"]
66-
plugin_folder = None
67-
GITHUB_SOURCE_URL = (
68-
"https://github.com/ansys/pydpf-core/raw/"
69-
"examples/first_python_plugins/python_plugins/average_filter_plugin"
70-
)
71-
72-
for file in file_list:
73-
EXAMPLE_FILE = GITHUB_SOURCE_URL + "/average_filter_plugin/" + file
74-
operator_file_path = examples.downloads._retrieve_file(
75-
EXAMPLE_FILE, file, "python_plugins/average_filter_plugin"
76-
)
77-
plugin_folder = os.path.dirname(operator_file_path)
78-
print(f"\033[1m {file}:\n \033[0m")
79-
with open(operator_file_path, "r") as f:
80-
for line in f.readlines():
81-
print("\t\t\t" + line)
82-
print("\n\n")
8358

59+
plugin_folder = examples.download_average_filter_plugin()
8460

8561
###############################################################################
8662
# Load the plug-in package

0 commit comments

Comments
 (0)