Parent Directory | Revision Log

Revision **89** -
(**show annotations**)
(**download**)
(**as text**)

*Wed Dec 7 15:44:43 2005 UTC*
(14 years ago)
by *johnpye*

File MIME type: text/x-chdr

File size: 3440 byte(s)

File MIME type: text/x-chdr

File size: 3440 byte(s)

Small changes to eliminate GCC warnings

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 | |

33 | /** @file |

34 | * Root finding routine for the SLV solver. |

35 | * <pre> |

36 | * Requires: #include "utilities/ascConfig.h" |

37 | * |

38 | * #ifndef STAND_ALONE |

39 | * #include "extfunc.h" (for ExtValFunc()) |

40 | * #else |

41 | * #include "codegen_support.h" |

42 | * #endif |

43 | * </pre> |

44 | * @todo extfunc.h needed only for the definition of ExtEvalFunc - |

45 | * This definition should probably be moved to types.h. or compiler.h |

46 | * @todo codegen_support.h not in base/generic/solver - need to update include? |

47 | */ |

48 | |

49 | #ifndef ASC_SLV_ROOTFIND_H |

50 | #define ASC_SLV_ROOTFIND_H |

51 | |

52 | #ifndef STAND_ALONE |

53 | # error "DON'T INCLUDE THIS FILE UNLESS YOU'RE COMPILING STANDALONE SOLVER" |

54 | #endif |

55 | |

56 | extern double zbrent(ExtEvalFunc *func, |

57 | double *lowbound, |

58 | double *upbound, |

59 | int *mode, |

60 | int *m, |

61 | int *n, |

62 | double *x, |

63 | double *u, |

64 | double *f, |

65 | double *g, |

66 | double *tolerance, |

67 | int *status); |

68 | /**< |

69 | * Using Brents method, find the root of a function known to lie |

70 | * between x1 and x2. The root, returned as zbrent, will be refined |

71 | * until its accuracy is tol. The result of status must be monitored |

72 | * to see if we were successful. A nonzero code means that the result |

73 | * returned is erroneous. n is the index into the x vector of the variable |

74 | * that is to be solved for. |

75 | * @param func The evaluation function. |

76 | * @param lowbound Lower bound. |

77 | * @param upbound Upper bound. |

78 | * @param mode Passed to the eval func. |

79 | * @param m The relation index. |

80 | * @param n The variable index. |

81 | * @param x The x vector -- needed by eval func. |

82 | * @param u The u vector -- needed by eval func. |

83 | * @param f Vector of residuals. |

84 | * @param g Vector of gradients. |

85 | * @param tolerance Accuracy of solution. |

86 | * @param status Success or failure. |

87 | */ |

88 | |

89 | #endif /* rootfind_already_included */ |

90 | |

91 |

john.pye@anu.edu.au | ViewVC Help |

Powered by ViewVC 1.1.22 |