1 |
aw0a |
1 |
/* |
2 |
|
|
* SLV: Ascend Nonlinear Solver |
3 |
|
|
* by Benjamin Andrew Allan |
4 |
|
|
* Created: 6/1/96 |
5 |
|
|
* Version: $Revision: 1.4 $ |
6 |
|
|
* Version control file: $RCSfile: slv_types.h,v $ |
7 |
|
|
* Date last modified: $Date: 1997/07/18 12:17:21 $ |
8 |
|
|
* Last modified by: $Author: mthomas $ |
9 |
|
|
* |
10 |
|
|
* This file is part of the SLV solver. |
11 |
|
|
* |
12 |
|
|
* Copyright (C) 1996 Benjamin Andrew Allan |
13 |
|
|
* |
14 |
|
|
* The SLV solver is free software; you can redistribute |
15 |
|
|
* it and/or modify it under the terms of the GNU General Public License as |
16 |
|
|
* published by the Free Software Foundation; either version 2 of the |
17 |
|
|
* License, or (at your option) any later version. |
18 |
|
|
* |
19 |
|
|
* The SLV solver is distributed in hope that it will be |
20 |
|
|
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of |
21 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
22 |
|
|
* General Public License for more details. |
23 |
|
|
* |
24 |
|
|
* You should have received a copy of the GNU General Public License along with |
25 |
|
|
* the program; if not, write to the Free Software Foundation, Inc., 675 |
26 |
|
|
* Mass Ave, Cambridge, MA 02139 USA. Check the file named COPYING. |
27 |
|
|
* COPYING is found in ../compiler. |
28 |
|
|
*/ |
29 |
|
|
|
30 |
|
|
/*********************************************************************\ |
31 |
|
|
SLV type definition for ASCEND solvers |
32 |
|
|
Version: $Revision: 1.4 $ |
33 |
|
|
Date last modified: $Date: 1997/07/18 12:17:21 $ |
34 |
|
|
|
35 |
|
|
Copyright(C) Benjamin Andrew Allan 1996 |
36 |
|
|
|
37 |
|
|
\***************************************************************************/ |
38 |
|
|
|
39 |
|
|
/*************************************************************************** |
40 |
|
|
*** Contents: Solver type definitions. |
41 |
|
|
*** |
42 |
|
|
*** Authors: Ben Allan |
43 |
|
|
*** |
44 |
|
|
*** Dates: 06/96 - original version |
45 |
|
|
*** Description: The types we want system and slv to share are here. |
46 |
|
|
***************************************************************************/ |
47 |
|
|
|
48 |
|
|
#ifndef slv_types__already_included |
49 |
|
|
#define slv_types__already_included |
50 |
|
|
|
51 |
|
|
typedef void *SlvBackendToken; |
52 |
|
|
/** |
53 |
|
|
*** Backends that provide the residuals, gradients, and so forth |
54 |
|
|
*** may be object-oriented and associate some sort of pointer |
55 |
|
|
*** with each of the variables or relations they are serving up. |
56 |
|
|
*** In the case of ASCEND, this is a struct Instance *. |
57 |
|
|
*** Since we want the Slv interface to appear totally backend |
58 |
|
|
*** independent (in particular because it is convenient), we |
59 |
|
|
*** define our interface in terms of SlvBackendTokens. |
60 |
|
|
*** Any backend can be connected by an appropriate set of |
61 |
|
|
*** routines conforming to the headers of slv_*, rel.h, var.h |
62 |
|
|
*** and system.h. |
63 |
|
|
*** |
64 |
|
|
*** We haven't yet been able to think through the possibilities of |
65 |
|
|
*** having multiple backends operating _simultaneously_, mainly |
66 |
|
|
*** because the ASCEND backend is quite capable of wrapping all |
67 |
|
|
*** the other backends we can think of. |
68 |
|
|
**/ |
69 |
|
|
|
70 |
|
|
typedef struct slv_system_structure *slv_system_t; |
71 |
|
|
/** |
72 |
|
|
*** This is the handle which should be used in all of the functions |
73 |
|
|
*** in slv and system to reference a mathematical problem. |
74 |
|
|
**/ |
75 |
|
|
#endif /* slv_types__already_included */ |