<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
Hi,<br><br>I'm using a large EnSight dataset, which contains one tetrahedron cell array and around a hundred point arrays, with over 500,000 nodes. I would like to calculate the spatial derivatives of each of these point arrays using the cell derivatives class. I'm wondering whether I'm using it correctly (see below), so can anyone please comment on it?<br><br>In short it works like this:<br><br><span style="font-family: Courier New,Courier,Monospace;">vtkGenericEnSightReader *vEnSightReader = vtkGenericEnSightReader::New();</span><br style="font-family: Courier New,Courier,Monospace;"><span style="font-family: Courier New,Courier,Monospace;">...</span><br style="font-family: Courier New,Courier,Monospace;"><span style="font-family: Courier New,Courier,Monospace;">Load/display EnSight data</span><br style="font-family: Courier New,Courier,Monospace;"><span style="font-family: Courier New,Courier,Monospace;">...</span><br style="font-family: Courier New,Courier,Monospace;"><span style="font-family: Courier New,Courier,Monospace;">vtkCellDerivatives *vCellDerivatives = vtkCellDerivatives::New();</span><br style="font-family: Courier New,Courier,Monospace;"><span style="font-family: Courier New,Courier,Monospace;">vtkCellDataToPointData *vCellToPointData = vtkCellDataToPointData::New();</span><br style="font-family: Courier New,Courier,Monospace;"><span style="font-family: Courier New,Courier,Monospace;">vCellDerivatives-&gt;SetVectorModeToComputeGradient();</span><br><br><span style="font-family: Courier New,Courier,Monospace;">vEnsightReader-&gt;GetOutput()-&gt;GetPointData()-&gt;SetActiveAttribute(iIndex, 0)<br>vCellDerivatives-&gt;SetInput(vEnsightReader-&gt;GetOutput());<br>vCellDerivatives-&gt;Update();<br>vCellDerivatives-&gt;SetInput(vEnsightReader-&gt;GetOutput());<br>vCellToPointData-&gt;SetInput(vCellDerivatives-&gt;GetOutput());<br>vCellToPointData-&gt;Update();<br>...<br>Get values using vCellToPointData-&gt;GetOutput()<br><br><span style="font-family: Geneva,Arial,Sans-serif;">The code works without crashing or anything, and displaying is also working, though I find it difficult to check my results.<br><br>Thanks in advance!<br><br>Hans<br></span></span><br /><hr />Watch “Cause Effect,” a show about real people making a real difference. <a href='http://im.live.com/Messenger/IM/MTV/?source=text_watchcause' target='_new'>Learn more.</a></body>
</html>