code: def get_internal_angles(self):
          
  
          angles = []
  
          for elx, elz in zip(self.grid['x'], self.grid['z']):
              el_angles = []
              xy = np.vstack((elx, elz))
              for i in range(0, elx.size):
                  i1 = (i - 1) % elx.size
                  i2 = (i + 1) % elx.size
  
                  a = (xy[:, i] - xy[:, i1])
                  b = (xy[:, i2] - xy[:, i])
                  # note that nodes are ordered counter-clockwise!
                  angle = np.pi - np.arctan2(
                      a[0] * b[1] - a[1] * b[0],
                      a[0] * b[0] + a[1] * b[1]
                  )
                  el_angles.append(angle * 180 / np.pi)
              angles.append(el_angles)
          return np.array(angles)
docs: Compute all internal angles of the grid
  
          Returns
          -------
          numpy.ndarray
              NxK array with N the number of elements, and K the number of nodes,
              filled with the internal angles in degrees