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

skip missing tshape_key entry #136

Merged
merged 2 commits into from
May 27, 2022
Merged
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
9 changes: 7 additions & 2 deletions ansys/mapdl/reader/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,16 +168,21 @@ def _parse_vtk(self, allowable_types=None, force_linear=False,
type_ref = np.empty(2 << 16, np.int32) # 131072
type_ref[self._ekey[:, 0]] = etype_map[self._ekey[:, 1]]

# special treatment for MESH200
if allowable_types is None or 200 in allowable_types:
for etype_ind, etype in self._ekey:

# MESH200
if etype == 200 and etype_ind in self.key_option:
# keyoption 1 contains various cell types
# map them to the corresponding type (see elements.py)
mapped = MESH200_MAP[self.key_option[etype_ind][0][1]]
type_ref[etype_ind] = mapped

if etype == 170: # TARGE170 specifics
# TARGE170 specifics
if etype == 170:
# edge case where missing element within the tshape_key
if etype_ind not in self.tshape_key: # pragma: no cover
continue
tshape_num = self.tshape_key[etype_ind]
if tshape_num >= 19: # weird bug when 'PILO' can be 99 instead of 19.
tshape_num = 19
Expand Down