/[ascend]/trunk/base/generic/solver/SConscript
ViewVC logotype

Annotation of /trunk/base/generic/solver/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1012 - (hide annotations) (download)
Wed Jan 3 03:13:20 2007 UTC (15 years, 11 months ago) by johnpye
File size: 2258 byte(s)
Added idalinear.[ch], which will expose the linsolqr solver as a linear solver for IDA.
Modified ida.c to support this new linear solver under the name 'ASCEND'.
1 johnpye 669 Import('libascend_env')
2 johnpye 385
3 johnpye 463 csrcs = Split("""
4 johnpye 385
5     analyze.c bnd.c bndman.c calc.c cond_config.c
6 johnpye 783 conditional.c discrete.c incidence.c linsol.c
7 johnpye 385 linsolqr.c linutils.c logrel.c logrelman.c model_reorder.c
8     mps.c mtx_basic.c mtx_linal.c mtx_perms.c mtx_query.c
9     mtx_reorder.c mtx_use_only.c rel.c relman.c
10     slv.c slv0.c slv1.c slv2.c slv3.c slv6.c slv7.c
11     slv8.c slv9.c slv9a.c slvDOF.c slv_common.c
12     slv_interface.c slv_stdcalls.c system.c var.c
13    
14 johnpye 969 integrator.c lsode.c samplelist.c aww.c
15 johnpye 392 """)
16 johnpye 385
17 johnpye 669 solver_env = libascend_env.Copy()
18 johnpye 994 if solver_env.get('WITH_MMIO'):
19     solver_env.Append(CPPPATH=["#/mmio"])
20 johnpye 507
21 johnpye 392 defs = []
22 johnpye 669 for i in libascend_env.get('WITH_SOLVERS'):
23 johnpye 507 solver_env.Append(CPPDEFINES=["STATIC_"+i])
24 johnpye 392
25 johnpye 463 objs = []
26 johnpye 800
27     if solver_env.get('WITH_CONOPT'):
28     solver_env.AppendUnique(CPPPATH=[solver_env.get('CONOPT_CPPPATH')])
29    
30     if solver_env.get('LINKED_CONOPT'):
31     libascend_env.AppendUnique(
32     LIBPATH=[solver_env.get('CONOPT_LIBPATH')]
33     , LIBS=[solver_env.get('CONOPT_LIB')]
34     )
35    
36     objs += solver_env.SharedObject('conopt.c')
37 johnpye 832 # print "BUILDING CONOPT.OS"
38 johnpye 800
39 johnpye 463 for c in csrcs:
40 johnpye 507 objs += solver_env.SharedObject(c)
41 johnpye 669
42     if solver_env.get('WITH_IDA'):
43     sundials_env = solver_env.Copy()
44     sundials_env.Append(
45 johnpye 913 CPPPATH=[solver_env.get('IDA_CPPPATH')]
46     ,CPPDEFINES=[
47     'SUNDIALS_VERSION_MAJOR=$SUNDIALS_VERSION_MAJOR'
48     ,'SUNDIALS_VERSION_MINOR=$SUNDIALS_VERSION_MINOR'
49     ]
50 johnpye 669 )
51 johnpye 913
52 johnpye 669 if solver_env.get('IDA_CPPPATH_EXTRA'):
53 johnpye 743 sundials_env.AppendUnique(
54 johnpye 669 CPPPATH=solver_env.get('IDA_CPPPATH_EXTRA')
55     )
56    
57 johnpye 743 libascend_env.AppendUnique(
58 johnpye 783 LIBPATH=[solver_env.get('IDA_LIBPATH')]
59 johnpye 669 , LIBS=[solver_env.get('IDA_LIB')]
60     )
61    
62 johnpye 1012 idasrcs = ['ida.c','idalinear.c']
63     for s in idasrcs:
64     objs += sundials_env.SharedObject(s)
65 johnpye 669 else:
66 johnpye 832 pass
67     # print "NO IDA REQUESTED!"
68 johnpye 669
69     if 'LSOD' in solver_env.get('WITH_SOLVERS'):
70     if solver_env.get('F2C_LIBPATH'):
71     libascend_env.AppendUnique(LIBPATH=[solver_env.get('F2C_LIBPATH')])
72     if solver_env.get('F2C_LIB'):
73     libascend_env.AppendUnique(LIBS=[solver_env.get('F2C_LIB')])
74    
75 johnpye 721 #--------------------
76     # INSTALL
77    
78     import glob
79    
80     if libascend_env.get('CAN_INSTALL'):
81     installdir = libascend_env['INSTALL_ROOT']+libascend_env['INSTALL_INCLUDE']+'/solver'
82    
83     headers = glob.glob("*.h")
84     libascend_env.InstallHeader(installdir,headers)
85    
86 johnpye 463 Return('objs')
87 johnpye 811
88     # vim: set syntax=python:
89    

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