The bempp.visualization module

Introduction

This module contains functions employing the VTK toolkit to plot grid functions and solutions of integral equations.

There exists a new, more user-friendly visualization module: visualization2.

Reference

bempp.visualization.getTvtkGrid(grid)

Return a TVTK object containing the grid

bempp.visualization.gridActor(grid)

Return a TVTK actor representing a grid.

Parameters:
  • grid (Grid)

    A BEM++ grid object.

bempp.visualization.gridFunctionActor(gridFun, dataType='vertex_data', transformation='real')

Return a TVTK actor representing a grid function.

Parameters:
  • gridFun (gridFunction).

    The grid function to be plotted.

  • dataType (‘vertex_data’ or ‘cell_data’)

    Determines whether the plot should be constructed from the function values at element vertices or at element centres.

  • transformation (‘real’, ‘imag’, ‘abs’ or a callable object)

    Determines how the function is transformed before plotting.

bempp.visualization.legendActor(actor)

Return a TVTK actor representing the legend of another actor.

bempp.visualization.plotGrid(grid)

Plot a grid.

This function takes the same parameters as gridActor().

bempp.visualization.plotGridFunction(*args, **kwargs)

Plot a grid function.

This function takes the same parameters as gridFunctionActor().

bempp.visualization.plotThreePlanes(potentialOp, gridFun, limits, dimensions, colorRange=None, transformation='real', evalOps=None)

Plot the potential generated by applying a potential operator to a grid function on the xy, xz and yz planes.

Parameters:
  • potentialOp (PotentialOperator)

    A potential operator.

  • gridFun (GridFunction)

    A grid function.

  • limits (tuple)

    Tuple (min, max) or (xmin, xmax, ymin, ymax, zmin, zmax) specifying the extent of each plane on which the potential will be plotted.

  • dimensions (tuple)

    Scalar or tuple (xdim, ydim, zdim) specifying the number of samples in each direction.

  • colorRange (tuple)

    Tuple (min, max) determining the range of data to be plotted. If set to None, the data range is determined automatically.

  • transformation (‘real’, ‘imag’, ‘abs’ or a callable object)

    Determines how the potential is transformed before plotting.

  • evalOps (EvaluationOptions)

    Options controlling the evaluation of the potential.

bempp.visualization.plotTvtkActors(tvtkActors)

Plot a number of TVTK actors in the same plot.

bempp.visualization.plotgridFunction(*args, **kwargs)

Plot a grid function.

This function takes the same parameters as gridFunctionActor().

bempp.visualization.scalarDataOnRegularGridActor(points, data, dimensions, colorRange=None, transformation='real')

Return a TVTK actor representing the plot of a function interpolated on a regular grid.

Table Of Contents

Previous topic

The bempp.lib module

Next topic

The bempp.visualization2 module

This Page