Skip to content

Commit 21ed34e

Browse files
committed
Merge branch 'master' into mhanmer/operator_doc_template
2 parents cd12ecc + 640780c commit 21ed34e

40 files changed

+877
-303
lines changed

.github/workflows/test_docker.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ jobs:
5151
with:
5252
python-version: ${{ matrix.python-version }}
5353

54+
- name: "Setup Graphviz"
55+
uses: ts-graphviz/setup-graphviz@v2
56+
5457
- name: "Install requirements"
5558
run: pip install -r requirements/requirements_build.txt
5659

.github/workflows/tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ jobs:
114114
with:
115115
python-version: ${{ matrix.python-version }}
116116

117+
- name: "Setup Graphviz"
118+
uses: ts-graphviz/setup-graphviz@v2
119+
117120
- name: "Update pip to the latest version and install tox"
118121
shell: pwsh
119122
run: |

doc/source/_static/dpf_operators.html

Lines changed: 7 additions & 7 deletions
Large diffs are not rendered by default.

requirements/requirements_docs.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ ansys-sphinx-theme[autoapi]==1.3.1
22
enum-tools[sphinx]==0.12.0
33
graphviz==0.20.1
44
imageio==2.36.0
5-
imageio-ffmpeg==0.5.1
5+
imageio-ffmpeg==0.6.0
66
nbsphinx==0.9.6
7-
pypandoc==1.14
7+
pypandoc==1.15
88
pytest-sphinx==0.6.3
99
pyvista==0.44.2
1010
sphinx==7.4.7
1111
sphinx-copybutton==0.5.2
12-
sphinx-gallery==0.18.0
12+
sphinx-gallery==0.19.0
1313
sphinx-notfound-page==1.1.0
1414
sphinx-reredirects==0.1.3
1515
sphinx_design==0.6.1
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
importlib-metadata==8.5.0
2-
numpy==2.2.1
2+
numpy==2.2.3
33
packaging==24.2
4-
psutil==6.1.1
4+
psutil==7.0.0
55
tqdm==4.67.1

requirements/requirements_test.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
ansys-platform-instancemanagement==1.1.2
22
coverage==7.6.11
3+
graphviz==0.20.1
34
imageio==2.36.0
4-
imageio-ffmpeg==0.5.1
5+
imageio-ffmpeg==0.6.0
56
pytest==8.3.4
67
pytest-cov==6.0.0
78
pytest-order==1.3.0

src/ansys/dpf/core/animator.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ def animate_workflow(
6060
save_as="",
6161
mode_number=None,
6262
scale_factor=1.0,
63+
shell_layer=core.shell_layers.top,
6364
**kwargs,
6465
):
6566
unit = loop_over.unit
@@ -121,6 +122,7 @@ def render_frame(frame):
121122
field,
122123
deform_by=deform,
123124
scale_factor_legend=scale_factor[frame],
125+
shell_layer=shell_layer,
124126
**kwargs,
125127
)
126128
kwargs_in = _sort_supported_kwargs(bound_method=self._plotter.add_text, **freq_kwargs)
@@ -267,33 +269,37 @@ def animate(
267269
save_as: str = None,
268270
scale_factor: Union[float, Sequence[float]] = 1.0,
269271
freq_kwargs: dict = None,
272+
shell_layer: core.shell_layers = core.shell_layers.top,
270273
**kwargs,
271274
):
272275
"""
273276
Animate the workflow of the Animator, using inputs.
274277
275278
Parameters
276279
----------
277-
loop_over : Field
280+
loop_over:
278281
Field of values to loop over.
279282
Can for example be a subset of sets of TimeFreqSupport.time_frequencies.
280283
The unit of the Field will be displayed if present.
281-
output_name : str, optional
284+
output_name:
282285
Name of the workflow output to use as Field for each frame's contour.
283286
Defaults to "to_render".
284-
input_name : list of str, optional
287+
input_name:
285288
Name of the workflow inputs to feed loop_over values into.
286289
Defaults to "loop_over".
287-
save_as : str, optional
290+
save_as:
288291
Path of file to save the animation to. Defaults to None. Can be of any format supported
289292
by pyvista.Plotter.write_frame (.gif, .mp4, ...).
290-
scale_factor : float, list, optional
293+
scale_factor:
291294
Scale factor to apply when warping the mesh. Defaults to 1.0. Can be a list to make
292295
scaling frequency-dependent.
293-
freq_kwargs : dict, optional
296+
freq_kwargs:
294297
Dictionary of kwargs given to the :func:`pyvista.Plotter.add_text` method, used to
295298
format the frequency information. Can also contain a "fmt" key,
296299
defining the format for the frequency displayed with a string such as ".3e".
300+
shell_layer:
301+
Enum used to set the shell layer if the field to plot
302+
contains shell elements. Defaults to top layer.
297303
**kwargs : optional
298304
Additional keyword arguments for the animator.
299305
Used by :func:`pyvista.Plotter` (off_screen, cpos, ...),
@@ -314,6 +320,7 @@ def animate(
314320
save_as=save_as,
315321
scale_factor=scale_factor,
316322
freq_kwargs=freq_kwargs,
323+
shell_layer=shell_layer,
317324
**kwargs,
318325
)
319326

src/ansys/dpf/core/available_result.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ class Homogeneity(Enum):
102102
mass_flow_rate = 122
103103
specific_energy = 123
104104
specific_entropy = 124
105+
force_density = 125
106+
magnetic_potential = 126
105107

106108

107109
class AvailableResult:

src/ansys/dpf/core/collection_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
dpf_vector,
4646
)
4747

48-
if TYPE_CHECKING:
48+
if TYPE_CHECKING: # pragma: no cover
4949
from ansys.dpf.core.support import Support
5050

5151
from ansys.dpf.gate.integral_types import MutableListInt32

src/ansys/dpf/core/data_tree.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import weakref
2929

3030
from ansys.dpf.core import collection_base, common, errors, server as server_module
31-
from ansys.dpf.core.mapping_types import types
31+
from ansys.dpf.core.common import types
3232
from ansys.dpf.gate import (
3333
data_processing_capi,
3434
data_processing_grpcapi,

0 commit comments

Comments
 (0)