Skip to content

Commit 40d58a9

Browse files
committed
Merge branch 'main' into feat/upgrading-python-versions
2 parents 3f67a2d + 3145975 commit 40d58a9

File tree

5 files changed

+26
-11
lines changed

5 files changed

+26
-11
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ env:
2424
# You should go up in number, if you go down (or repeat a previous value)
2525
# you might end up reusing a previous cache if it haven't been deleted already.
2626
# It applies 7 days retention policy by default.
27-
RESET_PIP_CACHE: 9
28-
RESET_EXAMPLES_CACHE: 9
29-
RESET_DOC_BUILD_CACHE: 9
30-
RESET_AUTOSUMMARY_CACHE: 9
27+
RESET_PIP_CACHE: 11
28+
RESET_EXAMPLES_CACHE: 11
29+
RESET_DOC_BUILD_CACHE: 11
30+
RESET_AUTOSUMMARY_CACHE: 11
3131

3232
concurrency:
3333
group: ${{ github.workflow }}-${{ github.ref }}

doc/source/examples/technology_showcase_examples/techdemo-1/ex_0-tecbrakesqueal.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,6 @@ Start this example by launching MAPDL and loading the model.
220220
pyvista.global_theme.background = 'white'
221221
pyvista.global_theme.window_size = [600, 400]
222222
pyvista.global_theme.axes.show = True
223-
pyvista.global_theme.antialiasing = True
224223
pyvista.global_theme.show_scalar_bar = True
225224

226225
from ansys.mapdl.core import examples

doc/source/examples/technology_showcase_examples/techdemo-28/ex_28-tecfricstir.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ cylindrical shape tool, as shown in the following figure:
128128
pyvista.global_theme.background = 'white'
129129
pyvista.global_theme.window_size = [600, 400]
130130
pyvista.global_theme.axes.show = True
131-
pyvista.global_theme.antialiasing = True
132131
pyvista.global_theme.show_scalar_bar = True
133132
mytheme = pyvista.global_theme
134133

doc/source/images/dcb_test.png

43.3 KB
Loading

examples/00-mapdl-examples/composite_dcb.py

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -304,13 +304,20 @@
304304
# Use PyDPF to visualize the crack opening throughout the simulation as
305305
# an animation.
306306

307-
# Upload file to DPF server
308-
temp_directory = tempfile.gettempdir()
309-
rst_path = mapdl.download_result(temp_directory)
310-
server_file_path = dpf.upload_file_in_tmp_folder(rst_path)
307+
try:
308+
# ONLY IF DPF SERVER DEPLOYED WITH gRPC COMMUNICATION
309+
# Upload file to DPF server
310+
temp_directory = tempfile.gettempdir()
311+
rst_path = mapdl.download_result(temp_directory)
312+
dpf.connect_to_server()
313+
server_file_path = dpf.upload_file_in_tmp_folder(rst_path)
314+
data_src = dpf.DataSources(server_file_path)
315+
except:
316+
# Using DPF locally
317+
rst = mapdl.download_result()
318+
data_src = dpf.DataSources(rst)
311319

312320
# Generate the DPF model
313-
data_src = dpf.DataSources(server_file_path)
314321
model = Model(data_src)
315322

316323
# Get the mesh of the whole model
@@ -421,6 +428,16 @@
421428
plt.xlabel("Displacement [mm]")
422429
plt.show()
423430

431+
###############################################################################
432+
# Animate results using PyDPF with .anmiate() method
433+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
434+
# Use PyDPF method :func:`FieldsContainer.animate() <ansys.dpf.core.fields_container.FieldsContainer.animate>` to visualize the crack opening throughout the simulation as
435+
# an animation.
436+
disp = model.results.displacement.on_all_time_freqs.eval()
437+
camera_pos = disp.animate(
438+
scale_factor=10.0, save_as="dcb_animate.gif", return_cpos=True, show_axes=True
439+
)
440+
424441
###############################################################################
425442
#
426443
# Exit MAPDL

0 commit comments

Comments
 (0)