Skip to content

Commit ddd1e2c

Browse files
authored
Merge branch 'master' into ci/add_doc_build_cache
2 parents a749326 + fb1fd63 commit ddd1e2c

25 files changed

+1019
-573
lines changed

CONTRIBUTORS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* [Guillem Barroso](https://github.com/GuillemBarroso)
2525
* [guptadivya1501](https://github.com/guptadivya1501)
2626
* [hoangxuyenle](https://github.com/hoangxuyenle)
27+
* [Hélène Lachambre](https://github.com/anshlachamb)
2728
* [Jamil HAJJAR](https://github.com/ansjhajjar)
2829
* [janvonrickenbach](https://github.com/janvonrickenbach)
2930
* [Jean-Francois Thuong](https://github.com/jfthuong)
@@ -32,6 +33,7 @@
3233
* [Jorge Martínez](https://github.com/jorgepiloto)
3334
* [Jose Armando Henriquez Roa](https://github.com/jose-henriquez-roa)
3435
* [jose-henriquezroa](https://github.com/jose-henriquezroa)
36+
* [Joshua Fairchild](https://github.com/joshuafairch)
3537
* [jviqueg](https://github.com/jviqueg)
3638
* [Kathy Pippert](https://github.com/PipKat)
3739
* [kmahajan-cadfem](https://github.com/kmahajan-cadfem)
@@ -44,6 +46,7 @@
4446
* [Paul P](https://github.com/TheGoldfish01)
4547
* [Pierre Lulé](https://github.com/plule-ansys)
4648
* [Rafael Canton](https://github.com/rafacanton)
49+
* [Rajesh Meena](https://github.com/MeenaBytes)
4750
* [Ramdane Lagha](https://github.com/rlagha)
4851
* [Revathy Venugopal](https://github.com/Revathyvenugopal162)
4952
* [Roberto Pastor Muela](https://github.com/RobPasMue)

doc/source/_static/dpf_operators.html

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

examples/01-mathematical-operations/matrix-operations.py

Lines changed: 0 additions & 124 deletions
This file was deleted.

examples/09-averaging/01-average_across_bodies.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
###############################################################################
7474
# Averaging across bodies with DPF
7575
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
76-
# # To compare the results of averaging across bodies and not averaging,
76+
# To compare the results of averaging across bodies and not averaging,
7777
# define two workflows.
7878
# The variable of interest is the Von Mises stress field, which is
7979
# calculated by applying the ``eqv_fc`` operator on the
@@ -91,7 +91,7 @@
9191
# ds [label="data_src", shape=box, style=filled, fillcolor=cadetblue2];
9292
# stress [label="stress"];
9393
# scp [label="split_on_property_type"];
94-
# eln_to_n ["elemental_nodal_to_nodal_fc"];
94+
# eln_to_n [label="elemental_nodal_to_nodal_fc"];
9595
# vm [label="eqv_fc"];
9696
# avg [label="weighted_merge_fields_by_label"];
9797
# subgraph cluster_1 {
File renamed without changes.

requirements/requirements_docs.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ansys-sphinx-theme[autoapi]@git+https://github.com/ansys/ansys-sphinx-theme.git
22
enum-tools[sphinx]==0.13.0
3-
graphviz==0.20.1
3+
graphviz==0.21
44
imageio==2.37.0
55
imageio-ffmpeg==0.6.0
66
pypandoc==1.15

requirements/requirements_test.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ansys-platform-instancemanagement==1.1.2
22
coverage==7.8.2
3-
graphviz==0.20.1
3+
graphviz==0.21
44
imageio==2.37.0
55
imageio-ffmpeg==0.6.0
66
pypandoc_binary==1.15

src/ansys/dpf/core/available_result.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ def qualifier_combinations(self) -> List[dict]:
312312
"ENF": {"location": "ElementalNodal", "scripting_name": "element_nodal_forces"},
313313
"EPEL": {"location": "ElementalNodal", "scripting_name": "elastic_strain"},
314314
"EPPL": {"location": "ElementalNodal", "scripting_name": "plastic_strain"},
315-
"ECR": {"location": "ElementalNodal", "scripting_name": "creep_strain"},
315+
"EPCR": {"location": "ElementalNodal", "scripting_name": "creep_strain"},
316316
"BFE": {"location": "ElementalNodal", "scripting_name": "structural_temperature"},
317317
"ETH": {"location": "ElementalNodal", "scripting_name": "thermal_strain"},
318318
"ETH_SWL": {"location": "ElementalNodal", "scripting_name": "swelling_strains"},

src/ansys/dpf/core/common.py

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,79 @@
2828
from typing import Dict
2929

3030
from ansys.dpf.core.misc import module_exists
31-
from ansys.dpf.gate.common import ProgressBarBase, locations # noqa: F401
31+
from ansys.dpf.gate.common import (
32+
ProgressBarBase, # noqa: F401
33+
)
3234
from ansys.dpf.gate.dpf_vector import ( # noqa: F401
3335
get_size_of_list as _get_size_of_list,
3436
)
3537

3638

39+
class locations:
40+
"""Contains strings for scoping and field locations.
41+
42+
Attributes
43+
----------
44+
none = "none"
45+
46+
elemental = "Elemental"
47+
data is one per element
48+
49+
elemental_nodal = "ElementalNodal"
50+
one per node per element
51+
52+
nodal = "Nodal"
53+
one per node
54+
55+
time_freq = "TimeFreq_sets"
56+
one per time set
57+
58+
overall = "overall"
59+
applies everywhere
60+
61+
time_freq_step = "TimeFreq_steps"
62+
one per time step
63+
64+
faces = "Faces"
65+
one per face
66+
67+
zone = "zone"
68+
one per zone
69+
70+
elemental_and_faces = "ElementalAndFaces"
71+
data available in elements and faces of the model
72+
"""
73+
74+
none = "none"
75+
76+
# data is one per element
77+
elemental = "Elemental"
78+
79+
# one per node per element
80+
elemental_nodal = "ElementalNodal"
81+
82+
# one per node
83+
nodal = "Nodal"
84+
85+
# one per time set
86+
time_freq = "TimeFreq_sets"
87+
88+
# applies everywhere
89+
overall = "overall"
90+
91+
# one per time step
92+
time_freq_step = "TimeFreq_steps"
93+
94+
# one per face
95+
faces = "Faces"
96+
97+
# one per zone
98+
zone = "zone"
99+
100+
# data available in elements and faces of the model
101+
elemental_and_faces = "ElementalAndFaces"
102+
103+
37104
def _camel_to_snake_case(name):
38105
return re.sub(r"(?<!^)(?=[A-Z])", "_", name).lower()
39106

src/ansys/dpf/core/dpf_operator.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,9 @@ def eval(self, pin=None):
816816
if output._pin == pin:
817817
return output()
818818

819-
def _find_outputs_corresponding_pins(self, type_names, inpt, pin, corresponding_pins):
819+
def _find_outputs_corresponding_pins(
820+
self, type_names, inpt, pin, corresponding_pins, input_type_name
821+
):
820822
from ansys.dpf.core.results import Result
821823

822824
for python_name in type_names:
@@ -827,7 +829,7 @@ def _find_outputs_corresponding_pins(self, type_names, inpt, pin, corresponding_
827829
python_name = "bool"
828830

829831
# Type match
830-
if type(inpt).__name__ == python_name:
832+
if input_type_name == python_name:
831833
corresponding_pins.append(pin)
832834
# if the inpt has multiple potential outputs, find which ones can match
833835
elif isinstance(inpt, (_Outputs, Operator, Result)):

0 commit comments

Comments
 (0)