sfepy.postprocess.sources module

class sfepy.postprocess.sources.FileSource(filename, watch=False, offscreen=True)[source]

General file source.

file_changed()[source]
get_mat_id(mat_id_name=’mat_id’)[source]

Get material ID numbers of the underlying mesh elements.

get_step_time(step=None, time=None)[source]

Set current step and time to the values closest greater or equal to either step or time. Return the found values.

get_ts_info()[source]
poll_file()[source]

Check the source file’s time stamp and notify the self.notify_obj in case it changed. Subclasses should implement the file_changed() method.

reset()[source]

Reset.

setup_mat_id(mat_id_name=’mat_id’, single_color=False)[source]
setup_notification(obj, attr)[source]

The attribute ‘attr’ of the object ‘obj’ will be set to True when the source file is watched and changes.

class sfepy.postprocess.sources.GenericFileSource(*args, **kwargs)[source]

File source usable with any format supported by MeshIO classes.

add_data_to_dataset(dataset, data)[source]

Add point and cell data to the dataset.

create_dataset()[source]

Create a tvtk.UnstructuredGrid dataset from the Mesh instance of the file source.

create_source()[source]

Create a VTK source from data in a SfePy-supported file.

Notes

All data need to be set here, otherwise time stepping will not work properly - data added by user later will be thrown away on time step change.

file_changed()[source]
get_bounding_box()[source]
get_mat_id(mat_id_name=’mat_id’)[source]

Get material ID numbers of the underlying mesh elements.

read_common(filename)[source]
set_filename(filename, vis_source)[source]
class sfepy.postprocess.sources.GenericSequenceFileSource(*args, **kwargs)[source]

File source usable with any format supported by MeshIO classes, with exception of HDF5 (.h5), for file sequences.

file_changed()[source]
read_common(filename)[source]
set_filename(filename, vis_source)[source]
class sfepy.postprocess.sources.VTKFileSource(filename, watch=False, offscreen=True)[source]

A thin wrapper around mlab.pipeline.open().

create_source()[source]

Create a VTK file source

get_bounding_box()[source]
set_filename(filename, vis_source)[source]
class sfepy.postprocess.sources.VTKSequenceFileSource(*args, **kwargs)[source]

A thin wrapper around mlab.pipeline.open() for VTK file sequences.

create_source()[source]

Create a VTK file source

set_filename(filename, vis_source)[source]
sfepy.postprocess.sources.create_file_source(filename, watch=False, offscreen=True)[source]

Factory function to create a file source corresponding to the given file format.