/[ascend]/trunk/solvers/ida/idacalc.h
ViewVC logotype

Contents of /trunk/solvers/ida/idacalc.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2369 - (show annotations) (download) (as text)
Mon Jan 31 09:00:44 2011 UTC (13 years, 4 months ago) by jpye
File MIME type: text/x-chdr
File size: 1735 byte(s)
Working to refactor ida.c, which is too big and scary.
1 /*
2 for cases where we don't have SUNDIALS_VERSION_MINOR defined, guess version 2.2
3 */
4 #ifndef SUNDIALS_VERSION_MINOR
5 # ifdef __GNUC__
6 # warning "GUESSING SUNDIALS VERSION 2.2"
7 # endif
8 # define SUNDIALS_VERSION_MINOR 2
9 #endif
10 #ifndef SUNDIALS_VERSION_MAJOR
11 # define SUNDIALS_VERSION_MAJOR 2
12 #endif
13
14 /* SUNDIALS 2.4.0 introduces new DlsMat in place of DenseMat */
15 #if SUNDIALS_VERSION_MAJOR==2 && SUNDIALS_VERSION_MINOR==4
16 # define IDA_MTX_T DlsMat
17 # define IDADENSE_SUCCESS IDADLS_SUCCESS
18 # define IDADENSE_MEM_NULL IDADLS_MEM_NULL
19 # define IDADENSE_ILL_INPUT IDADLS_ILL_INPUT
20 # define IDADENSE_MEM_FAIL IDADLS_MEM_FAIL
21 #else
22 # define IDA_MTX_T DenseMat
23 #endif
24
25
26 /* residual function forward declaration */
27 int integrator_ida_fex(realtype tt, N_Vector yy, N_Vector yp, N_Vector rr, void *res_data);
28
29 int integrator_ida_jvex(realtype tt, N_Vector yy, N_Vector yp, N_Vector rr
30 , N_Vector v, N_Vector Jv, realtype c_j
31 , void *jac_data, N_Vector tmp1, N_Vector tmp2
32 );
33
34 /* dense jacobian evaluation for IDADense dense direct linear solver */
35 #if SUNDIALS_VERSION_MAJOR==2 && SUNDIALS_VERSION_MINOR>=4
36 int integrator_ida_djex(int Neq, realtype tt, realtype c_j
37 , N_Vector yy, N_Vector yp, N_Vector rr
38 , IDA_MTX_T Jac, void *jac_data
39 , N_Vector tmp1, N_Vector tmp2, N_Vector tmp3
40 );
41 #else
42 int integrator_ida_djex(long int Neq, realtype tt
43 , N_Vector yy, N_Vector yp, N_Vector rr
44 , realtype c_j, void *jac_data, IDA_MTX_T Jac
45 , N_Vector tmp1, N_Vector tmp2, N_Vector tmp3
46 );
47 #endif
48
49 /* sparse jacobian evaluation for ASCEND's sparse direct solver */
50 IntegratorSparseJacFn integrator_ida_sjex;
51
52 /* boundary-detection function */
53 int integrator_ida_rootfn(realtype tt, N_Vector yy, N_Vector yp, realtype *gout, void *g_data);
54

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