Parent Directory | Revision Log

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

*Thu Feb 3 06:02:36 2011 UTC*
(13 years, 4 months ago)
by *jpye*

File MIME type: text/x-chdr

File size: 2565 byte(s)

File MIME type: text/x-chdr

File size: 2565 byte(s)

minor text changes

1 | /* ASCEND modelling environment |

2 | Copyright (C) 2006-2011 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 | Analysis routines for the ASCEND wrapper of the IDA integrator. |

20 | These functions perform sorting of variables and relations and create |

21 | additional lists of variables as required for use by our ida.c code. |

22 | */ |

23 | |

24 | #ifndef ASC_IDAANALYSE_H |

25 | #define ASC_IDAANALYSE_H |

26 | |

27 | #include <ascend/integrator/integrator.h> |

28 | #include <ascend/system/var.h> |

29 | #include <ascend/system/rel.h> |

30 | |

31 | /** |

32 | The top-level analysis function, called by the Integrator API. |

33 | */ |

34 | IntegratorAnalyseFn integrator_ida_analyse; |

35 | |

36 | /** |

37 | Given a derivative variable, return the index of its corresponding differential |

38 | variable in the y vector (and equivalently the var_sindex of the diff var) |

39 | */ |

40 | int integrator_ida_diffindex(const IntegratorSystem *sys, const struct var_variable *deriv); |

41 | |

42 | /** |

43 | Same as integrator_ida_diffindex but returns -1 instead of aborting |

44 | */ |

45 | int integrator_ida_diffindex1(const IntegratorSystem *sys, const struct var_variable *deriv); |

46 | |

47 | /** |

48 | Filter that will match all our 'y' variables (and only those) |

49 | */ |

50 | const var_filter_t integrator_ida_filter_nonderiv; |

51 | |

52 | /* |

53 | Filter that will match all our 'ydot' variables (and only those) |

54 | */ |

55 | const var_filter_t integrator_ida_filter_deriv; |

56 | |

57 | /** |

58 | Some filters that will generally be useful for IDA systems. |

59 | |

60 | A var can be non-incident. If it *is* non incident and we're going to |

61 | keep it, it will have to have derivative that *is* incident, and that |

62 | meets the following filter. |

63 | |

64 | If it doesn't have a valid derivative (eg the derivative is fixed, or |

65 | the variable doesn't HAVE a derivative), we will mark the non-deriv |

66 | var non-ACTIVE, so anyway it will end up meeting this filter after we've |

67 | run integrator_ida_check_vars. |

68 | */ |

69 | extern const var_filter_t integrator_ida_nonderiv; |

70 | extern const var_filter_t integrator_ida_deriv; |

71 | extern const rel_filter_t integrator_ida_rel; |

72 | |

73 | #endif |

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

Powered by ViewVC 1.1.22 |