<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="country-region"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="City"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="place"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";
color:black;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;}
pre
{margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
color:black;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Courier New";
color:maroon;
font-weight:normal;
font-style:normal;
text-decoration:none none;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor=white lang=EN-US link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=maroon face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:maroon'>John,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=maroon face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:maroon'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=maroon face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:maroon'>I have a
question about the change to the DATA_GEOMETRY_STATIC flag. If the flag
is always set, even on the first execution, then how will downstream filters
know when the geometry really does change? For example, what if the
filename in the reader is changed? What if you change the filter’s
input between sources that both declare the DATA_GEOMETRY_STATIC flag, but have
different geometry. Also, what happens when ghost cells are requested
(and provided)? Is the geometry still considered static, or is it not
static because it has technically changed?<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=maroon face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:maroon'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=maroon face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:maroon'>On a less
technical note, I’m glad to see you implement this feature. I’ve
been thinking for some time that the D3 filter should be able to efficiently
handle cases where the topology remains fixed, which means that the space
partitioning and some of the data transfer could be skipped. This is
certainly the necessary base requirements for that.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=maroon face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:maroon'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=maroon face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:maroon'>There are
probably a few filters that could benefit from taking advantage of the static
geometry flag. There are other examples of filters whose operation
relies solely on topology such as vtkGeometryFilter, vtkTriangleFilter, and
vtkStripper.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=maroon face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:maroon'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=maroon face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:maroon'>-Ken<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=maroon face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:maroon'><o:p> </o:p></span></font></p>
<div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
color=black face="Times New Roman"><span style='font-size:12.0pt;color:windowtext'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 color=black face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma;color:windowtext;font-weight:bold'>From:</span></font></b><font
size=2 color=black face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;
color:windowtext'> vtk-developers-bounces@vtk.org
[mailto:vtk-developers-bounces@vtk.org] <b><span style='font-weight:bold'>On
Behalf Of </span></b>John Biddiscombe<br>
<b><span style='font-weight:bold'>Sent:</span></b> Friday, July 25, 2008 7:55
AM<br>
<b><span style='font-weight:bold'>To:</span></b> VTK Developers<br>
<b><span style='font-weight:bold'>Subject:</span></b> [vtk-developers]
vtkDataObject::DATA_GEOMETRY_UNMODIFIED()</span></font><font color=black><span
style='color:windowtext'><o:p></o:p></span></font></p>
</div>
<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'>Some time ago, I added the eponymous information key
so that when animating or iterating over time steps, I could flag certain
datasets as not having changed - topologically speaking, even though they were
produced by a filter which had possibly re-executed - and thus regenerated all
pointers/datasets etc. In several of my transient data readers, I cache the
geometry and pass out the same mesh with subsequent re-executions of the
filter, scalars are changed and I set the DATA_GEOMETRY_UNMODIFIED() flag.<br>
<br>
The most advanced usage is the CFX reader which can tell if a block within a
multiblock structure is dynamic or static and outputs a multiblock structure
with (in one example) 38 volumes, 17 of which are dynamic, 21 are static. 17
therefore have the unmodified flag set. Filters such as TemporalCache and
TemporalInterpolator have been tweaked to pass through this flag, so that when
the mesh is interpolated to give new time steps between the original ones, it
tests to see if the original 2 input meshes (timesteps) are static and if so,
outputs static as well.<br>
<br>
The particle tracer is the first filter to make use of this flag effectively,
and is now capable of constructing BSP trees for the first timestep on all 38
volumes, then for each subsequent step, it shares the BSP structure if static,
or constructs a new one if dynamic, it does this independently for each block
of the multiblock structure.<br>
<br>
The time saving this has produced is very significant. On some of the very
large volumes, constructing the BSP tree can take a minute or so, and doing
this once, instead of (say) 300 times saves a lot. Additionally, cache
information about particles is saved for static meshes between time steps,
again improving performance.<br>
<br>
I would like to now start pushing this functionality out to other filters,
beyond just those of my own experimentation, and my first though is that the
key should be renamed to vtkDataObject::DATA_GEOMETRY_STATIC(), my first
implementation made an extra assumption that when data first arrived (say
timestep 0), it could not be UnModified since it did not exist before, - this
made things uneccesarily complicated, but was also intended to cater for
filters like (for example) vtkElevationFilter - which modified the output, but
leaves the geometry alone - indicating that the geometry was unmodifed - not
quite the same as <i><span style='font-style:italic'>static</span></i>. <br>
<br>
I believe that at the vtkAlgorithm level, a flag such as
"this->GeometryNotModified" (with a default value of false) should
be added, and the executive adjusted to check the algorithm so that if the
input is static and the algorithm has GeometryNotModified, then the information
key can be passed automatically. (Filter like Temporal interpolator, can set
the flag at run time if the inputs are static, others like elevation filter can
set it in the constructor and leave it alone).<br>
<br>
Adding this functionality will not help many existing filters, since there are
few/none others that operate over time dependent data, though some could be
altered to re-use output geometry (caching internally possibly), which would
benefit animations, but putting the key setting into the executive will allow
data to pass through several filters and remain 'static', thus allowing more
complicated optimizations which might not be possible without a 'hand made'
pipeline (not very clearly explained, but if you've read this far, then you
probably understand anyway). (Note also that having a static flag for a
miltiblock filter will not be enough and in fact we need something more like
GetGeometryStatic(int index)...I have not thought this case though very well
yet.)<br>
<br>
Up until now, I have always set the information key in the algorithm, but I
intend to now move some functionality into the executive.<br>
<br>
If anyone wishes to comment or make suggestions of improvements, then please
open up a discussion here. I shan't be checking anything in for a while, but
will be experimenting with alternative implementations.<br>
<br>
thanks<br>
<br>
JB<br>
<br>
<br>
<o:p></o:p></span></font></p>
<pre><font size=2 color=black face="Courier New"><span style='font-size:10.0pt'>-- <o:p></o:p></span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt'>John Biddiscombe, email:biddisco @ cscs.ch<o:p></o:p></span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt'><a
href="http://www.cscs.ch/about/BJohn.php">http://www.cscs.ch/about/BJohn.php</a><o:p></o:p></span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt'>CSCS, Swiss National Supercomputing Centre | Tel: +41 (91) 610.82.07<o:p></o:p></span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt'>Via Cantonale, 6928 <st1:place
w:st="on"><st1:City w:st="on">Manno</st1:City>, <st1:country-region w:st="on">Switzerland</st1:country-region></st1:place> | Fax: +41 (91) 610.82.82<o:p></o:p></span></font></pre></div>
</div>
</body>
</html>