VTK
vtkInitialValueProblemSolver.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkInitialValueProblemSolver.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
31 #ifndef __vtkInitialValueProblemSolver_h
32 #define __vtkInitialValueProblemSolver_h
33 
34 #include "vtkObject.h"
35 
36 class vtkFunctionSet;
37 
39 {
40 public:
42  virtual void PrintSelf(ostream& os, vtkIndent indent);
43 
45 
59  virtual int ComputeNextStep(double* xprev, double* xnext, double t,
60  double& delT, double maxError,
61  double& error)
62  {
63  double minStep = delT;
64  double maxStep = delT;
65  double delTActual;
66  return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
67  minStep, maxStep, maxError, error);
68  }
69  virtual int ComputeNextStep(double* xprev, double* dxprev, double* xnext,
70  double t, double& delT, double maxError,
71  double& error)
72  {
73  double minStep = delT;
74  double maxStep = delT;
75  double delTActual;
76  return this->ComputeNextStep(xprev, dxprev, xnext, t, delT, delTActual,
77  minStep, maxStep, maxError, error);
78  }
79  virtual int ComputeNextStep(double* xprev, double* xnext,
80  double t, double& delT, double& delTActual,
81  double minStep, double maxStep,
82  double maxError, double& error)
83  {
84  return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
85  minStep, maxStep, maxError, error);
86  }
87  virtual int ComputeNextStep(double* xprev, double* dxprev, double* xnext,
88  double t, double& delT, double& delTActual,
89  double minStep, double maxStep,
90  double maxError, double& error) = 0;
92 
94 
95  virtual void SetFunctionSet(vtkFunctionSet* functionset);
96  vtkGetObjectMacro(FunctionSet,vtkFunctionSet);
98 
100  virtual int IsAdaptive() { return this->Adaptive; }
101 
102 //BTX
104  {
105  OUT_OF_DOMAIN = 1,
106  NOT_INITIALIZED = 2,
107  UNEXPECTED_VALUE = 3
108  };
109 //ETX
110 
111 protected:
114 
115  virtual void Initialize();
116 
118 
119  double* Vals;
120  double* Derivs;
122  int Adaptive;
123 
124 private:
126  void operator=(const vtkInitialValueProblemSolver&); // Not implemented.
127 };
128 
129 #endif
130 
131 
132 
133 
abstract base class for most VTK objects
Definition: vtkObject.h:60
virtual int ComputeNextStep(double *xprev, double *xnext, double t, double &delT, double maxError, double &error)
virtual int ComputeNextStep(double *xprev, double *xnext, double t, double &delT, double &delTActual, double minStep, double maxStep, double maxError, double &error)
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:37
virtual int ComputeNextStep(double *xprev, double *dxprev, double *xnext, double t, double &delT, double maxError, double &error)
#define VTK_COMMON_EXPORT
Abstract interface for sets of functions.
Integrate a set of ordinary differential equations (initial value problem) in time.