Skip to content

Commit 9d01203

Browse files
authored
fix edge case where a partly filled sequence of element numbers causes an IndexError (#221)
1 parent 512c628 commit 9d01203

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ansys/mapdl/reader/rst.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3760,7 +3760,8 @@ def _nodal_result(self, rnum, result_type, nnum_of_interest=None):
37603760
# replace values in nodstr
37613761
is_solid = elements.SOLID_ELEMENTS[self.mesh.ekey[:, 1]]
37623762
is_solid += self.mesh.ekey[:, 1] == 41 # must include SHELL41
3763-
nodstr[1:][is_solid] = self._nodfor[1:][is_solid]
3763+
ind = self.mesh.ekey[:, 0]
3764+
nodstr[ind][is_solid] = self._nodfor[ind][is_solid]
37643765

37653766
# call cython to extract and assemble the data
37663767
cells, offset = vtk_cell_info(grid)

0 commit comments

Comments
 (0)