@@ -60,8 +60,8 @@ def access_bit(data, num):
6060
6161
6262EMAIL_ME = """Please raise an issue at:
63+
6364https://github.com/pyansys/pymapdl-reader/issues
64- Or email the PyAnsys support team at pyansys.support@ansys.com
6565"""
6666np .seterr (divide = "ignore" , invalid = "ignore" )
6767
@@ -151,7 +151,6 @@ def __init__(self, filename, read_mesh=True, parse_vtk=True, **kwargs):
151151 self ._sidx_elem = np .argsort (self ._resultheader ["eeqv" ])
152152
153153 # Store node numbering in ANSYS
154- self ._neqv = self ._resultheader ["neqv" ]
155154 self ._eeqv = self ._resultheader ["eeqv" ] # unsorted
156155
157156 # cache geometry header
@@ -1460,8 +1459,7 @@ def nodal_acceleration(self, rnum, in_nodal_coord_sys=False):
14601459 def _nodal_solution_result (
14611460 self , rnum , solution_type , in_nodal_coord_sys = False , nodes = None
14621461 ):
1463- """Returns the DOF solution for each node in the global
1464- cartesian coordinate system or nodal coordinate system.
1462+ """Return the DOF solution for each node in the global coordinate system.
14651463
14661464 Parameters
14671465 ----------
@@ -1509,8 +1507,7 @@ def _nodal_solution_result(
15091507 # check if nodal solution exists
15101508 if not self .available_results [solution_type ]:
15111509 raise AttributeError (
1512- 'Result file is missing "%s"'
1513- % self .available_results .description [solution_type ]
1510+ f'Result file is missing "{ self .available_results .description [solution_type ]} "'
15141511 )
15151512
15161513 # result pointer
@@ -1560,14 +1557,20 @@ def _nodal_solution_result(
15601557 new_sidx = np .argsort (unsort_nnum )
15611558 nnum = unsort_nnum [new_sidx ]
15621559 result = result [new_sidx ]
1560+
1561+ # Convert result to the global coordinate system
1562+ if not in_nodal_coord_sys :
1563+ euler_angles = self ._mesh .node_angles [new_sidx ].T
1564+ rotate_to_global (result , euler_angles )
1565+
15631566 else :
15641567 nnum = self ._neqv [self ._sidx ]
15651568 result = result .take (self ._sidx , 0 )
15661569
1567- # Convert result to the global coordinate system
1568- if not in_nodal_coord_sys :
1569- euler_angles = self ._mesh .node_angles [self ._insolution ].T
1570- rotate_to_global (result , euler_angles )
1570+ # Convert result to the global coordinate system
1571+ if not in_nodal_coord_sys :
1572+ euler_angles = self ._mesh .node_angles [self ._insolution ].T
1573+ rotate_to_global (result , euler_angles )
15711574
15721575 # check for invalid values (mapdl writes invalid values as 2*100)
15731576 result [result == 2 ** 100 ] = 0
@@ -3757,7 +3760,8 @@ def _nodal_result(self, rnum, result_type, nnum_of_interest=None):
37573760 # replace values in nodstr
37583761 is_solid = elements .SOLID_ELEMENTS [self .mesh .ekey [:, 1 ]]
37593762 is_solid += self .mesh .ekey [:, 1 ] == 41 # must include SHELL41
3760- 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 ]
37613765
37623766 # call cython to extract and assemble the data
37633767 cells , offset = vtk_cell_info (grid )
@@ -3924,6 +3928,11 @@ def nodal_reaction_forces(self, rnum):
39243928 nnum = self ._resultheader ["neqv" ][idx ]
39253929 return rforces , nnum , dof
39263930
3931+ @property
3932+ def _neqv (self ):
3933+ """Return the nodal equivalence array."""
3934+ return self ._resultheader ["neqv" ]
3935+
39273936 def plot_element_result (
39283937 self , rnum , result_type , item_index , in_element_coord_sys = False , ** kwargs
39293938 ):
0 commit comments