Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dox/Common/vtkInitialValueProblemSolver.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkInitialValueProblemSolver.h,v $ 00005 Language: C++ 00006 00007 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 00008 All rights reserved. 00009 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00010 00011 This software is distributed WITHOUT ANY WARRANTY; without even 00012 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 PURPOSE. See the above copyright notice for more information. 00014 00015 =========================================================================*/ 00035 #ifndef __vtkInitialValueProblemSolver_h 00036 #define __vtkInitialValueProblemSolver_h 00037 00038 #include "vtkObject.h" 00039 00040 class vtkFunctionSet; 00041 00042 class VTK_COMMON_EXPORT vtkInitialValueProblemSolver : public vtkObject 00043 { 00044 public: 00045 vtkTypeRevisionMacro(vtkInitialValueProblemSolver,vtkObject); 00046 virtual void PrintSelf(ostream& os, vtkIndent indent); 00047 00049 00063 virtual int ComputeNextStep(float* xprev, float* xnext, float t, 00064 float& delT, float maxError, 00065 float& error) 00066 { 00067 float minStep = delT; 00068 float maxStep = delT; 00069 float delTActual; 00070 return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual, 00071 minStep, maxStep, maxError, error); 00072 } 00073 virtual int ComputeNextStep(float* xprev, float* dxprev, float* xnext, 00074 float t, float& delT, float maxError, 00075 float& error) 00076 { 00077 float minStep = delT; 00078 float maxStep = delT; 00079 float delTActual; 00080 return this->ComputeNextStep(xprev, dxprev, xnext, t, delT, delTActual, 00081 minStep, maxStep, maxError, error); 00082 } 00083 virtual int ComputeNextStep(float* xprev, float* xnext, 00084 float t, float& delT, float& delTActual, 00085 float minStep, float maxStep, 00086 float maxError, float& error) 00087 { 00088 return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual, 00089 minStep, maxStep, maxError, error); 00090 } 00091 virtual int ComputeNextStep(float* xprev, float* dxprev, float* xnext, 00092 float t, float& delT, float& delTActual, 00093 float minStep, float maxStep, 00094 float maxError, float& error) = 0; 00096 00098 00099 virtual void SetFunctionSet(vtkFunctionSet* functionset); 00100 vtkGetObjectMacro(FunctionSet,vtkFunctionSet); 00102 00104 virtual int IsAdaptive() { return this->Adaptive; } 00105 00106 //BTX 00107 enum ErrorCodes 00108 { 00109 OUT_OF_DOMAIN = 1, 00110 NOT_INITIALIZED = 2, 00111 UNEXPECTED_VALUE = 3 00112 }; 00113 //ETX 00114 00115 protected: 00116 vtkInitialValueProblemSolver(); 00117 ~vtkInitialValueProblemSolver(); 00118 00119 virtual void Initialize(); 00120 00121 vtkFunctionSet* FunctionSet; 00122 00123 float* Vals; 00124 float* Derivs; 00125 int Initialized; 00126 int Adaptive; 00127 00128 private: 00129 vtkInitialValueProblemSolver(const vtkInitialValueProblemSolver&); // Not implemented. 00130 void operator=(const vtkInitialValueProblemSolver&); // Not implemented. 00131 }; 00132 00133 #endif 00134 00135 00136 00137