/[ascend]/trunk/base/generic/system/diffvars.h
ViewVC logotype

Contents of /trunk/base/generic/system/diffvars.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1509 - (show annotations) (download) (as text)
Wed Jun 27 13:08:47 2007 UTC (12 years, 4 months ago) by jpye
File MIME type: text/x-chdr
File size: 2972 byte(s)
Fixed external loading of integrators, at least on my system. Needs testing
with/without fortran, sundials, etc.
Changed little thing kn d1mach.c to make default behaviour correct on Linux.
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, or (at your option)
7 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., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA.
18 *//** @file
19 Derivative chains for ASCEND solver systems. This structure holds a
20 reorganised form of the solver lists as for example as follows:
21
22 VARS:
23 - y1
24 - y2 -> y2'
25 - y3
26 - y4 -> y4' -> y4''
27 INDEPS:
28 - t
29 - x
30 OBS:
31 - y2
32 - y4'
33
34 This structure will allow efficient construction of integration systems
35 without any need for the integration engine to 'talk to' the compiler.
36 It's important that the integration engine need not talk to the compiler,
37 as we want all this solver-side stuff to work with other 'problem providers'
38 one day off in the future.
39
40 Note that this stuff is living here in the *solver* and not the *integrator*
41 directory. This is because the integrator views the problem via a slv_system
42 structure; in that sense the integrator deals with the ASCEND API through
43 the solver API, although it interfaces back with the user through a different
44 API that includes sample timesteps, different reporter mechanisms, etc.
45 */
46
47 #ifndef ASC_DIFFVARS_H
48 #define ASC_DIFFVARS_H
49
50 #include <utilities/config.h>
51 #include "analyze.h"
52 #include "slv_client.h"
53 #include "system.h"
54
55 /** @addtogroup analyse Analyse
56 @{
57 */
58
59 struct SolverDiffVarCollectionStruct;
60 /**<
61 This is the structure that contains the 'derivative chains'. It's opaque
62 when viewed at this level (implementation is in system_impl.h)
63 */
64
65 typedef struct SolverDiffVarCollectionStruct SolverDiffVarCollection;
66 /**
67 ditto, @see SolverDiffVarCollectionStruct
68 */
69
70 /*------------------------------------------------------------------------------
71 Stuff for retrieving differential and derivative variables from the system
72 */
73
74 /**
75 Return the SolverDiffVarCollection for the system. You *don't* own the
76 returned list -- it belongs to the slv_system_t.
77 */
78 ASC_DLLSPEC SolverDiffVarCollection *system_get_diffvars(slv_system_t sys);
79
80 int system_diffvars_build(slv_system_t sys, struct problem_t *prob);
81
82 void system_diffvars_destroy(slv_system_t sys);
83 /**
84 Write contents of diffvars struct to stream fp
85 */
86 int system_diffvars_debug(slv_system_t sys,FILE *fp);
87
88
89 /**
90 Reorder the diffvars list to match the var_sindex values of the first
91 var in each chain.
92 */
93 int system_diffvars_sort(slv_system_t sys);
94
95 #endif

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22