BasicTools.IO.CsvWriter module

CSV file reader

BasicTools.IO.CsvWriter.CheckIntegrity(GUI=False)[source]
class BasicTools.IO.CsvWriter.CsvWriter(fileName=None)[source]

Bases: WriterBase

Class to writes a CSV file on disk

Close()[source]
SetETag(string)[source]

Add the tag “string” to the class element filter

Parameters:

string (str) – element tag to add

SetNTag(string)[source]

Add the tag “string” to the class node filter

Parameters:

string (str) – node tag to add

Step(dt=1.0)[source]

Function to increase current time by a time increment

Parameters:

dt (int, optional) – time increment, by default 1.

Write(baseMeshObject, PointFields=None, CellFields=None, GridFields=None, PointFieldsNames=None, CellFieldsNames=None, GridFieldsNames=None, Time=None, TimeStep=None, domainName=None)[source]

Function to writes a CSV file on disk

Parameters:
  • fileName (str) – name of the file to be written

  • baseMeshObject (UnstructuredMesh) – support of the data to be written

  • PointFields (list[np.ndarray], optional) – list of fields defined at the vertices of the mesh, by default None

  • CellFields (list[np.ndarray], optional) – list of fields defined at the cells of the mesh, by default None

  • GridFields (list[np.ndarray], optional) – list of grid data, by default None

  • PointFieldsNames (list[str], optional) – list of field names defined at the vertices of the mesh, by default None

  • CellFieldsNames (list[str], optional) – list of field names defined at the cells of the mesh, by default None

  • GridFieldsNames (list[str], optional) – list of grid data names, by default None

  • Time (float, optional) – time at which the data is written, by default None

  • TimeStep (float, optional) – number of the time step at which the data is written, by default None

  • domainName (str, optional) – name of domain to write, by default None

WriteHead(mesh, PointFieldsNames, CellFieldsNames, GridFieldsNames)[source]

Function to write the header of the output CSV file

Parameters:
  • mesh (UnstructuredMesh) – support of the data to be written

  • PointFieldsNames (list[str], optional) – list of field names defined at the vertices of the mesh, by default None

  • CellFieldsNames (list[str], optional) – list of field names defined at the cells of the mesh, by default None

  • GridFieldsNames (list[str], optional) – list of grid data names, by default None

class BasicTools.IO.CsvWriter.ElementOP[source]

Bases: object

PostCondition(mesh)[source]
class BasicTools.IO.CsvWriter.NodalOP[source]

Bases: object

PostCondition(mesh)[source]
BasicTools.IO.CsvWriter.WriteMeshToCsv(filename, baseMeshObject, PointFields=None, CellFields=None, GridFields=None, PointFieldsNames=None, CellFieldsNames=None, GridFieldsNames=None, nFilter=None, eFilter=None)[source]

Function API for writing data into a CSV file

Parameters:
  • fileName (str) – name of the file to be written

  • baseMeshObject (UnstructuredMesh) – support of the data to be written

  • PointFields (list[np.ndarray], optional) – list of fields defined at the vertices of the mesh, by default None

  • CellFields (list[np.ndarray], optional) – list of fields defined at the cells of the mesh, by default None

  • GridFields (list[np.ndarray], optional) – list of grid data, by default None

  • PointFieldsNames (list[str], optional) – list of field names defined at the vertices of the mesh, by default None

  • CellFieldsNames (list[str], optional) – list of field names defined at the cells of the mesh, by default None

  • GridFieldsNames (list[str], optional) – list of grid data names, by default None

  • nFilter (NodeFilter, optional) – node filter to select a part of baseMeshObject, by default None

  • eFilter (ElementFilter, optional) – element filter to select a part of baseMeshObject, by default None