[vtkusers] vtkCellDerivatives - Example and usage
Stefan Gutschling
stefan.gutschling at epcos.com
Tue Sep 26 09:02:45 EDT 2000
hello vtkusers,
I am looking for a small example (tcl od cxx) that uses the
vtkCellDerivatives
class from the contrib directory in vtk3.12.
unfortunately, the example cellDerivs.tcl needs the vtk-dataset
"cylFlow.vtk", that is not within the vtk20Data.part*.tar.gz
and MissingData.tar.gz files.
I like to calculate the derivatives of electric potentials
given at nodes of a FEM mesh and display them.
Sofar I created a small program that reads in my data
Nodes, electric potentials (at the FEM nodes), the elements
(triangles saved by node ids )
For this I used the following classes:
vtkPolyData *mesh = vtkPolyData::New();
vtkPoints *nodeCoords=vtkPoints::New();
vtkScalars *=vtkScalars::New();
vtkCellArray *cells=vtkCellArray::New();
# ...with some code in between I
# assign the points(nodes of mesh) and scalar values (at nodes)
# in "nodeCoords" and "nodeScalars"
# also I created all triangular elements of the mesh stored in "cells"
# then add all to the polydata
mesh->SetPoints(nodeCoords);
nodeCoords->Delete();
// assign cells to mesh
mesh->SetPolys(cells);
cells->Delete();
// assign potentials to mesh
mesh->GetPointData()->SetScalars(nodeScalars);
nodeScalars->Delete();
# after that follows the Mapper,Actor, add the actor to
# the renderer etc...
How do I have to use the vtkCellDerivatives class for my
problem...?
Best Regards,
stevie
--
----------------------------------------------------------------
Dr. Stefan Gutschling
EPCOS AG
Surface Acoustic Wave Components Division
OFW E NT
Tel.: ++49 89-636-21936
Fax.: ++49 89-636-27304
mailto:Stefan.Gutschling at epcos.com
----------------------------------------------------------------
Postal address: P.O.Box 80 17 09; D-81617 München
Office address: Anzinger Str. 13; D-81671 München
Homepage: http://www.epcos.com
More information about the vtkusers
mailing list