Muscat.IO.XdmfReader module¶
Xdmf file reader
- ReadXdmf(fileName)[source]¶
Function API for reading an xdmf file
- Parameters:
fileName (str) – name of the file to be read
- Returns:
output unstructured mesh object containing reading result
- Return type:
- class Xdmf[source]¶
Bases:
XdmfBase
Top class for the xdmf Document
- GetDomain(nameOrNumber: str | int64) XdmfDomain [source]¶
Get a Grid (XdmfGrid) using a name or a number
- class XdmfDataItem[source]¶
Bases:
XdmfBase
XdmfDataItem class : class to manage the reading of the data Heavy and light
- class XdmfDomain[source]¶
Bases:
XdmfBase
A Domain. Can contain many grids
- class XdmfGrid[source]¶
Bases:
XdmfBase
a Grid: contains a mesh (points and connectivity ) and fields by (element, nodes, grid)
- GetSupport() Mesh [source]¶
Returns the support defined in the Xdmf file
- Returns:
output mesh object containing reading result
- Return type:
Mesh or ConstantRectilinearMesh
- class XdmfReader(filename='')[source]¶
Bases:
ContentHandler
Xdmf Reader class
- GetAvailableTimes()[source]¶
Returns the available times at which data can be read
- Returns:
available times at which data can be read
- Return type:
np.ndarray
- Read(fileName=None)[source]¶
Function that performs the reading of the data defined in an ut file
- Parameters:
fileName (str, optional) – name of the file to read, by default None
- Returns:
output mesh object containing reading result
- Return type:
Mesh or ConstantRectilinearMesh
- ReadMetaData()[source]¶
Function that performs the reading of the metadata of a xdmf file: sets the time attribute of the reader
- SetFileName(filename)[source]¶
Sets the name of file to read
- Parameters:
filename (str) – file name to set
- SetTimeToRead(time=None, timeIndex=None)[source]¶
Sets the time at which the data is read
- Parameters:
time (float, optional) – time at which the data is read, by default None
timeIndex (int, optional) – time index at which the data is read, by default None
- Returns:
time index at which the data is read
- Return type:
int
- characters(content)[source]¶
Receive notification of character data.
The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity so that the Locator provides useful information.