Nek5000Reader#

class Nek5000Reader(*args, **kwargs)[source]#

Class for reading .nek5000 files produced by Nek5000 and NekRS.

Wraps vtkNek5000Reader.

Added in version 0.45.0.

Note

This reader requires vtk version >=9.3.0.

Examples#

Download Python source code | Download Jupyter notebook

>>> import pyvista as pv
>>> from pyvista import examples
>>> filename = examples.download_nek5000(load=False)
>>> reader = pv.get_reader(filename)
>>> mesh = reader.read()
>>> mesh.plot(scalars='Velocity', cpos='xy')
../../../_images/pyvista-Nek5000Reader-8b94eab71d501141_00_00.png

Attributes#

Nek5000Reader.active_time_point

Active time point.

Nek5000Reader.active_time_value

Active time or iteration value.

Nek5000Reader.cell_array_names

Return the list of all cell array names.

Nek5000Reader.number_cell_arrays

Return the number of cell arrays.

Nek5000Reader.number_time_points

Return number of time points or iterations available to read.

Nek5000Reader.time_values

All time or iteration values.

Inherited Attributes#

PointCellDataSelection.all_cell_arrays_status

Return the status of all cell arrays.

PointCellDataSelection.all_point_arrays_status

Return the status of all point arrays.

_FileIOBase.extension_patterns

Return mapping from regex pattern matching associated with this class.

_FileIOBase.extensions

Return the file extensions associated with this class.

PointCellDataSelection.number_point_arrays

Return the number of point arrays.

BaseReader.path

Return or set the filename or directory of the reader.

PointCellDataSelection.point_array_names

Return the list of all point array names.

BaseReader.reader

Return the vtk Reader object.

Methods#

Nek5000Reader.cell_array_status(name)

Get status of cell array with name.

Nek5000Reader.disable_all_cell_arrays()

Disable all cell arrays.

Nek5000Reader.disable_cell_array(name)

Disable cell array with name.

Nek5000Reader.disable_merge_points()

Disable merging coincident GLL points from different spectral elements on read.

Nek5000Reader.disable_spectral_element_ids()

Disable spectral element IDs to be shown as cell data.

Nek5000Reader.enable_all_cell_arrays()

Enable all cell arrays.

Nek5000Reader.enable_cell_array(name)

Enable cell array with name.

Nek5000Reader.enable_merge_points()

Enable merging coincident GLL points from different spectral elements on read.

Nek5000Reader.enable_spectral_element_ids()

Enable spectral element IDs to be shown as cell data.

Nek5000Reader.set_active_time_point(time_point)

Set active time or iteration by index.

Nek5000Reader.set_active_time_value(time_value)

Set active time or iteration value.

Nek5000Reader.time_point_value(time_point)

Value of time point or iteration by index.

Inherited Methods#

PointCellDataSelection.disable_all_point_arrays

Disable all point arrays.

PointCellDataSelection.disable_point_array

Disable point array with name.

PointCellDataSelection.enable_all_point_arrays

Enable all point arrays.

PointCellDataSelection.enable_point_array

Enable point array with name.

BaseReader.hide_progress

Hide the progress bar when loading the file.

PointCellDataSelection.point_array_status

Get status of point array with name.

BaseReader.read

Read data in file.

BaseReader.show_progress

Show a progress bar when loading the file.