How to use the pyansys.common.rotate_to_global function in pyansys

To help you get started, we’ve selected a few pyansys examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github akaszynski / pyansys / pyansys / rst.py View on Github external
# convert to zero index
                sidx = nodlist -1

            else:
                # Reorder based on sorted indexing
                sidx = self._sidx

            results[rnum, sidx, :] = result

        if not in_nodal_coord_sys:
            euler_angles = self.geometry.node_angles[self._insolution].T

            for rnum in range(nsets):
                result = results[rnum, :, :]
                rotate_to_global(result, euler_angles)

        # check for invalid values
        # mapdl writes invalid values as 2*100
        results[results == 2**100] = 0

        # also include nodes in output
        return self._neqv[self._sidx], results
github akaszynski / pyansys / pyansys / rst.py View on Github external
# now, sort using the new sorted node numbers indices
            new_sidx = np.argsort(unsort_nnum)
            nnum = unsort_nnum[new_sidx]
            result = result[new_sidx]

            # these are the associated nodal locations
            # sidx_inv = np.argsort(self._sidx)
            # nodes = self.geometry['nodes'][sidx_inv][sidx][:, :3]
        else:
            nnum = self._neqv[self._sidx]
            result = result.take(self._sidx, 0)

        # Convert result to the global coordinate system
        if not in_nodal_coord_sys:
            euler_angles = self.geometry.node_angles[self._insolution].T
            rotate_to_global(result, euler_angles)

        # check for invalid values (mapdl writes invalid values as 2*100)
        result[result == 2**100] = 0
        return nnum, result