示例#1
0
 def __init__(self, name="datawriterhdf5"):
     """
 Constructor.
 """
     DataWriter.__init__(self, name)
     ModuleDataWriterHDF5.__init__(self)
     return
示例#2
0
 def __init__(self, name="datawriterhdf5"):
     """
 Constructor.
 """
     DataWriter.__init__(self, name)
     ModuleDataWriterHDF5.__init__(self)
     return
示例#3
0
    def initialize(self, normalizer):
        """
    Initialize writer.
    """
        DataWriter.initialize(self, normalizer, self.filename)

        timeScale = normalizer.timeScale()

        ModuleDataWriterHDF5.filename(self, self.filename)
        ModuleDataWriterHDF5.timeScale(self, timeScale.value)
        return
示例#4
0
    def initialize(self, normalizer):
        """
    Initialize writer.
    """
        DataWriter.initialize(self, normalizer, self.filename)

        timeScale = normalizer.timeScale()

        ModuleDataWriterHDF5.filename(self, self.filename)
        ModuleDataWriterHDF5.timeScale(self, timeScale.value)
        return
示例#5
0
    def close(self):
        """
    Close writer.
    """
        ModuleDataWriterHDF5.close(self)

        # Only write Xdmf file on proc 0
        from pylith.mpi.Communicator import mpi_comm_world
        comm = mpi_comm_world()
        if not comm.rank:
            from Xdmf import Xdmf
            xdmf = Xdmf()
            xdmf.write(ModuleDataWriterHDF5.hdf5Filename(self), verbose=False)
        return
示例#6
0
  def close(self):
    """
    Close writer.
    """
    ModuleDataWriterHDF5.close(self)

    # Only write Xdmf file on proc 0
    from pylith.mpi.Communicator import mpi_comm_world
    comm = mpi_comm_world()
    if not comm.rank:
      from Xdmf import Xdmf
      xdmf = Xdmf()
      xdmf.write(ModuleDataWriterHDF5.hdf5Filename(self), verbose=False)
    return