Muscat.IO.XdmfWriter module¶
Xdmf file writer
- class BinaryStorage(data=None, filePointer=None)[source]¶
Bases:
object
Class to deal with binary storage
- CheckIntegrityDDM(GUI: bool = False)[source]¶
this test function can be launched using the mpirun -n 2 … to test the writer in mpi mode
- class Hdf5Storage(data, filename, datasetName)[source]¶
Bases:
object
Class to deal with hdf5 storage
- class InMemoryFile(saveFilePointer)[source]¶
Bases:
object
Helper class to write the xmf part of the file into memory
- WriteMeshToXdmf(filename, baseMeshObject, PointFields=None, CellFields=None, GridFields=None, IntegrationPointData=None, PointFieldsNames=None, CellFieldsNames=None, GridFieldsNames=None, IntegrationPointDataNames=None, IntegrationRule=None, Binary=True, HDF5=True)[source]¶
Function API for writing mesh in the xdmf format file.
- Parameters:
fileName (str) – name of the file to be written
baseMeshObject (Mesh) – the mesh to be written
PointFields (list[np.ndarray], optional) – fields to write defined at the vertices of the mesh, by default None
CellFields (list[np.ndarray], optional) – fields to write defined at the elements of the mesh, by default None
GridFields (list[np.ndarray], optional) – grid fields to write, by default None
IntegrationPointData (list[np.ndarray], optional) – fields defined at the integration points, by default None
PointFieldsNames (list[str], optional) – names of the fields to write defined at the vertices of the mesh, by default None
CellFieldsNames (list[str], optional) – names of the fields to write defined at the elements of the mesh, by default None
GridFieldsNames (list[str], optional) – names of the grid fields to write, by default None
IntegrationPointDataNames (list[str], optional) – names of the fields defined at the integration points, by default None
IntegrationRule (dict[IntegrationRuleType], optional) – integration rules associated to the integration point data, by default None
Binary (bool, optional) – if True, file is written as binary, by default True
HDF5 (bool, optional) – if True, file is written as hdf5 format, by default True
- class XdmfWriter(fileName=None)[source]¶
Bases:
WriterBase
- Class to Write Xdmf files for:
classic finite element solutions
domain decomposition problem (multi mesh)
transient solution (the mesh changes in time)
solution written in parafac format (monolithic or in ddm mpi)
- MakeStep(Time=None, TimeStep=None)[source]¶
Increases time step in output files
- Parameters:
Time (float, optional) – time value of the time step, by default None
TimeStep (int, optional) – number of the time step, by default None
- Open(filename=None)[source]¶
Open file for writing
- Parameters:
filename (str, optional) – name of the file to write
- SetBinary(val=True)[source]¶
Sets the binary status of the file to read
- Parameters:
val (bool, optional) – if True, sets the file to read as binary, by default True
- SetFileName(fileName)[source]¶
Sets the fileName parameter of the class
- Parameters:
string (str) – fileName to set
- Write(mesh, PointFields=None, CellFields=None, GridFields=None, PointFieldsNames=None, CellFieldsNames=None, GridFieldsNames=None, Time=None, TimeStep=None, domainName=None, IntegrationRule=None, IntegrationPointData=None, IntegrationPointDataNames=None)[source]¶
Write data to file in xdmf format
- Parameters:
mesh (Mesh) – the mesh to be written
PointFields (list[np.ndarray], optional) – fields to write defined at the vertices of the mesh, by default None
CellFields (list[np.ndarray], optional) – fields to write defined at the elements of the mesh, by default None
GridFields (list[np.ndarray], optional) – grid fields to write, by default None
PointFieldsNames (list[str], optional) – names of the fields to write defined at the vertices of the mesh, by default None
CellFieldsNames (list[str], optional) – names of the fields to write defined at the elements of the mesh, by default None
GridFieldsNames (list[str], optional) – names of the grid fields to write, by default None
Time (float, optional) – time at which the data is read, by default None
TimeStep (int, optional) – time index at which the data is read, by default None
domainName (str, optional) – Not Used, by default None
IntegrationRule (dict[IntegrationRuleType], optional) – integration rules associated to the integration point data, by default None
IntegrationPointData (list[np.ndarray], optional) – fields defined at the integration points, by default None
IntegrationPointDataNames (list[str], optional) – names of the fields defined at the integration points, by default None
- WriteIntegrationsPoints(quadrature: MeshQuadrature, mesh: Mesh)[source]¶
Writes integration points information to file, this will write only for elements present on the mesh