changa
3.5
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Friends
Macros
Groups
Pages
stiff.h
1
#ifndef STIFF_HINCLUDED
2
#define STIFF_HINCLUDED
3
6
typedef
struct
StiffContextStructure
{
7
double
epsmin;
/* relative accuracy criterion */
8
double
sqreps;
/* parameter to calculate initial timestep */
9
double
epscl;
/* 1/epsmin */
10
double
epsmax;
/* repeat timestep if correction is
11
greater than epsmax*epsmin*y(i) */
12
double
dtmin;
/* minimum timestep allowed */
13
int
itermax;
/* number of corrector iterations */
14
int
nv;
/* number of dependent variables */
15
double
*ymin;
/* minimum value for y */
16
double
*y0;
/* initial y for global timestep */
17
double
*y1;
/* predicted value */
18
double
*q;
/* scratch for creation rate */
19
double
*d;
/* scratch for destruction rate */
20
double
*rtau;
/* ratio of timestep to timescale */
21
double
*ys;
/* initial y for individual timesteps */
22
double
*qs;
/* initial production rate */
23
double
*rtaus;
/* initial rtau */
24
double
*scrarray;
25
void
*Data;
/* Pointer to fixed data used by derivs */
26
void (*derivs)(double,
const
double
[],
double
[],
double
[],
void
*Data);
27
}
STIFF
;
28
29
/*
30
* Integrator Step Headers
31
*/
32
33
STIFF
*StiffInit(
double
eps,
/* relative accuracy parameter */
34
int
nv,
/* number of dependent variables */
35
void
*Data,
/* pointer to extra data */
36
void
(*derivs)(
double
t,
const
double
yin[],
/* input */
37
double
yheat[],
/* heating or creation
38
rate */
39
double
ycool[],
/* cooling or
40
destruction rate */
41
void
*Data)
42
);
43
44
void
StiffFinalize(
STIFF
*s );
45
void
StiffStep(
STIFF
*s,
double
y[],
double
tstart,
double
htry) ;
46
void
StiffSetYMin(
STIFF
*s,
const
double
*ymin);
47
48
#ifndef TESTCHEMEQ
49
/*
50
* Root Finder Header
51
*/
52
53
double
RootFind(
double
(*func)(
void
*Data,
double
),
void
*Data,
54
double
x1,
double
x2,
double
tol);
55
56
#endif
57
#endif
58
StiffContextStructure
Context for stiff integration.
Definition:
stiff.h:6
Generated by
1.8.5