<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>APBS: vgrid.h Source File</title> <link href="apbs.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.7.1 --> <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="modules.html"><span>Modules</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul> </div> <h1>vgrid.h</h1><a href="vgrid_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <a name="l00060"></a>00060 <span class="preprocessor">#ifndef _VGRID_H_</span> <a name="l00061"></a>00061 <span class="preprocessor"></span><span class="preprocessor">#define _VGRID_H_</span> <a name="l00062"></a>00062 <span class="preprocessor"></span> <a name="l00063"></a>00063 <span class="preprocessor">#include "maloc/maloc.h"</span> <a name="l00064"></a>00064 <span class="preprocessor">#include "<a class="code" href="vhal_8h.html" title="Contains generic macro definitions for APBS.">apbs/vhal.h</a>"</span> <a name="l00065"></a>00065 <span class="preprocessor">#include "<a class="code" href="vstring_8h.html" title="Contains declarations for class Vstring.">apbs/vstring.h</a>"</span> <a name="l00066"></a>00066 <a name="l00067"></a>00067 <a name="l00070"></a><a class="code" href="group__Vgrid.html#g4c341611ace904873aef1de20ce6296e">00070</a> <span class="preprocessor">#define VGRID_DIGITS 6</span> <a name="l00071"></a>00071 <span class="preprocessor"></span> <a name="l00077"></a><a class="code" href="structsVgrid.html">00077</a> <span class="keyword">struct </span><a class="code" href="structsVgrid.html" title="Electrostatic potential oracle for Cartesian mesh data.">sVgrid</a> { <a name="l00078"></a>00078 <a name="l00079"></a><a class="code" href="structsVgrid.html#4447c52ec7ab8254dad80b33ff2a4b96">00079</a> <span class="keywordtype">int</span> <a class="code" href="structsVgrid.html#4447c52ec7ab8254dad80b33ff2a4b96">nx</a>; <a name="l00080"></a><a class="code" href="structsVgrid.html#922ae55125b6be84d13d895a1dfc6d41">00080</a> <span class="keywordtype">int</span> <a class="code" href="structsVgrid.html#922ae55125b6be84d13d895a1dfc6d41">ny</a>; <a name="l00081"></a><a class="code" href="structsVgrid.html#e9b550ec3609d624333f57fc2ff120ea">00081</a> <span class="keywordtype">int</span> <a class="code" href="structsVgrid.html#e9b550ec3609d624333f57fc2ff120ea">nz</a>; <a name="l00082"></a><a class="code" href="structsVgrid.html#b1ad2a29c306b315b0b7cfabe9f1b495">00082</a> <span class="keywordtype">double</span> <a class="code" href="structsVgrid.html#b1ad2a29c306b315b0b7cfabe9f1b495">hx</a>; <a name="l00083"></a><a class="code" href="structsVgrid.html#77c3fd32dcd2af84776e693935c2d6f5">00083</a> <span class="keywordtype">double</span> <a class="code" href="structsVgrid.html#77c3fd32dcd2af84776e693935c2d6f5">hy</a>; <a name="l00084"></a><a class="code" href="structsVgrid.html#f325dfb7292513b8a2de9d87ba6e814a">00084</a> <span class="keywordtype">double</span> <a class="code" href="structsVgrid.html#f325dfb7292513b8a2de9d87ba6e814a">hzed</a>; <a name="l00085"></a><a class="code" href="structsVgrid.html#5e5f6b99106e33a8a564fd76f178687a">00085</a> <span class="keywordtype">double</span> <a class="code" href="structsVgrid.html#5e5f6b99106e33a8a564fd76f178687a">xmin</a>; <a name="l00086"></a><a class="code" href="structsVgrid.html#7305cd4d4966e298cd0b486905281553">00086</a> <span class="keywordtype">double</span> <a class="code" href="structsVgrid.html#7305cd4d4966e298cd0b486905281553">ymin</a>; <a name="l00087"></a><a class="code" href="structsVgrid.html#a730f1d06b88a80bd7980ba0498b1f35">00087</a> <span class="keywordtype">double</span> <a class="code" href="structsVgrid.html#a730f1d06b88a80bd7980ba0498b1f35">zmin</a>; <a name="l00088"></a><a class="code" href="structsVgrid.html#536bc89a898435c9b8e9fe45698f36cb">00088</a> <span class="keywordtype">double</span> <a class="code" href="structsVgrid.html#536bc89a898435c9b8e9fe45698f36cb">xmax</a>; <a name="l00089"></a><a class="code" href="structsVgrid.html#cea471a2e2687166d5cd39de4fa7e67f">00089</a> <span class="keywordtype">double</span> <a class="code" href="structsVgrid.html#cea471a2e2687166d5cd39de4fa7e67f">ymax</a>; <a name="l00090"></a><a class="code" href="structsVgrid.html#70a19fadaf64863f86bd89518717f1d2">00090</a> <span class="keywordtype">double</span> <a class="code" href="structsVgrid.html#70a19fadaf64863f86bd89518717f1d2">zmax</a>; <a name="l00091"></a><a class="code" href="structsVgrid.html#6fd94ef5c7fabebc200c3c775145b250">00091</a> <span class="keywordtype">double</span> *<a class="code" href="structsVgrid.html#6fd94ef5c7fabebc200c3c775145b250">data</a>; <a name="l00092"></a><a class="code" href="structsVgrid.html#5382424e1d0fd98538fabb341cb4db22">00092</a> <span class="keywordtype">int</span> <a class="code" href="structsVgrid.html#5382424e1d0fd98538fabb341cb4db22">readdata</a>; <a name="l00093"></a><a class="code" href="structsVgrid.html#ef6887c5611113e8daaa08bd01b01542">00093</a> <span class="keywordtype">int</span> <a class="code" href="structsVgrid.html#ef6887c5611113e8daaa08bd01b01542">ctordata</a>; <a name="l00095"></a><a class="code" href="structsVgrid.html#c0314eebdfd1ac98e97d25fd6b1d75d1">00095</a> Vmem *<a class="code" href="structsVgrid.html#c0314eebdfd1ac98e97d25fd6b1d75d1">mem</a>; <a name="l00096"></a>00096 }; <a name="l00097"></a>00097 <a name="l00102"></a><a class="code" href="group__Vgrid.html#g817a3b90f34af710224249e19f22f32e">00102</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structsVgrid.html" title="Electrostatic potential oracle for Cartesian mesh data.">sVgrid</a> <a class="code" href="structsVgrid.html" title="Electrostatic potential oracle for Cartesian mesh data.">Vgrid</a>; <a name="l00103"></a>00103 <a name="l00104"></a>00104 <span class="preprocessor">#if !defined(VINLINE_VGRID)</span> <a name="l00105"></a>00105 <span class="preprocessor"></span> <a name="l00113"></a>00113 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> <a class="code" href="group__Vgrid.html#gd01a63d4ec1ec2a24467e045926254ac" title="Return the memory used by this structure (and its contents) in bytes.">Vgrid_memChk</a>(<a class="code" href="structsVgrid.html" title="Electrostatic potential oracle for Cartesian mesh data.">Vgrid</a> *thee); <a name="l00114"></a>00114 <a name="l00115"></a>00115 <span class="preprocessor">#else </span><span class="comment">/* if defined(VINLINE_VGRID) */</span> <a name="l00116"></a>00116 <a name="l00124"></a>00124 <span class="preprocessor"># define Vgrid_memChk(thee) (Vmem_bytes((thee)->vmem))</span> <a name="l00125"></a>00125 <span class="preprocessor"></span> <a name="l00126"></a>00126 <span class="preprocessor">#endif </span><span class="comment">/* if !defined(VINLINE_VPMG) */</span> <a name="l00127"></a>00127 <a name="l00145"></a>00145 <a class="code" href="structsVgrid.html" title="Electrostatic potential oracle for Cartesian mesh data.">Vgrid</a>* <a class="code" href="group__Vgrid.html#g4b06bf864ec47b8e0d47dc9310c37f84" title="Construct Vgrid object with values obtained from Vpmg_readDX (for example).">Vgrid_ctor</a>(<span class="keywordtype">int</span> <a class="code" href="structsVgrid.html#4447c52ec7ab8254dad80b33ff2a4b96">nx</a>, <span class="keywordtype">int</span> <a class="code" href="structsVgrid.html#922ae55125b6be84d13d895a1dfc6d41">ny</a>, <span class="keywordtype">int</span> <a class="code" href="structsVgrid.html#e9b550ec3609d624333f57fc2ff120ea">nz</a>, <a name="l00146"></a>00146 <span class="keywordtype">double</span> <a class="code" href="structsVgrid.html#b1ad2a29c306b315b0b7cfabe9f1b495">hx</a>, <span class="keywordtype">double</span> <a class="code" href="structsVgrid.html#77c3fd32dcd2af84776e693935c2d6f5">hy</a>, <span class="keywordtype">double</span> <a class="code" href="structsVgrid.html#f325dfb7292513b8a2de9d87ba6e814a">hzed</a>, <a name="l00147"></a>00147 <span class="keywordtype">double</span> <a class="code" href="structsVgrid.html#5e5f6b99106e33a8a564fd76f178687a">xmin</a>, <span class="keywordtype">double</span> <a class="code" href="structsVgrid.html#7305cd4d4966e298cd0b486905281553">ymin</a>, <span class="keywordtype">double</span> <a class="code" href="structsVgrid.html#a730f1d06b88a80bd7980ba0498b1f35">zmin</a>, <a name="l00148"></a>00148 <span class="keywordtype">double</span> *<a class="code" href="structsVgrid.html#6fd94ef5c7fabebc200c3c775145b250">data</a>); <a name="l00149"></a>00149 <a name="l00168"></a>00168 <span class="keywordtype">int</span> <a class="code" href="group__Vgrid.html#g46488b8d8402d5e0161c52388666e11c" title="Initialize Vgrid object with values obtained from Vpmg_readDX (for example).">Vgrid_ctor2</a>(<a class="code" href="structsVgrid.html" title="Electrostatic potential oracle for Cartesian mesh data.">Vgrid</a> *thee, <span class="keywordtype">int</span> <a class="code" href="structsVgrid.html#4447c52ec7ab8254dad80b33ff2a4b96">nx</a>, <span class="keywordtype">int</span> <a class="code" href="structsVgrid.html#922ae55125b6be84d13d895a1dfc6d41">ny</a>, <span class="keywordtype">int</span> <a class="code" href="structsVgrid.html#e9b550ec3609d624333f57fc2ff120ea">nz</a>, <a name="l00169"></a>00169 <span class="keywordtype">double</span> <a class="code" href="structsVgrid.html#b1ad2a29c306b315b0b7cfabe9f1b495">hx</a>, <span class="keywordtype">double</span> <a class="code" href="structsVgrid.html#77c3fd32dcd2af84776e693935c2d6f5">hy</a>, <span class="keywordtype">double</span> <a class="code" href="structsVgrid.html#f325dfb7292513b8a2de9d87ba6e814a">hzed</a>, <a name="l00170"></a>00170 <span class="keywordtype">double</span> <a class="code" href="structsVgrid.html#5e5f6b99106e33a8a564fd76f178687a">xmin</a>, <span class="keywordtype">double</span> <a class="code" href="structsVgrid.html#7305cd4d4966e298cd0b486905281553">ymin</a>, <span class="keywordtype">double</span> <a class="code" href="structsVgrid.html#a730f1d06b88a80bd7980ba0498b1f35">zmin</a>, <a name="l00171"></a>00171 <span class="keywordtype">double</span> *<a class="code" href="structsVgrid.html#6fd94ef5c7fabebc200c3c775145b250">data</a>); <a name="l00172"></a>00172 <a name="l00181"></a>00181 <span class="keywordtype">int</span> <a class="code" href="group__Vgrid.html#g082b052479c1629216b691e788e91aac" title="Get potential value (from mesh or approximation) at a point.">Vgrid_value</a>(<a class="code" href="structsVgrid.html" title="Electrostatic potential oracle for Cartesian mesh data.">Vgrid</a> *thee, <span class="keywordtype">double</span> x[3], <span class="keywordtype">double</span> *value); <a name="l00182"></a>00182 <a name="l00188"></a>00188 <span class="keywordtype">void</span> <a class="code" href="group__Vgrid.html#g198520f697a55c26780ca9cf10a9e883" title="Object destructor.">Vgrid_dtor</a>(<a class="code" href="structsVgrid.html" title="Electrostatic potential oracle for Cartesian mesh data.">Vgrid</a> **thee); <a name="l00189"></a>00189 <a name="l00195"></a>00195 <span class="keywordtype">void</span> <a class="code" href="group__Vgrid.html#gc55529425a6c2751247e4097b6fabb73" title="FORTRAN stub object destructor.">Vgrid_dtor2</a>(<a class="code" href="structsVgrid.html" title="Electrostatic potential oracle for Cartesian mesh data.">Vgrid</a> *thee); <a name="l00196"></a>00196 <a name="l00210"></a>00210 <span class="keywordtype">int</span> <a class="code" href="group__Vgrid.html#ga2e339a0a1afd169cbdbbbd4071f402d" title="Get second derivative values at a point.">Vgrid_curvature</a>(<a class="code" href="structsVgrid.html" title="Electrostatic potential oracle for Cartesian mesh data.">Vgrid</a> *thee, <span class="keywordtype">double</span> pt[3], <span class="keywordtype">int</span> cflag, <a name="l00211"></a>00211 <span class="keywordtype">double</span> *curv); <a name="l00212"></a>00212 <a name="l00221"></a>00221 <span class="keywordtype">int</span> <a class="code" href="group__Vgrid.html#g01c5b30d3191de329996c53b6f5025db" title="Get first derivative values at a point.">Vgrid_gradient</a>(<a class="code" href="structsVgrid.html" title="Electrostatic potential oracle for Cartesian mesh data.">Vgrid</a> *thee, <span class="keywordtype">double</span> pt[3], <span class="keywordtype">double</span> grad[3] ); <a name="l00222"></a>00222 <a name="l00240"></a>00240 <span class="keywordtype">void</span> <a class="code" href="group__Vgrid.html#g7176f576cee0718dd9fc3055fd4fad53" title="Write out the data in UHBD grid format.">Vgrid_writeUHBD</a>(<a class="code" href="structsVgrid.html" title="Electrostatic potential oracle for Cartesian mesh data.">Vgrid</a> *thee, <span class="keyword">const</span> <span class="keywordtype">char</span> *iodev, <a name="l00241"></a>00241 <span class="keyword">const</span> <span class="keywordtype">char</span> *iofmt, <span class="keyword">const</span> <span class="keywordtype">char</span> *thost, <span class="keyword">const</span> <span class="keywordtype">char</span> *fname, <span class="keywordtype">char</span> *title, <a name="l00242"></a>00242 <span class="keywordtype">double</span> *pvec); <a name="l00243"></a>00243 <a name="l00258"></a>00258 <span class="keywordtype">void</span> <a class="code" href="group__Vgrid.html#g1a39f21a13643b52a0535edd95ee972a" title="Write out the data in OpenDX grid format.">Vgrid_writeDX</a>(<a class="code" href="structsVgrid.html" title="Electrostatic potential oracle for Cartesian mesh data.">Vgrid</a> *thee, <span class="keyword">const</span> <span class="keywordtype">char</span> *iodev, <a name="l00259"></a>00259 <span class="keyword">const</span> <span class="keywordtype">char</span> *iofmt, <span class="keyword">const</span> <span class="keywordtype">char</span> *thost, <span class="keyword">const</span> <span class="keywordtype">char</span> *fname, <span class="keywordtype">char</span> *title, <a name="l00260"></a>00260 <span class="keywordtype">double</span> *pvec); <a name="l00261"></a>00261 <a name="l00273"></a>00273 <span class="keywordtype">int</span> <a class="code" href="group__Vgrid.html#g11610c6cb000cc6196c003c697a6b9cc" title="Read in data in OpenDX grid format.">Vgrid_readDX</a>(<a class="code" href="structsVgrid.html" title="Electrostatic potential oracle for Cartesian mesh data.">Vgrid</a> *thee, <span class="keyword">const</span> <span class="keywordtype">char</span> *iodev, <span class="keyword">const</span> <span class="keywordtype">char</span> *iofmt, <a name="l00274"></a>00274 <span class="keyword">const</span> <span class="keywordtype">char</span> *thost, <span class="keyword">const</span> <span class="keywordtype">char</span> *fname); <a name="l00275"></a>00275 <a name="l00282"></a>00282 <span class="keywordtype">double</span> <a class="code" href="group__Vgrid.html#g01373009b74b87cd3d463b577a04856c" title="Get the integral of the data.">Vgrid_integrate</a>(<a class="code" href="structsVgrid.html" title="Electrostatic potential oracle for Cartesian mesh data.">Vgrid</a> *thee); <a name="l00283"></a>00283 <a name="l00292"></a>00292 <span class="keywordtype">double</span> <a class="code" href="group__Vgrid.html#gab8d7c2137815beba98ab833762e2ad5" title="Get the norm of the data. This returns the integral: .">Vgrid_normL1</a>(<a class="code" href="structsVgrid.html" title="Electrostatic potential oracle for Cartesian mesh data.">Vgrid</a> *thee); <a name="l00293"></a>00293 <a name="l00302"></a>00302 <span class="keywordtype">double</span> <a class="code" href="group__Vgrid.html#ga7b28573e866f35fc8b20bd78e22a7a0" title="Get the norm of the data. This returns the integral: .">Vgrid_normL2</a>(<a class="code" href="structsVgrid.html" title="Electrostatic potential oracle for Cartesian mesh data.">Vgrid</a> *thee); <a name="l00303"></a>00303 <a name="l00312"></a>00312 <span class="keywordtype">double</span> <a class="code" href="group__Vgrid.html#g0fa80031c82307103486b0a590d51b26" title="Get the norm of the data. This returns the integral: .">Vgrid_normLinf</a>(<a class="code" href="structsVgrid.html" title="Electrostatic potential oracle for Cartesian mesh data.">Vgrid</a> *thee); <a name="l00313"></a>00313 <a name="l00323"></a>00323 <span class="keywordtype">double</span> <a class="code" href="group__Vgrid.html#gfac72c068bd068efbda0eb47a3333b61" title="Get the semi-norm of the data. This returns the integral: .">Vgrid_seminormH1</a>(<a class="code" href="structsVgrid.html" title="Electrostatic potential oracle for Cartesian mesh data.">Vgrid</a> *thee); <a name="l00324"></a>00324 <a name="l00335"></a>00335 <span class="keywordtype">double</span> <a class="code" href="group__Vgrid.html#g2de44ed36601db9b6fe38333ef94b410" title="Get the norm (or energy norm) of the data. This returns the integral: .">Vgrid_normH1</a>(<a class="code" href="structsVgrid.html" title="Electrostatic potential oracle for Cartesian mesh data.">Vgrid</a> *thee); <a name="l00336"></a>00336 <a name="l00337"></a>00337 <span class="preprocessor">#endif</span> <a name="l00338"></a>00338 <span class="preprocessor"></span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 12 06:23:50 2009 for APBS by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.7.1 </small></address> </body> </html>