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