1 |
/* ASCEND modelling environment |
2 |
Copyright (C) 2007 Carnegie-Mellon University |
3 |
|
4 |
This program is free software; you can redistribute it and/or modify |
5 |
it under the terms of the GNU General Public License as published by |
6 |
the Free Software Foundation; either version 2 of the License, or |
7 |
(at your option) any later version. |
8 |
|
9 |
This program is distributed in the hope that it will be useful, |
10 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 |
GNU General Public License for more details. |
13 |
|
14 |
You should have received a copy of the GNU General Public License |
15 |
along with this program; if not, write to the Free Software |
16 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
17 |
*//** |
18 |
Implementation of the derivative chains data structures. |
19 |
|
20 |
This is a private header file to be used only by problem analysis modules. |
21 |
|
22 |
DO NOT include this file if you are implementing a new integration engine. |
23 |
*//** |
24 |
Split from system_impl.h by John Pye -- Jan 2007 |
25 |
*/ |
26 |
|
27 |
#include "system.h" |
28 |
|
29 |
|
30 |
/** |
31 |
Structure that holds a differential variable and the sequence of |
32 |
its derivatives as found explicity in the model. |
33 |
|
34 |
For example, |
35 |
- x, dx/dt |
36 |
*/ |
37 |
typedef struct SolverDiffVarSequenceStruct{ |
38 |
long ode_id; |
39 |
short n; |
40 |
struct var_variable **vars; /* will be in order of ascending ode_type, starting from 1 */ |
41 |
} SolverDiffVarSequence; |
42 |
|
43 |
/** |
44 |
Array of diff var sequences. Once generated, this will hold all of the |
45 |
This would hold all of the differential and derivative variables found |
46 |
in the system. For example, with each row being a SolverDiffVarSequence: |
47 |
- y, dy/dt, d2y/dt2 |
48 |
- x, dx/dt |
49 |
- z, dz/dt |
50 |
*/ |
51 |
struct SolverDiffVarCollectionStruct{ |
52 |
SolverDiffVarSequence *seqs; |
53 |
long nseqs; |
54 |
long nalg; |
55 |
long ndiff; |
56 |
struct var_variable **indep; |
57 |
long nindep; |
58 |
struct var_variable **obs; |
59 |
long nobs; |
60 |
long maxorder; |
61 |
}; |