Bases: object
Escript data import/export manager.
Example:
dm=DataManager(formats=[DataManager.RESTART,DataManager.VTK])
if dm.hasData():
dom = dm.getDomain()
time = dm.getValue("time")
dt = dm.getValue("dt")
T = dm.getValue("T")
u = dm.getValue("u")
else:
T = ...
u = ...
dm.addData(time=time,dt=dt,T=T,u=u) # add data and variables
dm.setTime(time) # set the simulation timestamp
dm.export() # write out data
Adds ‘escript.Data’ objects and other data to be exported to this manager.
Note : | This method does not make copies of Data objects so any modifications will be carried over until export() is called. |
---|
Executes the actual data export. Depending on the formats parameter used in the constructor all data added by addData() is written to disk (RESTART,SILO,VTK) or made available through the VisIt simulation interface (VISIT).
Returns the export cycle (=number of times export() has been called)
Returns the domain as recovered from restart files.
Returns an ‘escript.Data’ object or other value that has been loaded from restart files.
Returns True if the manager holds data for restart
Sets the number of calls to export() before new restart files are generated.
Sets the domain without adding data.
Sets labels for the mesh axes. These are currently only used by the Silo exporter.
Sets units for the mesh axes. These are currently only used by the Silo exporter.
Sets metadata namespaces and the corresponding metadata. Only used for the VTK file format at the moment.
Parameters: |
|
---|
Sets the simulation timestamp.