/usr/include/vtk-6.3/vtkInitialValueProblemSolver.h is in libvtk6-dev 6.3.0+dfsg1-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkInitialValueProblemSolver.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkInitialValueProblemSolver - Integrate a set of ordinary
// differential equations (initial value problem) in time.
// .SECTION Description
// Given a vtkFunctionSet which returns dF_i(x_j, t)/dt given x_j and
// t, vtkInitialValueProblemSolver computes the value of F_i at t+deltat.
// .SECTION Warning
// vtkInitialValueProblemSolver and it's subclasses are not thread-safe.
// You should create a new integrator for each thread.
// .SECTION See Also
// vtkRungeKutta2 vtkRungeKutta4
#ifndef vtkInitialValueProblemSolver_h
#define vtkInitialValueProblemSolver_h
#include "vtkCommonMathModule.h" // For export macro
#include "vtkObject.h"
class vtkFunctionSet;
class VTKCOMMONMATH_EXPORT vtkInitialValueProblemSolver : public vtkObject
{
public:
vtkTypeMacro(vtkInitialValueProblemSolver,vtkObject);
virtual void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Given initial values, xprev , initial time, t and a requested time
// interval, delT calculate values of x at t+delTActual (xnext).
// For certain concrete sub-classes delTActual != delT. This occurs
// when the solver supports adaptive stepsize control. If this
// is the case, the solver tries to change to stepsize such that
// the (estimated) error of the integration is less than maxError.
// The solver will not set the stepsize smaller than minStep or
// larger than maxStep.
// Also note that delT is an in/out argument. Adaptive solvers
// will modify delT to reflect the best (estimated) size for the next
// integration step.
// An estimated value for the error is returned (by reference) in error.
// Note that only some concrete sub-classes support this. Otherwise,
// the error is set to 0.
// This method returns an error code representing the nature of
// the failure:
// OutOfDomain = 1,
// NotInitialized = 2,
// UnexpectedValue = 3
virtual int ComputeNextStep(double* xprev, double* xnext, double t,
double& delT, double maxError,
double& error)
{
double minStep = delT;
double maxStep = delT;
double delTActual;
return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
minStep, maxStep, maxError, error);
}
virtual int ComputeNextStep(double* xprev, double* dxprev, double* xnext,
double t, double& delT, double maxError,
double& error)
{
double minStep = delT;
double maxStep = delT;
double delTActual;
return this->ComputeNextStep(xprev, dxprev, xnext, t, delT, delTActual,
minStep, maxStep, maxError, error);
}
virtual int ComputeNextStep(double* xprev, double* xnext,
double t, double& delT, double& delTActual,
double minStep, double maxStep,
double maxError, double& error)
{
return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
minStep, maxStep, maxError, error);
}
virtual int ComputeNextStep(double* xprev, double* dxprev, double* xnext,
double t, double& delT, double& delTActual,
double minStep, double maxStep,
double maxError, double& error) = 0;
// Description:
// Set / get the dataset used for the implicit function evaluation.
virtual void SetFunctionSet(vtkFunctionSet* functionset);
vtkGetObjectMacro(FunctionSet,vtkFunctionSet);
// Description:
// Returns 1 if the solver uses adaptive stepsize control,
// 0 otherwise
virtual int IsAdaptive() { return this->Adaptive; }
//BTX
enum ErrorCodes
{
OUT_OF_DOMAIN = 1,
NOT_INITIALIZED = 2,
UNEXPECTED_VALUE = 3
};
//ETX
protected:
vtkInitialValueProblemSolver();
~vtkInitialValueProblemSolver();
virtual void Initialize();
vtkFunctionSet* FunctionSet;
double* Vals;
double* Derivs;
int Initialized;
int Adaptive;
private:
vtkInitialValueProblemSolver(const vtkInitialValueProblemSolver&); // Not implemented.
void operator=(const vtkInitialValueProblemSolver&); // Not implemented.
};
#endif
|