Skip to content

Commit fd5efa2

Browse files
authored
Merge branch 'main' into feat/replacing-mesh
2 parents a6d8fbb + f6c88a0 commit fd5efa2

File tree

19 files changed

+71
-85
lines changed

19 files changed

+71
-85
lines changed

doc/source/_static/custom.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
@import url("default.css");
2+
3+
.red {
4+
color: red;
5+
}
6+
7+
.green {
8+
color: green;
9+
}
10+
11+
.blue {
12+
color: blue;
13+
}

doc/source/_templates/layout.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{% extends "!layout.html" %}
2+
3+
{% block extrahead %}
4+
<link rel="stylesheet" type="text/css" href="{{ pathto('_static/custom.css', 1) }}" />
5+
6+
{% endblock %}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ Start this example by launching MAPDL and loading the model.
202202
start(mapdl, 'linear_non_prestressed')
203203
mapdl.title("linear_non_prestressed, Solving brake squeal problem using linear non pre-stressed modal solve")
204204
205-
_ = mapdl.eplot(
205+
mapdl.eplot(
206206
vtk=True, cpos="xy", show_edges=True, show_axes=False, line_width=2, background="w"
207207
)
208208

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
.. _tech_demo_28:
22

3+
.. role:: red
4+
5+
.. role:: blue
6+
7+
.. role:: green
38

49
Friction Stir Welding (FSW) Simulation
510
***************************************
@@ -451,7 +456,7 @@ model the contact surface on the top surface of the workpiece, and the
451456
p.show()
452457

453458
**Figure 28.4: Contact Pair Between Tool and Workpiece.**
454-
``CONTA174`` in blue, and ``TARGE170`` in red.
459+
``CONTA174`` in :blue:`blue`, and ``TARGE170`` in :red:`red`.
455460

456461

457462
Two real constants are specified to model friction-induced heat generation.
@@ -574,7 +579,7 @@ The following contact settings are used for the ``CONTA174`` elements:
574579

575580
**Figure 28.5: Rigid Surface Constrained.**
576581
Pilot node or master with applied boundary conditions and the constrained
577-
top surface of the tool (blue).**
582+
top surface of the tool (:blue:`blue`).**
578583

579584

580585
.. code:: python
@@ -862,7 +867,7 @@ perpendicular direction (z direction).
862867
pl.show()
863868

864869
**Figure 28.7: Mechanical Boundary Conditions:**
865-
X-direction (``UX``) in red, Y-direction (``UY``) in green, and Z-direction (``UZ``) in blue.
870+
X-direction (``UX``) in :red:`red`, Y-direction (``UY``) in :green:`green`, and Z-direction (``UZ``) in :blue:`blue`.
866871

867872

868873
.. code:: python
@@ -1396,7 +1401,7 @@ load step is shown in the following figure:
13961401

13971402

13981403
**Figure 28.21: Contact Status at Interface with Bonding Temperature 1000 °C**
1399-
Elements can be in near-contact (blue), sliding (green) or sticking (red) states.
1404+
Elements can be in near-contact (:blue:`blue`), sliding (:green:`green`) or sticking (:red:`red`) states.
14001405

14011406

14021407
The sticking portion of the interface shows the bonding or welding region of
@@ -1414,7 +1419,7 @@ welding region would increase, as shown in this figure:
14141419
pl.show()
14151420

14161421
**Figure 28.22: Contact Status at Interface with Bonding Temperature 900 °C**
1417-
Elements can be in near-contact (blue), sliding (green) or sticking (red) states.
1422+
Elements can be in near-contact (:blue:`blue`), sliding (:green:`green`) or sticking (:red:`red`) states.
14181423

14191424

14201425
28.7.4. Heat Generation

doc/source/mapdl_commands/map.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ and map it onto a geometry.
1313
:toctree: _autosummary/
1414

1515
Mapdl.ftype
16-
Mapdl.map_
1716
Mapdl.plgeom
1817
Mapdl.plmap
1918
Mapdl.read

examples/00-mapdl-examples/2d_plate_with_a_hole.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
plate_with_hole_anum = mapdl.asba(rect_anum, circ_anum)
7272

7373
# finally, plot the lines of the plate
74-
_ = mapdl.lplot(cpos="xy", line_width=3, font_size=26, color_lines=True, background="w")
74+
mapdl.lplot(cpos="xy", line_width=3, font_size=26, color_lines=True, background="w")
7575

7676
###############################################################################
7777
# Meshing
@@ -97,7 +97,7 @@
9797

9898
mapdl.esize(plate_esize)
9999
mapdl.amesh(plate_with_hole_anum)
100-
_ = mapdl.eplot(
100+
mapdl.eplot(
101101
vtk=True, cpos="xy", show_edges=True, show_axes=False, line_width=2, background="w"
102102
)
103103

@@ -137,7 +137,7 @@
137137
mapdl.f("ALL", "FX", 1000)
138138

139139
# finally, be sure to select all nodes again to solve the entire solution
140-
_ = mapdl.allsel()
140+
mapdl.allsel(mute=True)
141141

142142

143143
###############################################################################

examples/00-mapdl-examples/3d_notch.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
mapdl.vext(cut_area, dz=thickness)
7878

7979
# Checking volume plot
80-
_ = mapdl.vplot(vtk=True, show_lines=True, show_axes=True, smooth_shading=True)
80+
mapdl.vplot(vtk=True, show_lines=True, show_axes=True, smooth_shading=True)
8181

8282

8383
###############################################################################
@@ -124,9 +124,7 @@
124124
mapdl.esize() # this is tough to automate
125125
mapdl.et(1, "SOLID186")
126126
mapdl.vsweep("all")
127-
_ = mapdl.eplot(
128-
vtk=True, show_edges=True, show_axes=False, line_width=2, background="w"
129-
)
127+
mapdl.eplot(vtk=True, show_edges=True, show_axes=False, line_width=2, background="w")
130128

131129

132130
###############################################################################
@@ -175,7 +173,7 @@
175173
mapdl.f("ALL", "FX", 1000)
176174

177175
# finally, be sure to select all nodes again to solve the entire solution
178-
_ = mapdl.allsel(mute=True)
176+
mapdl.allsel(mute=True)
179177

180178

181179
###############################################################################
@@ -185,7 +183,7 @@
185183
mapdl.run("/SOLU")
186184
mapdl.antype("STATIC")
187185
mapdl.solve()
188-
_ = mapdl.finish()
186+
mapdl.finish(mute=True)
189187

190188

191189
###############################################################################

examples/00-mapdl-examples/pyvista_mesh.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@
7474
###############################################################################
7575
# Animate a high frequency mode
7676
#
77-
# Get a smoother plot by disabling movie_filename and increasing ``nangles``.
77+
# Get a smoother plot by disabling movie_filename and increasing ``n_frames``.
7878
# Enable a continuous plot looping with ```loop=True```.
7979

8080
result.animate_nodal_displacement(
8181
18,
8282
loop=False,
8383
add_text=False,
84-
nangles=30,
84+
n_frames=30,
8585
displacement_factor=0.4,
8686
show_axes=False,
8787
background="w",

examples/01-apdlmath-examples/eigen_solve.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def get_res(i):
171171
plt.xlabel("Frequency #")
172172
plt.ylabel("Errors (%)")
173173
ax.bar(x, mapdl_acc, label="MAPDL Results")
174-
174+
plt.show()
175175

176176
###############################################################################
177177
# stop mapdl

examples/02-geometry/00-keypoints.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,5 +142,7 @@
142142
)
143143

144144
###############################################################################
145+
#
145146
# stop mapdl
147+
#
146148
mapdl.exit()

examples/02-geometry/02-areas.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -175,13 +175,13 @@ def generate_random_area():
175175
# Note that the `cpos` keyword argument can be used to describe the
176176
# camera direction from the following:
177177
#
178-
# - 'iso' - Isometric view
179-
# - 'xy' - XY Plane view
180-
# - 'xz' - XZ Plane view
181-
# - 'yx' - YX Plane view
182-
# - 'yz' - YZ Plane view
183-
# - 'zx' - ZX Plane view
184-
# - 'zy' - ZY Plane view
178+
# - ``iso`` - Isometric view
179+
# - ``xy`` - XY Plane view
180+
# - ``xz`` - XZ Plane view
181+
# - ``yx`` - YX Plane view
182+
# - ``yz`` - YZ Plane view
183+
# - ``zx`` - ZX Plane view
184+
# - ``zy`` - ZY Plane view
185185

186186
mapdl.aplot(quality=1, show_bounds=True, cpos="iso", show_lines=True)
187187

examples/03-tips-n-tricks/00-example-template.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,15 @@
3838
After this preamble is complete, the first code block begins.
3939
"""
4040

41-
# Your code goes here...
4241
from ansys.mapdl.core import launch_mapdl
4342

44-
# start MAPDL and enter the pre-processing routine
43+
# start MAPDL
4544
mapdl = launch_mapdl()
46-
mapdl
45+
print(mapdl)
46+
47+
# Your code goes here...
48+
# mapdl.prep7()
49+
# mapdl...
4750

4851
###############################################################################
4952
# Section Title
@@ -63,7 +66,6 @@
6366
mapdl.clear()
6467
mapdl.prep7()
6568
print(mapdl)
66-
mapdl
6769

6870
###############################################################################
6971
# Plots and images
@@ -88,6 +90,7 @@
8890
ax.plot(x, y)
8991
ax.set_xlabel("x")
9092
ax.set_ylabel("y")
93+
plt.show()
9194

9295
###############################################################################
9396
# Animations
@@ -106,5 +109,5 @@
106109
# notebook, the example html and the demo script will all be auto-generated via ``sphinx-gallery``.
107110

108111
###############################################################################
109-
# stop mapdl
112+
# Stopping mapdl
110113
mapdl.exit()

examples/03-tips-n-tricks/01-smoothing-element-size-transitions.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from ansys.mapdl.core import launch_mapdl
1818

1919
mapdl = launch_mapdl()
20-
mapdl
20+
print(mapdl)
2121

2222
###############################################################################
2323
# The Geometry (a box)
@@ -102,9 +102,7 @@
102102
for k in [k2, k3, k6, k7]:
103103
mapdl.kesize(k, 0.2)
104104
mapdl.amesh("ALL")
105-
_ = mapdl.eplot(
106-
vtk=True, show_edges=True, show_axes=False, line_width=2, background="w"
107-
)
105+
mapdl.eplot(vtk=True, show_edges=True, show_axes=False, line_width=2, background="w")
108106

109107

110108
###############################################################################

examples/04-general-fea/00-how_finite_element_works.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ def evaluate(self):
845845
mapdl.d(node_id, dof, 1)
846846
mapdl.solve()
847847

848-
_ = mapdl.finish()
848+
mapdl.finish()
849849

850850
###############################################################################
851851
# The columns of the stiffness matrix appear as nodal force reactions

examples/06-verif-manual/vm-002-beam_stresses_and_deflections.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
# Output control for values extrapolated to the element
9797
# and section nodes:
9898
# Same as KEYOPT(9) = 1 plus stresses and strains at all section nodes
99-
_ = mapdl.keyopt(1, 9, 3)
99+
mapdl.keyopt(1, 9, 3, mute=True)
100100

101101

102102
###############################################################################

examples/06-verif-manual/vm-007-plastic_compression_of_a_pipe_assembly.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100

101101
mapdl.clear()
102102
mapdl.verify()
103-
_ = mapdl.prep7()
103+
mapdl.prep7(mute=True)
104104

105105

106106
###############################################################################
@@ -353,7 +353,7 @@
353353
(2.03485925, 0.21270071036846988, 5.0),
354354
(0.0, 0.0, 1.0),
355355
]
356-
_ = mapdl.eplot(cpos=cpos)
356+
mapdl.eplot(cpos=cpos)
357357

358358

359359
###############################################################################
@@ -408,7 +408,7 @@
408408

409409
# Select all nodes.
410410
mapdl.nsel("ALL")
411-
_ = mapdl.finish()
411+
mapdl.finish(mute=True)
412412

413413

414414
###############################################################################
@@ -436,7 +436,7 @@ def solution(deflect):
436436

437437
# Load Step 3
438438
solution(deflect=defl_ls3)
439-
_ = mapdl.finish()
439+
mapdl.finish(mute=True)
440440

441441

442442
###############################################################################
@@ -445,7 +445,7 @@ def solution(deflect):
445445
# Enter post-processing.
446446

447447
# Enter the post-processing routine.
448-
_ = mapdl.post1()
448+
mapdl.post1(mute=True)
449449

450450

451451
###############################################################################

examples/06-verif-manual/vm-010-bending_of_a_t-shaped_beam.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@
172172
(-0.4135015240403764, -0.4134577015789461, 0.8112146563156641),
173173
]
174174

175-
_ = mapdl.eplot(show_node_numbering=True, line_width=5, cpos=cpos, font_size=40)
175+
mapdl.eplot(show_node_numbering=True, line_width=5, cpos=cpos, font_size=40)
176176

177177

178178
###############################################################################

src/ansys/mapdl/core/_commands/map_cmd.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def ftype(self, filetype="", prestype="", **kwargs):
4848
command = f"FTYPE,{filetype},{prestype}"
4949
return self.run(command, **kwargs)
5050

51-
def map_(self, kdim="", kout="", limit="", **kwargs):
51+
def map(self, kdim="", kout="", limit="", **kwargs):
5252
"""Maps pressures from source points to target surface elements.
5353
5454
APDL Command: MAP
@@ -66,15 +66,16 @@ def map_(self, kdim="", kout="", limit="", **kwargs):
6666
Key to control how pressure is applied when a target node is
6767
outside of the source region:
6868
69-
* ``"0"`` : Use the pressure(s) of the nearest source point for target nodes outside of the region (default).
69+
* ``"0"`` : Use the pressure(s) of the nearest source point
70+
for target nodes outside of the region (default).
7071
7172
* ``"1"`` : Set pressures outside of the region to zero.
7273
7374
limit
7475
Number of nearby points considered for interpolation. The minimum
7576
is 5; the default is 20. Lower values reduce processing
7677
time. However, some distorted or irregular meshes will require a
77-
higher LIMIT value to find the points encompassing the target node
78+
higher ``LIMIT`` value to find the points encompassing the target node
7879
in order to define the region for interpolation.
7980
8081
Notes

0 commit comments

Comments
 (0)