Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 2D plate example #2558

Merged
merged 8 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion doc/source/examples/index.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.. _ref_examples:


.. toctree::
Expand All @@ -11,6 +10,8 @@
extended_examples/index.rst


.. _ref_examples:

========
Examples
========
Expand Down
6 changes: 4 additions & 2 deletions examples/00-mapdl-examples/2d_plate_with_a_hole.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,10 @@
# Solve the Static Problem
# ~~~~~~~~~~~~~~~~~~~~~~~~
# Solve the static analysis
mapdl.run("/SOLU")
mapdl.solution()
mapdl.antype("STATIC")
output = mapdl.solve()
mapdl.finish()
print(output)

###############################################################################
Expand Down Expand Up @@ -313,9 +314,10 @@ def compute_stress_con(ratio):

# Solve the Static Problem
# ~~~~~~~~~~~~~~~~~~~~~~~~
mapdl.run("/SOLU")
mapdl.solution()
mapdl.antype("STATIC")
mapdl.solve()
mapdl.finish()

# Post-Processing
# ~~~~~~~~~~~~~~~
Expand Down
12 changes: 1 addition & 11 deletions src/ansys/mapdl/core/mesh/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ def _parse_vtk(
# Store original ANSYS element and node information
try:
grid.point_data["ansys_node_num"] = nnum

except ValueError:
grid.point_data["ansys_node_num"] = (
mesh._mapdl.nlist(kinternal="internal").to_array()[:, 0].astype(np.int32)
Expand All @@ -167,17 +168,6 @@ def _parse_vtk(
grid.cell_data["ansys_etype"] = mesh._ans_etype
grid.cell_data["ansys_elem_type_num"] = mesh.etype

# add components
# Add element components to unstructured grid
for key, item in mesh.element_components.items():
mask = np.in1d(mesh.enum, item, assume_unique=True)
grid.cell_data[key] = mask

# Add node components to unstructured grid
for key, item in mesh.node_components.items():
mask = np.in1d(nnum, item, assume_unique=True)
grid.point_data[key] = mask

# store node angles
if angles is not None:
if angles.shape[1] == 3:
Expand Down
Loading