-
Notifications
You must be signed in to change notification settings - Fork 1
Home
(a)

(a) OSUFlow running with irregular grid datasets. (b) OSUFlow plugin for Paraview. (c) Interactive seeding using VTK pipeline.
OSUFlow-VTK library implements the bridge between OSUFlow and VTK, and provides a VTK filter for GUI operation and also a Paraview plugin. OSUFlow is a streamline and pathline visualization library. VTK is a generic visualization tool library. We integrate these libraries together to allow running OSUFlow in the VTK pipeline and use the rich scientific data readers and visualization tools in VTK.
This package comes with the original OSUFlow, the OSUFlowVTK filters in serial and parallel, and several new classes as the VTK integration bridge. The new filters and classes are put in the a separate VTK folder. More detail about the new classes are as follows:
-
New vtkOSUFlow and vtkPOSUFlow filter classes: filters for VTK's visualization pipeline. "P" stands for parallelization using MPI. -
A new OSUFlowVTK class: allows OSUFlow to use VTK's generic dataset class 'vtkDataSet' and performs visualization on top of it -
VectorFieldVTK: An inner class for OSUFlow's particle tracing procedures, which inherits and overrides OSUFlow's CVectorField class, which stores data and performs tri-linear interpolation of vector data when being queried from OSUFlow.
Several examples for the integration and tools are added in /VTK/examples.
To preserve the runtime performance after the integration, necessary changes should be made in the current OSUFlow library. The primary but simple change is that the class CVectorField now allows function overriding by its descendant classes. Class VectorField manages the flow field data and interpolates the vectors accordingly, which has similar functionality to vtkDataSet. Instead of converting loaded data in VTK data structure to OSUFlow data structure, it is better to directly use vtkDataSet by OSUFlow. An easy but elegant method is to turn the original VectorField class into an interface (a virtual class), and allows functions overridden by its descendants.
A list of changed files and their description:
- src/Blocks.C: compatible for builds without MPI
- src/Field.h: make every function virtual
- src/Grid.h : typo fix
- src/ParFlow.C/.h: 1. allows assigning MPI communicator as diy does. 2. allows assigning integration direction
- added samples in sample_data/
InstallWithPlugin (Needs more tests on different machines)
InstallWithoutPlugin (Should work!)
OSUFlow *osuflow = new OSUFlow;
// read from file
vtkSmartPointer<vtkDataSet> data = getData_plot3d();
// assign data to OSUFlow
CVectorField *field = new VectorFieldVTK( data );
osuflow->SetFlowField( field );
// gen seeds
VECTOR3 minB, maxB;
osuflow->Boundary(minB, maxB);
osuflow->SetRandomSeedPoints(&minB[0], &maxB[0], 100);
// init results
list<vtListSeedTrace*> list;
osuflow->SetIntegrationParams(1, 5);
// run
osuflow->GenStreamLines(list , BACKWARD_AND_FORWARD, 50, 0);
### Example files Description
by Chun-Ming Chen
Since May 21, 2013 @ Kitware
