Skip to content

Commit c9f3aa5

Browse files
update
1 parent 993ee2c commit c9f3aa5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8585

8686
# Here we will do some basic mathematical operations on each stress field
87+
8788
# Power
8889
# Raise each value of the field to power 2
8990
stress_1 = maths.pow_fc(fields_container=stress_1, factor=2.0).eval()
@@ -109,10 +110,11 @@
109110
# Reassembling the stress tensor
110111
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
111112

112-
# There are different methods to re-assemble the components
113+
# There are different methods to re-assemble the components, here we use the
114+
# operator :class:'assemble_scalars_to_matrices_fc <ansys.dpf.core.operators.utility.assemble_scalars_to_matrices_fc.assemble_scalars_to_matrices_fc>'
113115

114-
# 1) With the operator :class:'assemble_scalars_to_matrices_fc <ansys.dpf.core.operators.utility.assemble_scalars_to_matrices_fc.assemble_scalars_to_matrices_fc>'
115-
assemble_1 = dpf.operators.utility.assemble_scalars_to_matrices_fc(
116+
re_assemble = dpf.operators.utility.assemble_scalars_to_matrices_fc(
116117
xx=stress_1, yy=stress_2, zz=stress_3, xy=stress_4, yz=stress_5, xz=stress_6, symmetrical=True
117118
).eval()
118-
print(assemble_1, assemble_1[0])
119+
120+
print(re_assemble, re_assemble[0])

0 commit comments

Comments
 (0)