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 "vtkCommonMathModule.h" // For export macro
35 #include "vtkObject.h"
36 
37 class vtkFunctionSet;
38 
40 {
41 public:
43  virtual void PrintSelf(ostream& os, vtkIndent indent);
44 
46 
60  virtual int ComputeNextStep(double* xprev, double* xnext, double t,
61  double& delT, double maxError,
62  double& error)
63  {
64  double minStep = delT;
65  double maxStep = delT;
66  double delTActual;
67  return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
68  minStep, maxStep, maxError, error);
69  }
70  virtual int ComputeNextStep(double* xprev, double* dxprev, double* xnext,
71  double t, double& delT, double maxError,
72  double& error)
73  {
74  double minStep = delT;
75  double maxStep = delT;
76  double delTActual;
77  return this->ComputeNextStep(xprev, dxprev, xnext, t, delT, delTActual,
78  minStep, maxStep, maxError, error);
79  }
80  virtual int ComputeNextStep(double* xprev, double* xnext,
81  double t, double& delT, double& delTActual,
82  double minStep, double maxStep,
83  double maxError, double& error)
84  {
85  return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
86  minStep, maxStep, maxError, error);
87  }
88  virtual int ComputeNextStep(double* xprev, double* dxprev, double* xnext,
89  double t, double& delT, double& delTActual,
90  double minStep, double maxStep,
91  double maxError, double& error) = 0;
93 
95 
96  virtual void SetFunctionSet(vtkFunctionSet* functionset);
97  vtkGetObjectMacro(FunctionSet,vtkFunctionSet);
99 
101  virtual int IsAdaptive() { return this->Adaptive; }
102 
103 //BTX
105  {
106  OUT_OF_DOMAIN = 1,
107  NOT_INITIALIZED = 2,
108  UNEXPECTED_VALUE = 3
109  };
110 //ETX
111 
112 protected:
115 
116  virtual void Initialize();
117 
119 
120  double* Vals;
121  double* Derivs;
123  int Adaptive;
124 
125 private:
127  void operator=(const vtkInitialValueProblemSolver&); // Not implemented.
128 };
129 
130 #endif
131 
132 
133 
134 
abstract base class for most VTK objects
Definition: vtkObject.h:61
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:38
virtual int ComputeNextStep(double *xprev, double *dxprev, double *xnext, double t, double &delT, double maxError, double &error)
Abstract interface for sets of functions.
#define VTKCOMMONMATH_EXPORT
Integrate a set of ordinary differential equations (initial value problem) in time.