Visualisation data is generated in parallel, with each processes generating the
necessary data for its part of the domain. This data is written into a data file.

Actual rendering is performed in serial using the LavaVu rendering engine.

glucifer provides many flexible rendering options, including client-server based
operation for remote usage. Users may choose to renderer outputs to raster images,
or save a database file for later rendering. For those working in the Jupyter
environment, glucifer will inline rendered images or even interactive webgl
frames (still experimental).

The Store class provides a database which stores gLucifer drawing objects
as they are rendered in figures. It also provides associated routines for saving
and reloading this database to external files

In addition to parameter specification below, see property docstrings for
further information.

Parameters:

filename (str) – Filename to use for a disk database, default is to create a temporary database filename.

split (bool) – Set to true to write a separate database file for each timestep visualised

view (bool) – Set to true and pass filename if loading a saved database for revisualisation

Example

Create a database:

>>> importglucifer>>> store=glucifer.Store()

Optionally provide a filename so you don’t need to call save later (no extension required)

>>> store=glucifer.Store('myvis')

Pass to figures when creating them
(Providing a name allows you to revisualise the figure from the name)

>>> fig=glucifer.Figure(store,name="myfigure")

When figures are rendered with show() or save(imgname), they are saved to storage
If you don’t need to render an image but still want to store the figure to view later,
just call save() without a filename

>>> fig.save()

Save the database (only necessary if no filename provided when created)

quality (unsigned) – Antialiasing oversampling quality. For a value of 2, the image will be
rendered at twice the resolution, and then downsampled. Setting
this to 1 disables antialiasing, values higher than 3 are not recommended..

properties (str) – Further properties to set on the figure.

Example

Create a figure:

>>> importglucifer>>> fig=glucifer.Figure()

We need a mesh

>>> importunderworldasuw>>> mesh=uw.mesh.FeMesh_Cartesian()

Add drawing objects:

>>> fig.append(glucifer.objects.Surface(mesh,1.))

Draw image. Note that if called from within a Jupyter notebook, image
will be rendered inline. Otherwise, image will be saved to disk.