<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>VTK: dox/Parallel/vtkTemporalInterpolatedVelocityField.h Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.6 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="classes.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <h1>dox/Parallel/vtkTemporalInterpolatedVelocityField.h</h1><a href="a03348.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*=========================================================================</span> <a name="l00002"></a>00002 <span class="comment"></span> <a name="l00003"></a>00003 <span class="comment"> Program: Visualization Toolkit</span> <a name="l00004"></a>00004 <span class="comment"> Module: $RCSfile: vtkTemporalInterpolatedVelocityField.h,v $</span> <a name="l00005"></a>00005 <span class="comment"></span> <a name="l00006"></a>00006 <span class="comment"> Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen</span> <a name="l00007"></a>00007 <span class="comment"> All rights reserved.</span> <a name="l00008"></a>00008 <span class="comment"> See Copyright.txt or http://www.kitware.com/Copyright.htm for details.</span> <a name="l00009"></a>00009 <span class="comment"></span> <a name="l00010"></a>00010 <span class="comment"> This software is distributed WITHOUT ANY WARRANTY; without even</span> <a name="l00011"></a>00011 <span class="comment"> the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR</span> <a name="l00012"></a>00012 <span class="comment"> PURPOSE. See the above copyright notice for more information.</span> <a name="l00013"></a>00013 <span class="comment"></span> <a name="l00014"></a>00014 <span class="comment">=========================================================================*/</span> <a name="l00046"></a>00046 <span class="preprocessor">#ifndef __vtkTemporalInterpolatedVelocityField_h</span> <a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">#define __vtkTemporalInterpolatedVelocityField_h</span> <a name="l00048"></a>00048 <span class="preprocessor"></span> <a name="l00049"></a>00049 <span class="preprocessor">#include "<a class="code" href="a02026.html">vtkFunctionSet.h</a>"</span> <a name="l00050"></a>00050 <span class="preprocessor">#include "<a class="code" href="a02127.html">vtkSmartPointer.h</a>"</span> <span class="comment">// because it is good</span> <a name="l00051"></a>00051 <span class="comment">//BTX</span> <a name="l00052"></a>00052 <span class="preprocessor">#include <vtkstd/vector></span> <span class="comment">// Because they are good</span> <a name="l00053"></a>00053 <span class="comment">//ETX</span> <a name="l00054"></a>00054 <a name="l00055"></a><a class="code" href="a03348.html#9c2e248d1910e6cc3d4127a054eb2e98">00055</a> <span class="preprocessor">#define ID_INSIDE_ALL 00</span> <a name="l00056"></a><a class="code" href="a03348.html#8c263d756416027a17a623c3832c60ad">00056</a> <span class="preprocessor"></span><span class="preprocessor">#define ID_OUTSIDE_ALL 01</span> <a name="l00057"></a><a class="code" href="a03348.html#0791377df9b69f72a98479b3407444fe">00057</a> <span class="preprocessor"></span><span class="preprocessor">#define ID_OUTSIDE_T0 02</span> <a name="l00058"></a><a class="code" href="a03348.html#9690db3cb1d598e610ef0a7819580f0e">00058</a> <span class="preprocessor"></span><span class="preprocessor">#define ID_OUTSIDE_T1 03</span> <a name="l00059"></a>00059 <span class="preprocessor"></span> <a name="l00060"></a>00060 <span class="keyword">class </span><a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a>; <a name="l00061"></a>00061 <span class="keyword">class </span><a class="code" href="a00356.html" title="abstract superclass for arrays of numeric data">vtkDataArray</a>; <a name="l00062"></a>00062 <span class="keyword">class </span><a class="code" href="a01242.html" title="represent and manipulate point attribute data">vtkPointData</a>; <a name="l00063"></a>00063 <span class="keyword">class </span><a class="code" href="a00582.html" title="provides thread-safe access to cells">vtkGenericCell</a>; <a name="l00064"></a>00064 <span class="keyword">class </span><a class="code" href="a00436.html" title="dynamic, self-adjusting array of double">vtkDoubleArray</a>; <a name="l00065"></a>00065 <span class="keyword">class </span><a class="code" href="a00225.html" title="Interface for obtaining interpolated velocity values.">vtkCachingInterpolatedVelocityField</a>; <a name="l00066"></a>00066 <a name="l00067"></a><a class="code" href="a01672.html">00067</a> <span class="keyword">class </span><a class="code" href="a02170.html#7438b32736749f34b46d66222305e60b">VTK_PARALLEL_EXPORT</a> <a class="code" href="a01672.html" title="A helper class for interpolating between times during particle tracing.">vtkTemporalInterpolatedVelocityField</a> : <span class="keyword">public</span> <a class="code" href="a00570.html" title="Abstract interface for sets of functions.">vtkFunctionSet</a> <a name="l00068"></a>00068 { <a name="l00069"></a>00069 <span class="keyword">public</span>: <a name="l00070"></a><a class="code" href="a01672.html#5d343f026bd29df98c301ccd4d2810ed">00070</a> vtkTypeRevisionMacro(<a class="code" href="a01672.html" title="A helper class for interpolating between times during particle tracing.">vtkTemporalInterpolatedVelocityField</a>,<a class="code" href="a00570.html" title="Abstract interface for sets of functions.">vtkFunctionSet</a>); <a name="l00071"></a>00071 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00570.html#c7cdd06bd77b4fde16312419aa717bc9">PrintSelf</a>(ostream& os, <a class="code" href="a00869.html" title="a simple class to control print indentation">vtkIndent</a> indent); <a name="l00072"></a>00072 <a name="l00075"></a>00075 <span class="keyword">static</span> <a class="code" href="a01672.html" title="A helper class for interpolating between times during particle tracing.">vtkTemporalInterpolatedVelocityField</a> *<a class="code" href="a01084.html#4d5b227267c076d6f9e38483370b6612">New</a>(); <a name="l00076"></a>00076 <a name="l00078"></a>00078 <a name="l00080"></a>00080 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a00570.html#35b33633659aec5fa5eddac109af2d73">FunctionValues</a>(<span class="keywordtype">double</span>* x, <span class="keywordtype">double</span>* u); <a name="l00081"></a>00081 <span class="keywordtype">int</span> FunctionValuesAtT(<span class="keywordtype">int</span> T, <span class="keywordtype">double</span>* x, <span class="keywordtype">double</span>* u); <a name="l00083"></a>00083 <a name="l00085"></a>00085 <a name="l00088"></a><a class="code" href="a01672.html#69766f523730df3de9d11e49bd83e52d">00088</a> <span class="keywordtype">void</span> SelectVectors(<span class="keyword">const</span> <span class="keywordtype">char</span> *fieldName) <a name="l00089"></a>00089 {this->SetVectorsSelection(fieldName);} <a name="l00091"></a>00091 <a name="l00094"></a>00094 <span class="keywordtype">void</span> SetDataSetAtTime(<span class="keywordtype">int</span> I, <span class="keywordtype">int</span> N, <span class="keywordtype">double</span> T, <a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a>* dataset, <span class="keywordtype">bool</span> staticdataset); <a name="l00095"></a>00095 <a name="l00097"></a>00097 <a name="l00100"></a>00100 <span class="keywordtype">bool</span> GetCachedCellIds(<a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> <span class="keywordtype">id</span>[2], <span class="keywordtype">int</span> ds[2]); <a name="l00101"></a>00101 <span class="keywordtype">void</span> SetCachedCellIds(<a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> <span class="keywordtype">id</span>[2], <span class="keywordtype">int</span> ds[2]); <a name="l00103"></a>00103 <a name="l00106"></a>00106 <span class="keywordtype">void</span> ClearCache(); <a name="l00107"></a>00107 <a name="l00109"></a>00109 <a name="l00111"></a>00111 <span class="keywordtype">int</span> TestPoint(<span class="keywordtype">double</span>* x); <a name="l00112"></a>00112 <span class="keywordtype">int</span> QuickTestPoint(<span class="keywordtype">double</span>* x); <a name="l00114"></a>00114 <a name="l00116"></a>00116 <a name="l00118"></a>00118 vtkGetVector3Macro(LastGoodVelocity,<span class="keywordtype">double</span>); <a name="l00120"></a>00120 <a name="l00122"></a>00122 <a name="l00123"></a>00123 vtkGetMacro(CurrentWeight,<span class="keywordtype">double</span>); <a name="l00125"></a>00125 <a name="l00126"></a>00126 <span class="keywordtype">bool</span> InterpolatePoint(<a class="code" href="a01242.html" title="represent and manipulate point attribute data">vtkPointData</a> *outPD1, <a name="l00127"></a>00127 <a class="code" href="a01242.html" title="represent and manipulate point attribute data">vtkPointData</a> *outPD2, <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> outIndex); <a name="l00128"></a>00128 <a name="l00129"></a>00129 <span class="keywordtype">bool</span> InterpolatePoint(<span class="keywordtype">int</span> T, <a class="code" href="a01242.html" title="represent and manipulate point attribute data">vtkPointData</a> *outPD1, <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> outIndex); <a name="l00130"></a>00130 <a name="l00131"></a>00131 <span class="keywordtype">bool</span> GetVorticityData( <a name="l00132"></a>00132 <span class="keywordtype">int</span> T, <span class="keywordtype">double</span> pcoords[3], <span class="keywordtype">double</span> *weights, <a name="l00133"></a>00133 <a class="code" href="a00582.html" title="provides thread-safe access to cells">vtkGenericCell</a> *&cell, <a class="code" href="a00436.html" title="dynamic, self-adjusting array of double">vtkDoubleArray</a> *cellVectors); <a name="l00134"></a>00134 <a name="l00135"></a>00135 <span class="keywordtype">void</span> ShowCacheResults(); <a name="l00136"></a>00136 <span class="keywordtype">bool</span> IsStatic(<span class="keywordtype">int</span> datasetIndex); <a name="l00137"></a>00137 <a name="l00138"></a>00138 <span class="keywordtype">void</span> AdvanceOneTimeStep(); <a name="l00139"></a>00139 <a name="l00140"></a>00140 <span class="keyword">protected</span>: <a name="l00141"></a>00141 <a class="code" href="a01672.html" title="A helper class for interpolating between times during particle tracing.">vtkTemporalInterpolatedVelocityField</a>(); <a name="l00142"></a>00142 ~<a class="code" href="a01672.html" title="A helper class for interpolating between times during particle tracing.">vtkTemporalInterpolatedVelocityField</a>(); <a name="l00143"></a>00143 <a name="l00144"></a>00144 <span class="keywordtype">int</span> <a class="code" href="a00570.html#35b33633659aec5fa5eddac109af2d73">FunctionValues</a>(<a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a>* ds, <span class="keywordtype">double</span>* x, <span class="keywordtype">double</span>* f); <a name="l00145"></a>00145 <span class="keyword">virtual</span> <span class="keywordtype">void</span> SetVectorsSelection(<span class="keyword">const</span> <span class="keywordtype">char</span> *v); <a name="l00146"></a>00146 <a name="l00147"></a><a class="code" href="a01672.html#a2db88a2821a65f2f5751060f1e67439">00147</a> <span class="keywordtype">double</span> vals1[3]; <a name="l00148"></a><a class="code" href="a01672.html#5d99411223e3e9b3d3324e605c44836b">00148</a> <span class="keywordtype">double</span> vals2[3]; <a name="l00149"></a><a class="code" href="a01672.html#2786df57b7988ef6140253c5ca83313f">00149</a> <span class="keywordtype">double</span> times[2]; <a name="l00150"></a><a class="code" href="a01672.html#50b840e35367b52f407494d21fcf3c27">00150</a> <span class="keywordtype">double</span> LastGoodVelocity[3]; <a name="l00151"></a>00151 <a name="l00152"></a>00152 <span class="comment">// The weight (0.0->1.0) of the value of T between the two avaiable </span> <a name="l00153"></a>00153 <span class="comment">// time values for the current computation</span> <a name="l00154"></a><a class="code" href="a01672.html#9f8de2fff9e36759c44f68f04bc15480">00154</a> <span class="keywordtype">double</span> CurrentWeight; <a name="l00155"></a>00155 <span class="comment">// One minus the CurrentWeight </span> <a name="l00156"></a><a class="code" href="a01672.html#1440bd6891f30d092412f992ef3bcad1">00156</a> <span class="keywordtype">double</span> OneMinusWeight; <a name="l00157"></a>00157 <span class="comment">// A scaling factor used when calculating the CurrentWeight { 1.0/(T2-T1) }</span> <a name="l00158"></a><a class="code" href="a01672.html#9b6eef21367033dbfdddb2a0b5c1963d">00158</a> <span class="keywordtype">double</span> ScaleCoeff; <a name="l00159"></a>00159 <span class="comment">//BTX</span> <a name="l00160"></a><a class="code" href="a01672.html#203ceb929c88ff67ff74538471db7a93">00160</a> <a class="code" href="a01562.html" title="Hold a reference to a vtkObjectBase instance.">vtkSmartPointer<vtkCachingInterpolatedVelocityField></a> ivf[2]; <a name="l00161"></a>00161 <span class="comment">// we want to keep track of static datasets so we can optimize caching</span> <a name="l00162"></a><a class="code" href="a01672.html#8c68bae2f0d54b8a173bdd8af6d91edf">00162</a> vtkstd::vector<bool> StaticDataSets; <a name="l00163"></a>00163 <span class="comment">//ETX</span> <a name="l00164"></a>00164 <span class="keyword">private</span>: <a name="l00165"></a>00165 <span class="comment">// Hide this since we need multiple time steps and are using a different</span> <a name="l00166"></a>00166 <span class="comment">// function prototype</span> <a name="l00167"></a>00167 <span class="keyword">virtual</span> <span class="keywordtype">void</span> AddDataSet(<a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a>*) {}; <a name="l00168"></a>00168 <a name="l00169"></a>00169 <span class="keyword">private</span>: <a name="l00170"></a>00170 <a class="code" href="a01672.html" title="A helper class for interpolating between times during particle tracing.">vtkTemporalInterpolatedVelocityField</a>(<span class="keyword">const</span> <a class="code" href="a01672.html" title="A helper class for interpolating between times during particle tracing.">vtkTemporalInterpolatedVelocityField</a>&); <span class="comment">// Not implemented.</span> <a name="l00171"></a>00171 <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a01672.html" title="A helper class for interpolating between times during particle tracing.">vtkTemporalInterpolatedVelocityField</a>&); <span class="comment">// Not implemented.</span> <a name="l00172"></a>00172 }; <a name="l00173"></a>00173 <a name="l00174"></a>00174 <span class="preprocessor">#endif</span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:44 2009 for VTK by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address> </body> </html>