BasicTools.IO.XdmfReader module
Xdmf file reader
- BasicTools.IO.XdmfReader.GetTensorRepOfField(domain, fieldname)[source]
Get The tensor representation of a field in a xdmf domain
Get The tensor representation of a field in a xdmf domain, for the moment works for Cannonic and Train Tensor formats
- BasicTools.IO.XdmfReader.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 BasicTools.IO.XdmfReader.XdmfAttribute[source]
Bases:
XdmfbaseXdmfAttribute class: to store the data over the grids
- class BasicTools.IO.XdmfReader.XdmfDataItem[source]
Bases:
XdmfbaseXdmfDataItem class : class to manage the reading of the data Heavy and light
- class BasicTools.IO.XdmfReader.XdmfGeometry[source]
Bases:
XdmfbaseXdmfGeometry class: stores the point positions
- class BasicTools.IO.XdmfReader.XdmfGrid[source]
Bases:
Xdmfbasea Grid: contains a mesh (poinst and connectivity ) and fields by (element, nodes, grid)
- GetSupport()[source]
Returns the support defined in the Xdmf file
- Returns:
output mesh object containing reading result
- Return type:
- class BasicTools.IO.XdmfReader.XdmfInformation[source]
Bases:
Xdmfbaseclass for extra information in the xmdf file
- class BasicTools.IO.XdmfReader.XdmfReader(filename='')[source]
Bases:
ContentHandlerXdmf 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:
- 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.
- class BasicTools.IO.XdmfReader.XdmfTime[source]
Bases:
XdmfbaseXdmfTime class: to store the data over the grids