Package solvcon :: Module visual_vtk
[hide private]
[frames] | no frames]

Module visual_vtk

source code

Visualizing algorithm by VTK.

Classes [hide private]
  VtkOperation
Pre-defined VTK operations.
  Vop
Pre-defined VTK operations.
Functions [hide private]
vtk.vtkUnstructuredGrid
make_ust_from_blk(blk)
Create vtk.vtkUnstructuredGrid object from Block object.
source code
numpy.ndarray
valid_vector(arr)
A valid vector must have 3 compoments.
source code
 
set_array(arr, name, fpdtype, ust)
Set the data of a ndarray to vtk array and return the set vtk array.
source code
Variables [hide private]
  VANMAP = {'float32': 'vtkFloatArray', 'float64': 'vtkDoubleArr...
  __package__ = None
hash(x)
Function Details [hide private]

make_ust_from_blk(blk)

source code 

Create vtk.vtkUnstructuredGrid object from Block object.

Parameters:
  • blk (solvcon.block.Block) - input block.
Returns: vtk.vtkUnstructuredGrid
the ust object.

valid_vector(arr)

source code 

A valid vector must have 3 compoments. If it has only 2, pad it. If it has more than 3, raise ValueError.

Parameters:
  • arr (numpy.ndarray) - input vector array.
Returns: numpy.ndarray
validated array.

set_array(arr, name, fpdtype, ust)

source code 

Set the data of a ndarray to vtk array and return the set vtk array. If the array of the specified name existed, use the existing array.

Parameters:
  • arr (numpy.ndarray) - input array.
  • name (str) - array name.
  • fpdtype (str) - floating point dtype.
  • ust (vtk.vtkobject) - the UnstructuredGrid object to store the array.
Returns:
the set VTK array object.

Variables Details [hide private]

VANMAP

Value:
{'float32': 'vtkFloatArray', 'float64': 'vtkDoubleArray'}