Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 60f1dc962abad0f3b492991a4fbef9be > files > 4898

vtk-doc-5.4.2-5mdv2010.0.noarch.rpm

<!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/IO/vtkCosmoReader.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&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;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/IO/vtkCosmoReader.h</h1><a href="a03106.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: vtkCosmoReader.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="l00015"></a>00015 <span class="comment">/*=========================================================================</span>
<a name="l00016"></a>00016 <span class="comment"></span>
<a name="l00017"></a>00017 <span class="comment">  Program:   VTK/ParaView Los Alamos National Laboratory Modules (PVLANL)</span>
<a name="l00018"></a>00018 <span class="comment">  Module:    $RCSfile: vtkCosmoReader.h,v $</span>
<a name="l00019"></a>00019 <span class="comment"></span>
<a name="l00020"></a>00020 <span class="comment">Copyright (c) 2007, Los Alamos National Security, LLC</span>
<a name="l00021"></a>00021 <span class="comment"></span>
<a name="l00022"></a>00022 <span class="comment">All rights reserved.</span>
<a name="l00023"></a>00023 <span class="comment"></span>
<a name="l00024"></a>00024 <span class="comment">Copyright 2007. Los Alamos National Security, LLC. </span>
<a name="l00025"></a>00025 <span class="comment">This software was produced under U.S. Government contract DE-AC52-06NA25396 </span>
<a name="l00026"></a>00026 <span class="comment">for Los Alamos National Laboratory (LANL), which is operated by </span>
<a name="l00027"></a>00027 <span class="comment">Los Alamos National Security, LLC for the U.S. Department of Energy. </span>
<a name="l00028"></a>00028 <span class="comment">The U.S. Government has rights to use, reproduce, and distribute this software. </span>
<a name="l00029"></a>00029 <span class="comment">NEITHER THE GOVERNMENT NOR LOS ALAMOS NATIONAL SECURITY, LLC MAKES ANY WARRANTY,</span>
<a name="l00030"></a>00030 <span class="comment">EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY FOR THE USE OF THIS SOFTWARE.  </span>
<a name="l00031"></a>00031 <span class="comment">If software is modified to produce derivative works, such modified software </span>
<a name="l00032"></a>00032 <span class="comment">should be clearly marked, so as not to confuse it with the version available </span>
<a name="l00033"></a>00033 <span class="comment">from LANL.</span>
<a name="l00034"></a>00034 <span class="comment"> </span>
<a name="l00035"></a>00035 <span class="comment">Additionally, redistribution and use in source and binary forms, with or </span>
<a name="l00036"></a>00036 <span class="comment">without modification, are permitted provided that the following conditions </span>
<a name="l00037"></a>00037 <span class="comment">are met:</span>
<a name="l00038"></a>00038 <span class="comment">-   Redistributions of source code must retain the above copyright notice, </span>
<a name="l00039"></a>00039 <span class="comment">    this list of conditions and the following disclaimer. </span>
<a name="l00040"></a>00040 <span class="comment">-   Redistributions in binary form must reproduce the above copyright notice,</span>
<a name="l00041"></a>00041 <span class="comment">    this list of conditions and the following disclaimer in the documentation</span>
<a name="l00042"></a>00042 <span class="comment">    and/or other materials provided with the distribution. </span>
<a name="l00043"></a>00043 <span class="comment">-   Neither the name of Los Alamos National Security, LLC, Los Alamos National</span>
<a name="l00044"></a>00044 <span class="comment">    Laboratory, LANL, the U.S. Government, nor the names of its contributors</span>
<a name="l00045"></a>00045 <span class="comment">    may be used to endorse or promote products derived from this software </span>
<a name="l00046"></a>00046 <span class="comment">    without specific prior written permission. </span>
<a name="l00047"></a>00047 <span class="comment"></span>
<a name="l00048"></a>00048 <span class="comment">THIS SOFTWARE IS PROVIDED BY LOS ALAMOS NATIONAL SECURITY, LLC AND CONTRIBUTORS</span>
<a name="l00049"></a>00049 <span class="comment">"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, </span>
<a name="l00050"></a>00050 <span class="comment">THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE </span>
<a name="l00051"></a>00051 <span class="comment">ARE DISCLAIMED. IN NO EVENT SHALL LOS ALAMOS NATIONAL SECURITY, LLC OR </span>
<a name="l00052"></a>00052 <span class="comment">CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, </span>
<a name="l00053"></a>00053 <span class="comment">EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, </span>
<a name="l00054"></a>00054 <span class="comment">PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; </span>
<a name="l00055"></a>00055 <span class="comment">OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, </span>
<a name="l00056"></a>00056 <span class="comment">WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR </span>
<a name="l00057"></a>00057 <span class="comment">OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF </span>
<a name="l00058"></a>00058 <span class="comment">ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span>
<a name="l00059"></a>00059 <span class="comment"></span>
<a name="l00060"></a>00060 <span class="comment">=========================================================================*/</span>
<a name="l00094"></a>00094 <span class="preprocessor">#ifndef __vtkCosmoReader_h</span>
<a name="l00095"></a>00095 <span class="preprocessor"></span><span class="preprocessor">#define __vtkCosmoReader_h</span>
<a name="l00096"></a>00096 <span class="preprocessor"></span>
<a name="l00097"></a>00097 <span class="preprocessor">#include "<a class="code" href="a02396.html">vtkUnstructuredGridAlgorithm.h</a>"</span>
<a name="l00098"></a>00098 
<a name="l00099"></a>00099 <span class="keyword">class </span><a class="code" href="a00359.html" title="Store on/off settings for data arrays for a vtkSource.">vtkDataArraySelection</a>;
<a name="l00100"></a>00100 <span class="keyword">class </span><a class="code" href="a01607.html" title="Wrapper around vtkstd::string to keep symbols short.">vtkStdString</a>;
<a name="l00101"></a>00101 
<a name="l00102"></a><a class="code" href="a00340.html">00102</a> <span class="keyword">class </span><a class="code" href="a02170.html#aab695c81fb47ab75c91e111e17cbe2c">VTK_IO_EXPORT</a> <a class="code" href="a00340.html" title="Read a binary cosmology data file.">vtkCosmoReader</a> : <span class="keyword">public</span> <a class="code" href="a01790.html" title="Superclass for algorithms that produce only unstructured grid as output.">vtkUnstructuredGridAlgorithm</a>
<a name="l00103"></a>00103 {
<a name="l00104"></a>00104 <span class="keyword">public</span>:
<a name="l00105"></a>00105   <span class="keyword">static</span> <a class="code" href="a00340.html" title="Read a binary cosmology data file.">vtkCosmoReader</a> *<a class="code" href="a01790.html#2646137e0d32c31ea2f5d6c36a839c5e">New</a>();
<a name="l00106"></a><a class="code" href="a00340.html#5ad2463070a3503d3568a263fea0406a">00106</a>   vtkTypeRevisionMacro(<a class="code" href="a00340.html" title="Read a binary cosmology data file.">vtkCosmoReader</a>, <a class="code" href="a01790.html" title="Superclass for algorithms that produce only unstructured grid as output.">vtkUnstructuredGridAlgorithm</a>);
<a name="l00107"></a>00107   <span class="keywordtype">void</span> <a class="code" href="a01790.html#13d193ef6fd94356f3306d3e799bc9cc">PrintSelf</a>(ostream&amp; os, <a class="code" href="a00869.html" title="a simple class to control print indentation">vtkIndent</a> indent);
<a name="l00108"></a>00108 
<a name="l00110"></a>00110 
<a name="l00111"></a>00111   vtkSetStringMacro(FileName);
<a name="l00112"></a>00112   vtkGetStringMacro(FileName);
<a name="l00114"></a>00114 
<a name="l00116"></a>00116 
<a name="l00117"></a>00117   vtkGetMacro(NumberOfNodes, <span class="keywordtype">int</span>);
<a name="l00119"></a>00119 
<a name="l00121"></a>00121 
<a name="l00122"></a>00122   vtkGetMacro(NumberOfVariables, <span class="keywordtype">int</span>);
<a name="l00124"></a>00124 
<a name="l00126"></a>00126 
<a name="l00127"></a>00127   <a class="code" href="a01789.html" title="dataset represents arbitrary combinations of all possible cell types">vtkUnstructuredGrid</a> *<a class="code" href="a01790.html#14fec752c193eaf96db64db2f29896d9">GetOutput</a>();
<a name="l00128"></a>00128   <a class="code" href="a01789.html" title="dataset represents arbitrary combinations of all possible cell types">vtkUnstructuredGrid</a> *<a class="code" href="a01790.html#14fec752c193eaf96db64db2f29896d9">GetOutput</a>(<span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210e519c5019582479480124c44722a451f">index</a>);
<a name="l00130"></a>00130 
<a name="l00132"></a>00132 
<a name="l00133"></a>00133   <span class="keywordtype">void</span> SetByteOrderToBigEndian();
<a name="l00134"></a>00134   <span class="keywordtype">void</span> SetByteOrderToLittleEndian();
<a name="l00135"></a>00135   vtkSetMacro(ByteOrder, <span class="keywordtype">int</span>);
<a name="l00136"></a>00136   vtkGetMacro(ByteOrder, <span class="keywordtype">int</span>);
<a name="l00138"></a>00138 
<a name="l00139"></a>00139   <span class="comment">// Set/Get the stride for reading a subset of the particles</span>
<a name="l00140"></a>00140   vtkSetMacro(Stride, <span class="keywordtype">int</span>);
<a name="l00141"></a>00141   vtkGetMacro(Stride, <span class="keywordtype">int</span>);
<a name="l00142"></a>00142 
<a name="l00143"></a>00143   <span class="comment">// Set/Get the box size for the simulation (range along x,y,z)</span>
<a name="l00144"></a>00144   <span class="comment">// Negative x,y,z values are subtracted from this for wraparound</span>
<a name="l00145"></a>00145   vtkSetMacro(BoxSize, <span class="keywordtype">double</span>);
<a name="l00146"></a>00146   vtkGetMacro(BoxSize, <span class="keywordtype">double</span>);
<a name="l00147"></a>00147 
<a name="l00149"></a>00149 
<a name="l00150"></a>00150   vtkSetVector2Macro(PositionRange, <span class="keywordtype">int</span>);
<a name="l00151"></a>00151   vtkGetVector2Macro(PositionRange, <span class="keywordtype">int</span>);
<a name="l00153"></a>00153 
<a name="l00155"></a>00155   <span class="keywordtype">void</span> ComputeDefaultRange();
<a name="l00156"></a>00156 
<a name="l00158"></a>00158 
<a name="l00161"></a>00161   <span class="keywordtype">int</span> GetNumberOfPointArrays();
<a name="l00162"></a>00162   <span class="keyword">const</span> <span class="keywordtype">char</span>* GetPointArrayName(<span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210e519c5019582479480124c44722a451f">index</a>);
<a name="l00163"></a>00163   <span class="keywordtype">int</span> GetPointArrayStatus(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>);
<a name="l00164"></a>00164   <span class="keywordtype">void</span> SetPointArrayStatus(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>, <span class="keywordtype">int</span> status);
<a name="l00165"></a>00165   <span class="keywordtype">void</span> DisableAllPointArrays();
<a name="l00166"></a>00166   <span class="keywordtype">void</span> EnableAllPointArrays();
<a name="l00168"></a>00168 
<a name="l00170"></a>00170 
<a name="l00172"></a>00172   vtkSetMacro(MakeCells, <span class="keywordtype">int</span>);
<a name="l00173"></a>00173   vtkGetMacro(MakeCells, <span class="keywordtype">int</span>);
<a name="l00175"></a>00175 
<a name="l00176"></a>00176 <span class="keyword">protected</span>:
<a name="l00177"></a>00177   <a class="code" href="a00340.html" title="Read a binary cosmology data file.">vtkCosmoReader</a>();
<a name="l00178"></a>00178   ~<a class="code" href="a00340.html" title="Read a binary cosmology data file.">vtkCosmoReader</a>();
<a name="l00179"></a>00179  
<a name="l00180"></a>00180   <span class="keywordtype">int</span> <a class="code" href="a01790.html#4748212ea9dbfdaf24fee1fd511dfaa2">RequestInformation</a>(<a class="code" href="a00872.html" title="Store vtkAlgorithm input/output information.">vtkInformation</a> *, 
<a name="l00181"></a>00181     <a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a> **, <a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a> *);
<a name="l00182"></a>00182   <span class="keywordtype">int</span> <a class="code" href="a01790.html#c245179e9e4f4d4f83bf29fd4933b985">RequestData</a>(<a class="code" href="a00872.html" title="Store vtkAlgorithm input/output information.">vtkInformation</a> *, 
<a name="l00183"></a>00183     <a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a> **, <a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a> *);
<a name="l00184"></a>00184 
<a name="l00185"></a><a class="code" href="a00340.html#53278f3db8b05d20fe0f575fc4c42467">00185</a>   <span class="keywordtype">char</span>* FileName; <span class="comment">// Name of binary particle file</span>
<a name="l00186"></a><a class="code" href="a00340.html#48351cbeb0217c1b1c06175be82caf45">00186</a>   ifstream *FileStream; <span class="comment">// Data stream</span>
<a name="l00187"></a>00187 
<a name="l00188"></a><a class="code" href="a00340.html#c270ab9f66d6469b504f8b987de6d58f">00188</a>   <span class="keywordtype">int</span> TotalRank; <span class="comment">// Number of processors reading data</span>
<a name="l00189"></a><a class="code" href="a00340.html#b7fda3838206ddcf6c6e3aa0d4a241db">00189</a>   <span class="keywordtype">int</span> Rank; <span class="comment">// Which processor is running</span>
<a name="l00190"></a>00190 
<a name="l00191"></a><a class="code" href="a00340.html#b249da126b6c26e6991784c1d28abb9f">00191</a>   <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> NumberOfNodes; <span class="comment">// Number of particles</span>
<a name="l00192"></a><a class="code" href="a00340.html#f6352d5c576f0bcb9c0892610925a995">00192</a>   <span class="keywordtype">int</span> NumberOfVariables; <span class="comment">// Number of attached data variables</span>
<a name="l00193"></a>00193 
<a name="l00194"></a><a class="code" href="a00340.html#d4ae99711708ab57550ff8d911c6aa46">00194</a>   <span class="keywordtype">int</span> ByteOrder; <span class="comment">// Endian</span>
<a name="l00195"></a><a class="code" href="a00340.html#d793df16099229dfd5cdec3aa0062ed5">00195</a>   <span class="keywordtype">int</span> Stride; <span class="comment">// Read in every nth data particle</span>
<a name="l00196"></a><a class="code" href="a00340.html#467ca4d8319f7e77a222cf169be65975">00196</a>   <span class="keywordtype">int</span> PositionRange[2]; <span class="comment">// Range of particle indices</span>
<a name="l00197"></a><a class="code" href="a00340.html#537ff4492de6b527b2b5482f73948081">00197</a>   <span class="keywordtype">double</span> BoxSize; <span class="comment">// Maximum of x,y,z locations from simulation</span>
<a name="l00198"></a>00198 
<a name="l00199"></a>00199   <span class="comment">// Selected field of interest</span>
<a name="l00200"></a><a class="code" href="a00340.html#c1d5ead12475f0cd8944965aa07c9c7f">00200</a>   <a class="code" href="a00359.html" title="Store on/off settings for data arrays for a vtkSource.">vtkDataArraySelection</a>* PointDataArraySelection;
<a name="l00201"></a>00201 
<a name="l00202"></a><a class="code" href="a00340.html#80a9c090d2101d4e409c1769f3579102">00202</a>   <a class="code" href="a01607.html" title="Wrapper around vtkstd::string to keep symbols short.">vtkStdString</a> *VariableName;
<a name="l00203"></a><a class="code" href="a00340.html#c08057b0ad574df60cf360cf7e2bfa97">00203</a>   <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> *ComponentNumber; <span class="comment">// Components per variable</span>
<a name="l00204"></a>00204 
<a name="l00205"></a><a class="code" href="a00340.html#4ceb7c54c34d6e18bcfa17ddf1e51a69">00205</a>   <span class="keywordtype">int</span> MakeCells;
<a name="l00206"></a>00206 
<a name="l00207"></a>00207 <span class="keyword">private</span>:
<a name="l00208"></a>00208   <a class="code" href="a00340.html" title="Read a binary cosmology data file.">vtkCosmoReader</a>(<span class="keyword">const</span> <a class="code" href="a00340.html" title="Read a binary cosmology data file.">vtkCosmoReader</a>&amp;);  <span class="comment">// Not implemented.</span>
<a name="l00209"></a>00209   <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a00340.html" title="Read a binary cosmology data file.">vtkCosmoReader</a>&amp;);  <span class="comment">// Not implemented.</span>
<a name="l00210"></a>00210 
<a name="l00211"></a>00211   <span class="keywordtype">void</span> ReadFile(<a class="code" href="a01789.html" title="dataset represents arbitrary combinations of all possible cell types">vtkUnstructuredGrid</a> *output);
<a name="l00212"></a>00212 };
<a name="l00213"></a>00213 
<a name="l00214"></a>00214 <span class="preprocessor">#endif</span>
<a name="l00215"></a>00215 <span class="preprocessor"></span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:39 2009 for VTK by&nbsp;
<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>