parameters: (self, ve)
docstring: Get the volume of a hexahedral or tetrahedral volume element
  
          Approaches are adapted from MOAB's measure.cpp.
  
          Parameters
          ----------
          ve : PyMOAB EntitySet handle
              A volume element
  
          Returns
          -------
          .. : float
              Element's volume. Returns None if volume is not a hex or tet.
docstring_summary: Get the volume of a hexahedral or tetrahedral volume element
docstring_tokens: Get the volume of a hexahedral or tetrahedral volume element
function: def elem_volume(self, ve):
          """Get the volume of a hexahedral or tetrahedral volume element
  
          Approaches are adapted from MOAB's measure.cpp.
  
          Parameters
          ----------
          ve : PyMOAB EntitySet handle
              A volume element
  
          Returns
          -------
          .. : float
              Element's volume. Returns None if volume is not a hex or tet.
          """
  
          coord = self.mesh.get_coords(
              self.mesh.get_connectivity(ve)).reshape(-1, 3)
          num_coords = coord.shape[0]
  
          if num_coords == 4:
              return abs(np.linalg.det(coord[:-1] - coord[1:])) / 6.0
          elif num_coords == 8:
              b = coord[np.array([[0, 1, 3, 4], [7, 3, 6, 4], [4, 5, 1, 6],
                                  [1, 6, 3, 4], [2, 6, 3, 1]])]
              return np.sum(np.abs(np.linalg.det(b[:, :-1] - b[:, 1:]))) / 6.0
          else:
              return None
function_tokens: def elem_volume ( self , ve ) : coord = self . mesh . get_coords ( self . mesh . get_connectivity ( ve ) ) . reshape ( - 1 , 3 ) num_coords = coord . shape [ 0 ] if num_coords == 4 : return abs ( np . linalg . det ( coord [ : - 1 ] - coord [ 1 : ] ) ) / 6.0 elif num_coords == 8 : b = coord [ np . array ( [ [ 0 , 1 , 3 , 4 ] , [ 7 , 3 , 6 , 4 ] , [ 4 , 5 , 1 , 6 ] , [ 1 , 6 , 3 , 4 ] , [ 2 , 6 , 3 , 1 ] ] ) ] return np . sum ( np . abs ( np . linalg . det ( b [ : , : - 1 ] - b [ : , 1 : ] ) ) ) / 6.0 else : return None