sfepy.postprocess.domain_specific module

Domain-specific plot functions.

All the plot functions accept the following parameters:

  • source : Mayavi source

  • ctp : Mayavi cell-to-point filter

  • position : (x, y, z)

  • family : ‘point’ or ‘cell’

  • kind : ‘scalars’, ‘vectors’ or ‘tensors’

  • name : name of a variable

All the plot functions return: - kind : ‘scalars’, ‘vectors’ or ‘tensors’ - name : name of a variable - active : Mayavi module

class sfepy.postprocess.domain_specific.DomainSpecificPlot(fun_name, args)[source]

Class holding domain-specific plot function and its parameters.

sfepy.postprocess.domain_specific.plot_displacements(source, ctp, bbox, position, family, kind, name, rel_scaling=1.0, color_kind=None, color_name=None, opacity=1.0)[source]

Show displacements by displaying a colormap given by quantity color_name on the deformed mesh.

Parameters
rel_scalingfloat

The relative scaling of displacements.

color_kindstr, optional

The kind of data determining the colormap.

color_namestr, optional

The name of data determining the colormap.

opacityfloat

The surface plot opacity.

sfepy.postprocess.domain_specific.plot_velocity(source, ctp, bbox, position, family, kind, name, seed='sphere', type='ribbon', integration_direction='both', seed_scale=1.0, seed_resolution=20, widget_enabled=True, color_kind=None, color_name=None, opacity=1.0, **kwargs)[source]

Show velocity field by displaying streamlines and optionally a surface plot given by quantity color_name.

Parameters
seedone of (‘sphere’, ‘point’, ‘line’, ‘plane’)

The streamline seed name.

typeone of (‘line’, ‘ribbon’, ‘tube’)

The streamline seed line type.

integration_directionone of (‘forward’, ‘backward’, ‘both’)

The stream tracer integration direction.

seed_scalefloat

The seed size scale.

seed_resolutionint

The number of seed points in a direction (depends on seed).

widget_enabledbool

It True, the seed widget is visible and can be interacted with.

color_kindstr, optional

The kind of data determining the colormap.

color_namestr, optional

The name of data determining the colormap.

opacityfloat

The surface plot opacity.

**kwargsdict

Additional keyword arguments for attributes of streamline.seed.widget.

sfepy.postprocess.domain_specific.plot_warp_scalar(source, ctp, bbox, position, family, kind, name, rel_scaling=1.0, color_kind=None, color_name=None, opacity=1.0)[source]

Show a 2D scalar field by displaying a colormap given by quantity color_name on the deformed mesh deformed by the scalar in the third dimension.

Parameters
rel_scalingfloat

The relative scaling of scalar warp.

color_kindstr, optional

The kind of data determining the colormap.

color_namestr, optional

The name of data determining the colormap.

opacityfloat

The surface plot opacity.