Skip to content

monoalg3D_reader

MonoAlg3DReader

MonoAlg3DReader can load and parse any type of data made by MonoAlg3D.

get_all_variables(geometry) staticmethod

Extract names of all variables in the simulation.

Parameters:

Name Type Description Default
geometry vtk object

Geometry where the variables are found.

required

Returns:

Name Type Description
list ndarray

Array of variables.

load(filepath, tag='Vm', block_nr=0, timeset=1) staticmethod

Load coordinates, triangles and scalars.

Parameters:

Name Type Description Default
filepath str

The path to the mesh file.

required
tag str

Defaults to 'Vm'.

'Vm'
block_nr int

Defaults to 0.

0
timeset int

Defaults to 1.

1

Returns:

Name Type Description
tuple tuple[ndarray, ndarray, ndarray, ndarray]

A tuple containing a list of coordinates, element ids, scalars and voltages.

load_base_polydata(filepath) staticmethod

Loads only base geometry of the simulation.

Parameters:

Name Type Description Default
filepath str

Path to the simulation .case file.

required

Returns:

Name Type Description
vtkPolyData vtkPolyData

Polydata object.

load_full_polydata(filepath, block_nr=0, timeset=1) staticmethod

Loads full polydata object with all variable arrays in all timesteps. We only pass the .case file. All other files should be present in the same folder.

Parameters:

Name Type Description Default
filepath str

Path to the simulation .case file.

required

Returns:

Name Type Description
vtkPolyData vtkPolyData

Polydata object.

load_mesh(filepath) staticmethod

load_metadata(filepath) staticmethod

Load all metadata of the input case.

Parameters:

Name Type Description Default
filepath str

Filepath of the input file.

required

Returns:

Name Type Description
tuple tuple[str, str]

Tags and root name of the case.

signal_to_lat(voltages, threshold=-30, fs=100) staticmethod