argiope/mesh.py
def read_h5(hdfstore, group = ""):
  """
  DEPRECATED
  Reads a mesh saved in the HDF5 format.
  """
  m = Mesh()
  m.elements.data = hdf["elements/connectivity"]
  m.nodes.data    = hdf["nodes/xyz"]
  for key in hdf.keys():
    if key.startswith("/nodes/sets"):
      k = key.replace("/nodes/sets/", "")
      m.nodes.sets[k] = set(hdf[key])
    if key.startswith("/elements/sets"):
      k = key.replace("/elements/sets/", "")
      m.elements.sets[k] = set(hdf[key])
    if key.startswith("/elements/surfaces"):
      k = key.replace("/elements/surfaces/", "")
      m.elements.surfaces[k] = hdf[key]
    if key.startswith("/fields/"):
      if key.endswith("/metadata"):
        tag = key.split("/")[2]
        f = Field()
        f.metadata = hdf["fields/{0}/metadata".format(tag)]
        f.metadata = hdf["fields/{0}/data".format(tag)]
        f.master = m
        m.add_field(tag, f)
  hdf.close()  
  return m
def read_h5(hdfstore, group = ""):
  m = Mesh()
  m.elements.data = hdf["elements/connectivity"]
  m.nodes.data    = hdf["nodes/xyz"]
  for key in hdf.keys():
    if key.startswith("/nodes/sets"):
      k = key.replace("/nodes/sets/", "")
      m.nodes.sets[k] = set(hdf[key])
    if key.startswith("/elements/sets"):
      k = key.replace("/elements/sets/", "")
      m.elements.sets[k] = set(hdf[key])
    if key.startswith("/elements/surfaces"):
      k = key.replace("/elements/surfaces/", "")
      m.elements.surfaces[k] = hdf[key]
    if key.startswith("/fields/"):
      if key.endswith("/metadata"):
        tag = key.split("/")[2]
        f = Field()
        f.metadata = hdf["fields/{0}/metadata".format(tag)]
        f.metadata = hdf["fields/{0}/data".format(tag)]
        f.master = m
        m.add_field(tag, f)
  hdf.close()  
  return m
def read_h5 ( hdfstore , group = "" ) : m = Mesh ( ) m . elements . data = hdf [ "elements/connectivity" ] m . nodes . data = hdf [ "nodes/xyz" ] for key in hdf . keys ( ) : if key . startswith ( "/nodes/sets" ) : k = key . replace ( "/nodes/sets/" , "" ) m . nodes . sets [ k ] = set ( hdf [ key ] ) if key . startswith ( "/elements/sets" ) : k = key . replace ( "/elements/sets/" , "" ) m . elements . sets [ k ] = set ( hdf [ key ] ) if key . startswith ( "/elements/surfaces" ) : k = key . replace ( "/elements/surfaces/" , "" ) m . elements . surfaces [ k ] = hdf [ key ] if key . startswith ( "/fields/" ) : if key . endswith ( "/metadata" ) : tag = key . split ( "/" ) [ 2 ] f = Field ( ) f . metadata = hdf [ "fields/{0}/metadata" . format ( tag ) ] f . metadata = hdf [ "fields/{0}/data" . format ( tag ) ] f . master = m m . add_field ( tag , f ) hdf . close ( ) return m
DEPRECATED
  Reads a mesh saved in the HDF5 format.
DEPRECATED Reads a mesh saved in the HDF5 format .