<!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/vtkCachingInterpolatedVelocityField.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/vtkCachingInterpolatedVelocityField.h</h1><a href="a03276.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: vtkCachingInterpolatedVelocityField.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="l00043"></a>00043 <span class="preprocessor">#ifndef __vtkTInterpolatedVelocityField_h</span> <a name="l00044"></a>00044 <span class="preprocessor"></span><span class="preprocessor">#define __vtkTInterpolatedVelocityField_h</span> <a name="l00045"></a>00045 <span class="preprocessor"></span> <a name="l00046"></a>00046 <span class="preprocessor">#include "<a class="code" href="a02026.html">vtkFunctionSet.h</a>"</span> <a name="l00047"></a>00047 <span class="preprocessor">#include "<a class="code" href="a02127.html">vtkSmartPointer.h</a>"</span> <span class="comment">// this is allowed</span> <a name="l00048"></a>00048 <span class="comment">//BTX</span> <a name="l00049"></a>00049 <span class="preprocessor">#include <vtkstd/vector></span> <span class="comment">// we need them</span> <a name="l00050"></a>00050 <span class="comment">//ETX</span> <a name="l00051"></a>00051 <a name="l00052"></a>00052 <span class="keyword">class </span><a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a>; <a name="l00053"></a>00053 <span class="keyword">class </span><a class="code" href="a00356.html" title="abstract superclass for arrays of numeric data">vtkDataArray</a>; <a name="l00054"></a>00054 <span class="keyword">class </span><a class="code" href="a01242.html" title="represent and manipulate point attribute data">vtkPointData</a>; <a name="l00055"></a>00055 <span class="keyword">class </span><a class="code" href="a00582.html" title="provides thread-safe access to cells">vtkGenericCell</a>; <a name="l00056"></a>00056 <span class="keyword">class </span><a class="code" href="a00082.html" title="an abstract base class for locators which find cells">vtkAbstractCellLocator</a>; <a name="l00057"></a>00057 <span class="comment">//BTX</span> <a name="l00058"></a>00058 <span class="comment">//---------------------------------------------------------------------------</span> <a name="l00059"></a>00059 <span class="keyword">class </span><a class="code" href="a00031.html">IVFDataSetInfo</a>; <a name="l00060"></a>00060 <span class="comment">//---------------------------------------------------------------------------</span> <a name="l00061"></a><a class="code" href="a00030.html">00061</a> <span class="keyword">class </span><a class="code" href="a00030.html">IVFCacheList</a> : <span class="keyword">public</span> vtkstd::<a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2101033bb9cd45a86c85601c24cbbf2fa22">vector</a>< IVFDataSetInfo > {}; <a name="l00062"></a>00062 <span class="comment">//---------------------------------------------------------------------------</span> <a name="l00063"></a>00063 <span class="comment">//ETX</span> <a name="l00064"></a><a class="code" href="a00225.html">00064</a> <span class="keyword">class </span><a class="code" href="a02170.html#7438b32736749f34b46d66222305e60b">VTK_PARALLEL_EXPORT</a> <a class="code" href="a00225.html" title="Interface for obtaining interpolated velocity values.">vtkCachingInterpolatedVelocityField</a> : <span class="keyword">public</span> <a class="code" href="a00570.html" title="Abstract interface for sets of functions.">vtkFunctionSet</a> <a name="l00065"></a>00065 { <a name="l00066"></a>00066 <span class="keyword">public</span>: <a name="l00067"></a><a class="code" href="a00225.html#cf4f3c55b9ee8c4daba9cff7b357c54d">00067</a> vtkTypeRevisionMacro(<a class="code" href="a00225.html" title="Interface for obtaining interpolated velocity values.">vtkCachingInterpolatedVelocityField</a>,<a class="code" href="a00570.html" title="Abstract interface for sets of functions.">vtkFunctionSet</a>); <a name="l00068"></a>00068 <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="l00069"></a>00069 <a name="l00072"></a>00072 <span class="keyword">static</span> <a class="code" href="a00225.html" title="Interface for obtaining interpolated velocity values.">vtkCachingInterpolatedVelocityField</a> *<a class="code" href="a01084.html#4d5b227267c076d6f9e38483370b6612">New</a>(); <a name="l00073"></a>00073 <a name="l00075"></a>00075 <a name="l00077"></a>00077 <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>* f); <a name="l00078"></a>00078 <span class="keyword">virtual</span> <span class="keywordtype">int</span> InsideTest(<span class="keywordtype">double</span>* x); <a name="l00080"></a>00080 <a name="l00082"></a>00082 <span class="keyword">virtual</span> <span class="keywordtype">void</span> SetDataSet(<span class="keywordtype">int</span> I, <a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a>* dataset, <span class="keywordtype">bool</span> staticdataset, <a class="code" href="a00082.html" title="an abstract base class for locators which find cells">vtkAbstractCellLocator</a> *locator); <a name="l00083"></a>00083 <a name="l00085"></a>00085 <a name="l00088"></a>00088 vtkGetStringMacro(VectorsSelection); <a name="l00089"></a><a class="code" href="a00225.html#ee95af229ee8e5e3ce3f231252fd55b7">00089</a> <span class="keywordtype">void</span> SelectVectors(<span class="keyword">const</span> <span class="keywordtype">char</span> *fieldName) <a name="l00090"></a>00090 {this->SetVectorsSelection(fieldName);} <a name="l00092"></a>00092 <a name="l00094"></a>00094 <span class="keywordtype">void</span> SetLastCellInfo(<a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> c, <span class="keywordtype">int</span> datasetindex); <a name="l00095"></a>00095 <a name="l00098"></a>00098 <span class="keywordtype">void</span> ClearLastCellInfo(); <a name="l00099"></a>00099 <a name="l00101"></a>00101 <a name="l00104"></a>00104 <span class="keywordtype">int</span> GetLastWeights(<span class="keywordtype">double</span>* w); <a name="l00105"></a>00105 <span class="keywordtype">int</span> GetLastLocalCoordinates(<span class="keywordtype">double</span> pcoords[3]); <a name="l00107"></a>00107 <a name="l00109"></a>00109 <a name="l00110"></a>00110 vtkGetMacro(CellCacheHit, <span class="keywordtype">int</span>); <a name="l00111"></a>00111 vtkGetMacro(DataSetCacheHit, <span class="keywordtype">int</span>); <a name="l00112"></a>00112 vtkGetMacro(CacheMiss, <span class="keywordtype">int</span>); <a name="l00114"></a>00114 <a name="l00115"></a>00115 <span class="keyword">protected</span>: <a name="l00116"></a>00116 <a class="code" href="a00225.html" title="Interface for obtaining interpolated velocity values.">vtkCachingInterpolatedVelocityField</a>(); <a name="l00117"></a>00117 ~<a class="code" href="a00225.html" title="Interface for obtaining interpolated velocity values.">vtkCachingInterpolatedVelocityField</a>(); <a name="l00118"></a>00118 <a name="l00119"></a><a class="code" href="a00225.html#fe711d6eca1b5813bb6df85a00f4705b">00119</a> <a class="code" href="a00582.html" title="provides thread-safe access to cells">vtkGenericCell</a> *TempCell; <a name="l00120"></a><a class="code" href="a00225.html#769f220c925fc7cc4d13538bc6875d63">00120</a> <span class="keywordtype">int</span> CellCacheHit; <a name="l00121"></a><a class="code" href="a00225.html#f8cf992bd37cbc0036b282a76dd906aa">00121</a> <span class="keywordtype">int</span> DataSetCacheHit; <a name="l00122"></a><a class="code" href="a00225.html#c333ed370146032a309f26b669504003">00122</a> <span class="keywordtype">int</span> CacheMiss; <a name="l00123"></a><a class="code" href="a00225.html#2a5389c93685876d7eb81630ec874d79">00123</a> <span class="keywordtype">int</span> LastCacheIndex; <a name="l00124"></a><a class="code" href="a00225.html#b2c68c6c01ce4d8d65484aa93ce5cd48">00124</a> <span class="keywordtype">int</span> LastCellId; <a name="l00125"></a><a class="code" href="a00225.html#c1d629cfa1f15a39d24084c837f0821a">00125</a> <a class="code" href="a00031.html">IVFDataSetInfo</a> *Cache; <a name="l00126"></a><a class="code" href="a00225.html#47e071f40ed0439b18fd3a815c11265a">00126</a> <a class="code" href="a00030.html">IVFCacheList</a> CacheList; <a name="l00127"></a><a class="code" href="a00225.html#8b6cf7a90c6b04c3148c8d73b29552fa">00127</a> <span class="keywordtype">char</span> *VectorsSelection; <a name="l00128"></a>00128 <span class="comment">//BTX</span> <a name="l00129"></a><a class="code" href="a00225.html#2cdf393a2f96dec2e37df7108624f025">00129</a> vtkstd::vector<double> Weights; <a name="l00130"></a>00130 <span class="comment">//ETX</span> <a name="l00131"></a>00131 <a name="l00132"></a>00132 vtkSetStringMacro(VectorsSelection); <a name="l00133"></a>00133 <a name="l00134"></a>00134 <span class="comment">// private versions which work on the passed dataset/cache</span> <a name="l00135"></a>00135 <span class="comment">// these do the real computation</span> <a name="l00136"></a>00136 <span class="keywordtype">int</span> <a class="code" href="a00570.html#35b33633659aec5fa5eddac109af2d73">FunctionValues</a>(<a class="code" href="a00031.html">IVFDataSetInfo</a> *cache, <span class="keywordtype">double</span> *x, <span class="keywordtype">double</span> *f); <a name="l00137"></a>00137 <span class="keywordtype">int</span> InsideTest(<a class="code" href="a00031.html">IVFDataSetInfo</a> *cache, <span class="keywordtype">double</span>* x); <a name="l00138"></a>00138 <a name="l00139"></a>00139 <span class="comment">//BTX</span> <a name="l00140"></a><a class="code" href="a00225.html#15aa5a56e136182ef444902f2fc9dd6c">00140</a> <span class="keyword">friend</span> <span class="keyword">class </span><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 name="l00146"></a>00146 <span class="keywordtype">void</span> FastCompute(<a class="code" href="a00031.html">IVFDataSetInfo</a> *cache, <span class="keywordtype">double</span> f[3]); <a name="l00147"></a>00147 <span class="keywordtype">bool</span> <a class="code" href="a01672.html#64ac6a7cac216aa05d043b23a707a013">InterpolatePoint</a>(<a class="code" href="a01242.html" title="represent and manipulate point attribute data">vtkPointData</a> *outPD, <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> outIndex); <a name="l00148"></a>00148 <a class="code" href="a00582.html" title="provides thread-safe access to cells">vtkGenericCell</a> *GetLastCell(); <a name="l00150"></a>00150 <span class="comment">//ETX</span> <a name="l00151"></a>00151 <a name="l00152"></a>00152 <span class="keyword">private</span>: <a name="l00153"></a>00153 <a class="code" href="a00225.html" title="Interface for obtaining interpolated velocity values.">vtkCachingInterpolatedVelocityField</a>(<span class="keyword">const</span> <a class="code" href="a00225.html" title="Interface for obtaining interpolated velocity values.">vtkCachingInterpolatedVelocityField</a>&); <span class="comment">// Not implemented.</span> <a name="l00154"></a>00154 <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a00225.html" title="Interface for obtaining interpolated velocity values.">vtkCachingInterpolatedVelocityField</a>&); <span class="comment">// Not implemented.</span> <a name="l00155"></a>00155 }; <a name="l00156"></a>00156 <a name="l00157"></a>00157 <span class="comment">//---------------------------------------------------------------------------</span> <a name="l00158"></a>00158 <a name="l00160"></a>00160 <span class="comment">// IVFDataSetInfo</span> <a name="l00162"></a>00162 <span class="comment"></span><span class="preprocessor">#ifndef DOXYGEN_SHOULD_SKIP_THIS</span> <a name="l00163"></a>00163 <span class="preprocessor"></span><span class="comment">//</span> <a name="l00164"></a>00164 <span class="comment">//BTX</span> <a name="l00165"></a>00165 <span class="comment">//</span> <a name="l00166"></a><a class="code" href="a00031.html">00166</a> <span class="keyword">class </span><a class="code" href="a00031.html">IVFDataSetInfo</a> <a name="l00167"></a>00167 { <a name="l00168"></a>00168 <span class="keyword">public</span>: <a name="l00169"></a><a class="code" href="a00031.html#9334706a3cd239493f7cebc7e7d9cff4">00169</a> <a class="code" href="a01562.html" title="Hold a reference to a vtkObjectBase instance.">vtkSmartPointer<vtkDataSet></a> <a class="code" href="a00031.html#9334706a3cd239493f7cebc7e7d9cff4">DataSet</a>; <a name="l00170"></a><a class="code" href="a00031.html#c869c43957a59fa8f8c4a124fc38cd5e">00170</a> <a class="code" href="a01562.html" title="Hold a reference to a vtkObjectBase instance.">vtkSmartPointer<vtkAbstractCellLocator></a> <a class="code" href="a00031.html#c869c43957a59fa8f8c4a124fc38cd5e">BSPTree</a>; <a name="l00171"></a><a class="code" href="a00031.html#695314d6880899004824d19cc90ea19b">00171</a> <a class="code" href="a01562.html" title="Hold a reference to a vtkObjectBase instance.">vtkSmartPointer<vtkGenericCell></a> <a class="code" href="a00031.html#695314d6880899004824d19cc90ea19b">Cell</a>; <a name="l00172"></a><a class="code" href="a00031.html#13cbe472d90f856415ddb42b197eb1cc">00172</a> <span class="keywordtype">double</span> <a class="code" href="a00031.html#13cbe472d90f856415ddb42b197eb1cc">PCoords</a>[3]; <a name="l00173"></a><a class="code" href="a00031.html#5fb3fa70029a121c5d2f48532541a8b6">00173</a> <span class="keywordtype">float</span> *<a class="code" href="a00031.html#5fb3fa70029a121c5d2f48532541a8b6">VelocityFloat</a>; <a name="l00174"></a><a class="code" href="a00031.html#0baef18bca58c6f60d0ced93da47e125">00174</a> <span class="keywordtype">double</span> *<a class="code" href="a00031.html#0baef18bca58c6f60d0ced93da47e125">VelocityDouble</a>; <a name="l00175"></a><a class="code" href="a00031.html#f0487f6b85edba1c446712411493e0d8">00175</a> <span class="keywordtype">double</span> <a class="code" href="a00031.html#f0487f6b85edba1c446712411493e0d8">Tolerance</a>; <a name="l00176"></a><a class="code" href="a00031.html#2a250a9ff5ccbb5743b80910798fd620">00176</a> <span class="keywordtype">bool</span> <a class="code" href="a00031.html#2a250a9ff5ccbb5743b80910798fd620">StaticDataSet</a>; <a name="l00177"></a>00177 <a class="code" href="a00031.html#5b7aa66ebd7e5378d22fe638b33c9592">IVFDataSetInfo</a>(); <a name="l00178"></a>00178 <a class="code" href="a00031.html#5b7aa66ebd7e5378d22fe638b33c9592">IVFDataSetInfo</a>(<span class="keyword">const</span> <a class="code" href="a00031.html">IVFDataSetInfo</a> &ivfci); <a name="l00179"></a>00179 <a class="code" href="a00031.html">IVFDataSetInfo</a> &<a class="code" href="a00031.html#51cddfaf2d8b5fa4a01444bfee7a3672">operator=</a>(<span class="keyword">const</span> <a class="code" href="a00031.html">IVFDataSetInfo</a> &ivfci); <a name="l00180"></a>00180 <span class="keywordtype">void</span> <a class="code" href="a00031.html#8449e4851f1ef4ce4a7642a2b09bd35c">SetDataSet</a>(<a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a> *<a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210eb708a412c0730a6b5f3215b36474a1e">data</a>, <span class="keywordtype">char</span> *velocity, <span class="keywordtype">bool</span> staticdataset, <a class="code" href="a00082.html" title="an abstract base class for locators which find cells">vtkAbstractCellLocator</a> *locator); <a name="l00181"></a>00181 <span class="comment">//</span> <a name="l00182"></a><a class="code" href="a00031.html#9fb1143ba51aa9642ae46676f10c87be">00182</a> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">double</span> <a class="code" href="a00031.html#9fb1143ba51aa9642ae46676f10c87be">TOLERANCE_SCALE</a>; <a name="l00183"></a>00183 }; <a name="l00184"></a>00184 <a name="l00185"></a>00185 <span class="comment">//</span> <a name="l00186"></a>00186 <span class="comment">//ETX</span> <a name="l00187"></a>00187 <span class="comment">//</span> <a name="l00188"></a>00188 <a name="l00189"></a>00189 <span class="preprocessor">#endif </span><span class="comment">/* DOXYGEN_SHOULD_SKIP_THIS */</span> <a name="l00190"></a>00190 <a name="l00191"></a>00191 <span class="preprocessor">#endif</span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:42 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>