Muscat.IO.UtReader module

Ut file reader (Zset result file)

CheckIntegrity(GUI=True)[source]
ReadFieldFromUt(fileName: str = '', fieldname: str | None = None, time: float64 | None = None, timeIndex: int64 | None = None, string: str = '', atIntegrationPoints: bool = False) _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes][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 “”

  • 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 “”

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

Returns:

field read

Return type:

np.ndarray

ReadUTMetaData(fileName: str) Dict[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 UtReader[source]

Bases: ReaderBase

Ut Reader class

GetAvailableTimes() float64[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(fieldNames: List[str] | None = None) Mesh[source]

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

Parameters:

fieldNames (List[str], optional) – list of field names to read

Returns:

output unstructured mesh object containing reading result

Return type:

Mesh

ReadField(fieldname: str | None = None, time: float | None = None, timeIndex: int | None = None) _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes][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() Dict[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: str)[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: float64 | None = None, timeIndex: int64 | None = None) int64[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