/[ascend]/trunk/base/generic/solver/rootfind.h
ViewVC logotype

Contents of /trunk/base/generic/solver/rootfind.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 53 - (show annotations) (download) (as text)
Fri Jul 1 15:06:17 2005 UTC (15 years, 3 months ago) by ben.allan
File MIME type: text/x-chdr
File size: 2804 byte(s)
made solver/rootfind.h fatal in case any one uses it.
1 #error solver_rootfind_h_seen.
2 /**<
3 * SLV: Ascend Nonlinear Solver
4 * by Kirk Andre' Abbott
5 * Created: 10/06/95
6 * Version: $Revision: 1.3 $
7 * Version control file: $RCSfile: rootfind.h,v $
8 * Date last modified: $Date: 1997/07/18 12:15:38 $
9 * Last modified by: $Author: mthomas $
10 *
11 * This file is part of the SLV solver.
12 *
13 * Copyright (C) 1990 Karl Michael Westerberg
14 * Copyright (C) 1993 Joseph Zaher
15 * Copyright (C) 1994 Joseph Zaher, Benjamin Andrew Allan
16 *
17 * The SLV solver is free software; you can redistribute
18 * it and/or modify it under the terms of the GNU General Public License as
19 * published by the Free Software Foundation; either version 2 of the
20 * License, or (at your option) any later version.
21 *
22 * The SLV solver is distributed in hope that it will be
23 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * General Public License for more details.
26 *
27 * You should have received a copy of the GNU General Public License along with
28 * the program; if not, write to the Free Software Foundation, Inc., 675
29 * Mass Ave, Cambridge, MA 02139 USA. Check the file named COPYING.
30 * COPYING is found in ../compiler.
31 */
32 #ifndef rootfind_already_included
33 #define rootfind_already_included
34
35 #ifndef STAND_ALONE
36 /**< requires #include "extfunc.h"
37 * needed only for the definition of
38 * ExtEvalFunc. This definition should probably
39 * be moved to types.h. or compiler.h */
40 #else
41 /**< requires #include "codegen_support.h" */
42 #endif /**< STAND_ALONE */
43
44
45 extern double zbrent(ExtEvalFunc *func, /**< the evaluation function */
46 double *lowbound, /**< low bound */
47 double *upbound, /**< up bound */
48 int *mode, /**< to pass to the eval func */
49 int *m, /**< the relation index */
50 int *n, /**< the variable index */
51 double *x, /**< the x vector -- needed by eval func */
52 double *u, /**< the u vector -- needed by eval func */
53 double *f, /**< vector of residuals */
54 double *g, /**< vector of gradients */
55 double *tolerance, /**< accuracy of solution */
56 int *status); /**< success or failure */
57 /*********************************************************************\
58 Using Brents method, find the root of a function known to lie
59 between x1 and x2. The root, returned as zbrent, will be refined
60 until its accuracy is tol. The result of status must be monitored
61 to see if we were successful. A nonzero code means that the result
62 returned is erroneous. n is the index into the x vector of the variable
63 that is to be solved for.
64 \*********************************************************************/
65
66 #endif /**< rootfind_already_included */
67
68
69
70

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