Skip to content

Commit

Permalink
principal_nodal_stress (#56)
Browse files Browse the repository at this point in the history
* principal_nodal_stress

* Apply suggestions from code review

Co-authored-by: Alex Kaszynski <[email protected]>
  • Loading branch information
1990chs and akaszynski authored Jul 6, 2021
1 parent 7bb5e0c commit fed3352
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ansys/mapdl/reader/rst.py
Original file line number Diff line number Diff line change
Expand Up @@ -2413,7 +2413,7 @@ def element_solution_data(self, rnum, datatype, sort=True, **kwargs):

return enum, element_data, enode

def principal_nodal_stress(self, rnum):
def principal_nodal_stress(self, rnum, nodes=None):
"""Computes the principal component stresses for each node in
the solution.
Expand Down Expand Up @@ -2458,7 +2458,7 @@ def principal_nodal_stress(self, rnum):
"""
# get component stress
nodenum, stress = self.nodal_stress(rnum)
nodenum, stress = self.nodal_stress(rnum, nodes)
pstress, isnan = _binary_reader.compute_principal_stress(stress)
pstress[isnan] = np.nan
return nodenum, pstress
Expand Down

0 comments on commit fed3352

Please sign in to comment.