BasicTools.IO.UtReader module

Ut file reader (Zset result file)

BasicTools.IO.UtReader.CheckIntegrity()[source]
BasicTools.IO.UtReader.ReadFieldFromUt(fileName=None, fieldname=None, time=None, timeIndex=None, string=None, atIntegrationPoints=False)[source]

Function API for reading a field defined in an ut file

Parameters:
  • fileName (str, optional) – name of the file to be read, by default None

  • fieldname (str, optional) – name of the field to be read, by default None

  • time (float, optional) – time at which the field is read, by default None

  • timeIndex (int, optional) – time index at which the field is read, by default None

  • string (str, optional) – data to be read as a string instead of a file, by default None

  • atIntegrationPoints (bool, optional) – if True, field is read at integration points (from .integ file), by default False

Returns:

field read

Return type:

np.ndarray

BasicTools.IO.UtReader.ReadUTMetaData(fileName)[source]

Function API for reading of metadate of an ut file

Parameters:

fileName (str, optional) – name of the file to be read, by default None

Returns:

metadate of the ut file

Return type:

dict

class BasicTools.IO.UtReader.UtReader[source]

Bases: ReaderBase

Ut 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()[source]

Function that performs the reading of the data defined in an ut file

Returns:

output unstructured mesh object containing reading result

Return type:

UnstructuredMesh

ReadField(fieldname=None, time=None, timeIndex=None)[source]

Function that performs the reading of a field defined in an ut file

Parameters:
  • fieldname (str, optional) – name of the field to be read, by default None

  • time (float, optional) – time at which the field is read, by default None

  • timeIndex (int, optional) – time index at which the field is read, by default None

Returns:

field read

Return type:

np.ndarray

ReadMetaData()[source]

Function that performs the reading of the metadata of an ut file, and of the mesh defined in it

Returns:

global information on the mesh defined in the ut file

Return type:

dict

ReadUTMetaData()[source]

Function that performs the reading of the metadata of an ut file

Reset()[source]

Resets the reader

SetFieldNameToRead(fieldname)[source]

Sets the name of the field to read

Parameters:

fieldname (str) – name of the field to read

SetMeshMetaData(meshMetadata)[source]

To prevent reading the mesh file again in case multiple ut files are related to the same mesh file

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