Peano
Loading...
Searching...
No Matches
tarch.plotter.api.output.VTUUnstructuredGrid Namespace Reference

Data Structures

class  VTUUnstructuredGrid
 The visualiser is first and foremost a persistency layer around datasets. More...
 

Functions

 prepare_2D_patches_unstructured_grid (cell_data, dof, unknowns, depth_scaling, description, is_data_associated_to_cell, mapping)
 Prepare 2D patches in a unstructured grid for rendering.
 
 prepare_3D_patches_unstructured_grid (cell_data, dof, unknowns, description, is_data_associated_to_cell, mapping)
 Prepare 3D patches in a unstructured grid for rendering.
 
 group_unknown_names (names)
 Group the names of the unknowns into the arrays we write.
 
 name_unknowns (grid, description, unknowns, is_data_associated_to_cell, split_unknowns)
 Label the unknowns of a grid with their symbolic names.
 

Function Documentation

◆ group_unknown_names()

tarch.plotter.api.output.VTUUnstructuredGrid.group_unknown_names (   names)

Group the names of the unknowns into the arrays we write.

A name v[i] belongs to the vector v, all other names are scalars. Returns a list of (array name, list of indices of the unknowns), in the order in which the arrays first show up, e.g. ["p", "v[0]", "v[1]"] yields [("p", [0]), ("v", [1, 2])].

Definition at line 346 of file VTUUnstructuredGrid.py.

◆ name_unknowns()

tarch.plotter.api.output.VTUUnstructuredGrid.name_unknowns (   grid,
  description,
  unknowns,
  is_data_associated_to_cell,
  split_unknowns 
)

Label the unknowns of a grid with their symbolic names.

If the description of the unknowns holds one name per unknown (

See also
unknown_names_from_description()), we name the components of the data array accordingly, plus the trailing subdomain component. Paraview then offers the names when you colour by the array. Otherwise, we leave the grid alone.

split_unknowns: Boolean If set, we additionally add one array per variable, so filters such as Paraview's Calculator or Contour can address it by name. A scalar becomes an array with one component. The entries v[0], v[1], ... of a variable with multiplicity become one vector array v. As Paraview only treats arrays with three components as vectors, e.g. for glyphs, we pad a vector with two entries with a zero.

Definition at line 364 of file VTUUnstructuredGrid.py.

Referenced by tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.parse_and_render_snapshot().

Here is the caller graph for this function:

◆ prepare_2D_patches_unstructured_grid()

tarch.plotter.api.output.VTUUnstructuredGrid.prepare_2D_patches_unstructured_grid (   cell_data,
  dof,
  unknowns,
  depth_scaling,
  description,
  is_data_associated_to_cell,
  mapping 
)

Prepare 2D patches in a unstructured grid for rendering.

Parameters:

cell_data: list of patches List of Patches with file data

dof: Integer Number of degrees of freedom per axis

unknowns: Integer Number of unknowns per patch volume

Returns:

grid: vtk.vtkUnstructuredGrid Grid cells

Definition at line 14 of file VTUUnstructuredGrid.py.

Referenced by tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.parse_and_render_snapshot().

Here is the caller graph for this function:

◆ prepare_3D_patches_unstructured_grid()

tarch.plotter.api.output.VTUUnstructuredGrid.prepare_3D_patches_unstructured_grid (   cell_data,
  dof,
  unknowns,
  description,
  is_data_associated_to_cell,
  mapping 
)

Prepare 3D patches in a unstructured grid for rendering.

Parameters:

cell_data: list of patches List of Patches with file data

dof: Integer Number of degrees of freedom per axis

unknowns: Integer Number of unknowns per patch volume

Returns:

grid: vtk.vtkUnstructuredGrid Grid cells

Definition at line 141 of file VTUUnstructuredGrid.py.

Referenced by tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.parse_and_render_snapshot().

Here is the caller graph for this function: