Sophie

Sophie

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

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/Common/vtkRungeKutta45.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/Common/vtkRungeKutta45.h</h1><a href="a02122.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: vtkRungeKutta45.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="l00037"></a>00037 <span class="preprocessor">#ifndef __vtkRungeKutta45_h</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">#define __vtkRungeKutta45_h</span>
<a name="l00039"></a>00039 <span class="preprocessor"></span>
<a name="l00040"></a>00040 <span class="preprocessor">#include "<a class="code" href="a02061.html">vtkInitialValueProblemSolver.h</a>"</span>
<a name="l00041"></a>00041 
<a name="l00042"></a><a class="code" href="a01508.html">00042</a> <span class="keyword">class </span><a class="code" href="a02170.html#873ca0b83d0838a1df577536068a1730">VTK_COMMON_EXPORT</a> <a class="code" href="a01508.html" title="Integrate an initial value problem using 5th order Runge-Kutta method with adaptive...">vtkRungeKutta45</a> : <span class="keyword">public</span> <a class="code" href="a00896.html" title="Integrate a set of ordinary differential equations (initial value problem) in time...">vtkInitialValueProblemSolver</a>
<a name="l00043"></a>00043 {
<a name="l00044"></a>00044 <span class="keyword">public</span>:
<a name="l00045"></a><a class="code" href="a01508.html#a453e6c82a5035c164f8c4a89d592f62">00045</a>   vtkTypeRevisionMacro(<a class="code" href="a01508.html" title="Integrate an initial value problem using 5th order Runge-Kutta method with adaptive...">vtkRungeKutta45</a>,<a class="code" href="a00896.html" title="Integrate a set of ordinary differential equations (initial value problem) in time...">vtkInitialValueProblemSolver</a>);
<a name="l00046"></a>00046   <span class="keywordtype">void</span> <a class="code" href="a00896.html#912bb660a8b123a17d2a03fecdd9f3e5">PrintSelf</a>(ostream&amp; os, <a class="code" href="a00869.html" title="a simple class to control print indentation">vtkIndent</a> indent);
<a name="l00047"></a>00047 
<a name="l00049"></a>00049   <span class="keyword">static</span> <a class="code" href="a01508.html" title="Integrate an initial value problem using 5th order Runge-Kutta method with adaptive...">vtkRungeKutta45</a> *<a class="code" href="a01084.html#4d5b227267c076d6f9e38483370b6612">New</a>();
<a name="l00050"></a>00050 
<a name="l00052"></a>00052 
<a name="l00067"></a><a class="code" href="a01508.html#d0b2aa358474f7acdb9e4a72b643de9f">00067</a>   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a00896.html#cc612bf025e902636510bc04ae83a168">ComputeNextStep</a>(<span class="keywordtype">double</span>* xprev, <span class="keywordtype">double</span>* xnext, <span class="keywordtype">double</span> t,
<a name="l00068"></a>00068                               <span class="keywordtype">double</span>&amp; delT, <span class="keywordtype">double</span> maxError, <span class="keywordtype">double</span>&amp; error) 
<a name="l00069"></a>00069     {
<a name="l00070"></a>00070       <span class="keywordtype">double</span> minStep = delT;
<a name="l00071"></a>00071       <span class="keywordtype">double</span> maxStep = delT;
<a name="l00072"></a>00072       <span class="keywordtype">double</span> delTActual;
<a name="l00073"></a>00073       <span class="keywordflow">return</span> this-&gt;<a class="code" href="a00896.html#cc612bf025e902636510bc04ae83a168">ComputeNextStep</a>(xprev, 0, xnext, t, delT, delTActual,
<a name="l00074"></a>00074                                    minStep, maxStep, maxError, error);
<a name="l00075"></a>00075     }
<a name="l00076"></a><a class="code" href="a01508.html#b58d895cc8f1806e8cf4a5a3acd52b15">00076</a>   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a00896.html#cc612bf025e902636510bc04ae83a168">ComputeNextStep</a>(<span class="keywordtype">double</span>* xprev, <span class="keywordtype">double</span>* dxprev, <span class="keywordtype">double</span>* xnext, 
<a name="l00077"></a>00077                               <span class="keywordtype">double</span> t, <span class="keywordtype">double</span>&amp; delT, 
<a name="l00078"></a>00078                               <span class="keywordtype">double</span> maxError, <span class="keywordtype">double</span>&amp; error)
<a name="l00079"></a>00079     {
<a name="l00080"></a>00080       <span class="keywordtype">double</span> minStep = delT;
<a name="l00081"></a>00081       <span class="keywordtype">double</span> maxStep = delT;
<a name="l00082"></a>00082       <span class="keywordtype">double</span> delTActual;
<a name="l00083"></a>00083       <span class="keywordflow">return</span> this-&gt;<a class="code" href="a00896.html#cc612bf025e902636510bc04ae83a168">ComputeNextStep</a>(xprev, dxprev, xnext, t, delT, delTActual,
<a name="l00084"></a>00084                                    minStep, maxStep, maxError, error);
<a name="l00085"></a>00085     }
<a name="l00086"></a><a class="code" href="a01508.html#c3a82d03d61728f57b5cdafd3c7c3aa0">00086</a>   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a00896.html#cc612bf025e902636510bc04ae83a168">ComputeNextStep</a>(<span class="keywordtype">double</span>* xprev, <span class="keywordtype">double</span>* xnext, 
<a name="l00087"></a>00087                               <span class="keywordtype">double</span> t, <span class="keywordtype">double</span>&amp; delT, <span class="keywordtype">double</span>&amp; delTActual,
<a name="l00088"></a>00088                               <span class="keywordtype">double</span> minStep, <span class="keywordtype">double</span> maxStep,
<a name="l00089"></a>00089                               <span class="keywordtype">double</span> maxError, <span class="keywordtype">double</span>&amp; error)
<a name="l00090"></a>00090     {
<a name="l00091"></a>00091       <span class="keywordflow">return</span> this-&gt;<a class="code" href="a00896.html#cc612bf025e902636510bc04ae83a168">ComputeNextStep</a>(xprev, 0, xnext, t, delT, delTActual,
<a name="l00092"></a>00092                                    minStep, maxStep, maxError, error);
<a name="l00093"></a>00093     }
<a name="l00094"></a>00094   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a00896.html#cc612bf025e902636510bc04ae83a168">ComputeNextStep</a>(<span class="keywordtype">double</span>* xprev, <span class="keywordtype">double</span>* dxprev, <span class="keywordtype">double</span>* xnext, 
<a name="l00095"></a>00095                               <span class="keywordtype">double</span> t, <span class="keywordtype">double</span>&amp; delT, <span class="keywordtype">double</span>&amp; delTActual,
<a name="l00096"></a>00096                               <span class="keywordtype">double</span> minStep, <span class="keywordtype">double</span> maxStep, 
<a name="l00097"></a>00097                               <span class="keywordtype">double</span> maxError, <span class="keywordtype">double</span>&amp; error);
<a name="l00099"></a>00099 
<a name="l00100"></a>00100 <span class="keyword">protected</span>:
<a name="l00101"></a>00101   <a class="code" href="a01508.html" title="Integrate an initial value problem using 5th order Runge-Kutta method with adaptive...">vtkRungeKutta45</a>();
<a name="l00102"></a>00102   ~<a class="code" href="a01508.html" title="Integrate an initial value problem using 5th order Runge-Kutta method with adaptive...">vtkRungeKutta45</a>();
<a name="l00103"></a>00103 
<a name="l00104"></a>00104   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00896.html#2c253895c597dfe4f64ae58c267649a6">Initialize</a>();
<a name="l00105"></a>00105 
<a name="l00106"></a>00106   <span class="comment">// Cash-Karp parameters</span>
<a name="l00107"></a><a class="code" href="a01508.html#0e84edc32cde913c01c247005668da6f">00107</a>   <span class="keyword">static</span> <span class="keywordtype">double</span> A[5];
<a name="l00108"></a><a class="code" href="a01508.html#87a001cac8cf7275c13432ac84fc8688">00108</a>   <span class="keyword">static</span> <span class="keywordtype">double</span> B[5][5];
<a name="l00109"></a><a class="code" href="a01508.html#bf0fa4c5aac134b4f4a8e1facc8be6b6">00109</a>   <span class="keyword">static</span> <span class="keywordtype">double</span> C[6];
<a name="l00110"></a><a class="code" href="a01508.html#e129035438e146e61a3eb8459e3a8d02">00110</a>   <span class="keyword">static</span> <span class="keywordtype">double</span> DC[6];
<a name="l00111"></a>00111 
<a name="l00112"></a><a class="code" href="a01508.html#1d3251d6f2a41cda84a59847e30af535">00112</a>   <span class="keywordtype">double</span>* NextDerivs[6];
<a name="l00113"></a>00113 
<a name="l00114"></a>00114   <span class="keywordtype">int</span> ComputeAStep(<span class="keywordtype">double</span>* xprev, <span class="keywordtype">double</span>* dxprev, <span class="keywordtype">double</span>* xnext, <span class="keywordtype">double</span> t, 
<a name="l00115"></a>00115                    <span class="keywordtype">double</span>&amp; delT,  <span class="keywordtype">double</span>&amp; error);
<a name="l00116"></a>00116 
<a name="l00117"></a>00117 <span class="keyword">private</span>:
<a name="l00118"></a>00118   <a class="code" href="a01508.html" title="Integrate an initial value problem using 5th order Runge-Kutta method with adaptive...">vtkRungeKutta45</a>(<span class="keyword">const</span> <a class="code" href="a01508.html" title="Integrate an initial value problem using 5th order Runge-Kutta method with adaptive...">vtkRungeKutta45</a>&amp;);  <span class="comment">// Not implemented.</span>
<a name="l00119"></a>00119   <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a01508.html" title="Integrate an initial value problem using 5th order Runge-Kutta method with adaptive...">vtkRungeKutta45</a>&amp;);  <span class="comment">// Not implemented.</span>
<a name="l00120"></a>00120 };
<a name="l00121"></a>00121 
<a name="l00122"></a>00122 <span class="preprocessor">#endif</span>
<a name="l00123"></a>00123 <span class="preprocessor"></span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:12 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>