/[ascend]/branches/harry/solvers/ida/ida.h
ViewVC logotype

Contents of /branches/harry/solvers/ida/ida.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3054 - (show annotations) (download) (as text)
Mon Aug 10 06:44:32 2015 UTC (7 years, 3 months ago) by raymondj
File MIME type: text/x-chdr
File size: 2221 byte(s)
Fixed some errors, debugging process_events_and
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, see <http://www.gnu.org/licenses/>.
16 *//** @file
17 Include all needed functions from IDA. We place all the includes in this
18 single file because #include conventions have changed with successive
19 SUNDIALS releases.
20 */
21
22 /* SUNDIALS includes */
23 #ifndef ASC_WITH_IDA
24 # error "If you're building this file, you should have ASC_WITH_IDA"
25 #endif
26
27 /*
28 for cases where we don't have SUNDIALS_VERSION_MINOR defined, guess version 2.2
29 */
30 #ifndef SUNDIALS_VERSION_MINOR
31 # ifdef __GNUC__
32 # warning "GUESSING SUNDIALS VERSION 2.2"
33 # endif
34 # define SUNDIALS_VERSION_MINOR 2
35 #endif
36 #ifndef SUNDIALS_VERSION_MAJOR
37 # define SUNDIALS_VERSION_MAJOR 2
38 #endif
39
40 /* SUNDIALS 2.4.0 introduces new DlsMat in place of DenseMat */
41 #if SUNDIALS_VERSION_MAJOR==2 && SUNDIALS_VERSION_MINOR>=4
42 # define IDA_MTX_T DlsMat
43 # define IDADENSE_SUCCESS IDADLS_SUCCESS
44 # define IDADENSE_MEM_NULL IDADLS_MEM_NULL
45 # define IDADENSE_ILL_INPUT IDADLS_ILL_INPUT
46 # define IDADENSE_MEM_FAIL IDADLS_MEM_FAIL
47 #else
48 # define IDA_MTX_T DenseMat
49 #endif
50
51 #if SUNDIALS_VERSION_MAJOR==2 && SUNDIALS_VERSION_MINOR==2
52 # include <sundials/sundials_config.h>
53 # include <sundials/sundials_nvector.h>
54 # include <ida/ida_spgmr.h>
55 # include <nvector_serial.h>
56 #else
57 # include <sundials/sundials_config.h>
58 # include <nvector/nvector_serial.h>
59 # include <ida/ida.h>
60 #endif
61
62 #include <sundials/sundials_dense.h>
63 #include <ida/ida_spgmr.h>
64 #include <ida/ida_spbcgs.h>
65 #include <ida/ida_sptfqmr.h>
66 #include <ida/ida_dense.h>
67 #include <ida/ida_impl.h>
68
69 #ifndef IDA_SUCCESS
70 # error "Failed to include SUNDIALS IDA header file"
71 #endif
72

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