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

Contents of /trunk/base/generic/solver/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1128 - (show annotations) (download)
Sat Jan 13 08:33:43 2007 UTC (15 years, 5 months ago) by johnpye
File size: 2394 byte(s)
Migrated dense matrix functions out of lsode.c and into a new file.
Added Matrix Market format dense matrix output function in densemtx.c.
1 Import('libascend_env')
2
3 csrcs = Split("""
4
5 analyze.c bnd.c bndman.c calc.c cond_config.c
6 conditional.c densemtx.c discrete.c incidence.c linsol.c
7 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 mtx_vector.c
10 rel.c relman.c
11 slv.c slv0.c slv1.c slv2.c slv3.c slv6.c slv7.c
12 slv8.c slv9.c slv9a.c slvDOF.c slv_common.c
13 slv_interface.c slv_stdcalls.c system.c var.c
14
15 integrator.c lsode.c samplelist.c aww.c
16 """)
17
18 solver_env = libascend_env.Copy()
19 if solver_env.get('WITH_MMIO'):
20 solver_env.Append(CPPPATH=["#/mmio"])
21
22 defs = []
23 for i in libascend_env.get('WITH_SOLVERS'):
24 solver_env.Append(CPPDEFINES=["STATIC_"+i])
25
26 objs = []
27
28 if solver_env.get('WITH_CONOPT'):
29 solver_env.AppendUnique(CPPPATH=[solver_env.get('CONOPT_CPPPATH')])
30
31 if solver_env.get('LINKED_CONOPT'):
32 libascend_env.AppendUnique(
33 LIBPATH=[solver_env.get('CONOPT_LIBPATH')]
34 , LIBS=[solver_env.get('CONOPT_LIB')]
35 )
36
37 objs += solver_env.SharedObject('conopt.c')
38 # print "BUILDING CONOPT.OS"
39
40 for c in csrcs:
41 objs += solver_env.SharedObject(c)
42
43 if solver_env.get('WITH_IDA'):
44 sundials_env = solver_env.Copy()
45 sundials_env.Append(
46 CPPPATH=[solver_env.get('IDA_CPPPATH')]
47 ,CPPDEFINES=[('SUNDIALS_VERSION_MAJOR',"$SUNDIALS_VERSION_MAJOR")
48 ,('SUNDIALS_VERSION_MINOR',"$SUNDIALS_VERSION_MINOR")
49 ]
50 )
51
52 if solver_env.get('IDA_CPPPATH_EXTRA'):
53 sundials_env.AppendUnique(
54 CPPPATH=solver_env.get('IDA_CPPPATH_EXTRA')
55 )
56
57 if solver_env.get('IDA_NEW_ANALYSE'):
58 sundials_env.AppendUnique(
59 CPPDEFINES=['IDA_NEW_ANALYSE']
60 )
61
62 libascend_env.AppendUnique(
63 LIBPATH=[solver_env.get('IDA_LIBPATH')]
64 , LIBS=[solver_env.get('IDA_LIB')]
65 )
66
67 idasrcs = ['ida.c','idalinear.c']
68 for s in idasrcs:
69 objs += sundials_env.SharedObject(s)
70 else:
71 pass
72 # print "NO IDA REQUESTED!"
73
74 if 'LSOD' in solver_env.get('WITH_SOLVERS'):
75 if solver_env.get('F2C_LIBPATH'):
76 libascend_env.AppendUnique(LIBPATH=[solver_env.get('F2C_LIBPATH')])
77 if solver_env.get('F2C_LIB'):
78 libascend_env.AppendUnique(LIBS=[solver_env.get('F2C_LIB')])
79
80 #--------------------
81 # INSTALL
82
83 import glob
84
85 if libascend_env.get('CAN_INSTALL'):
86 installdir = libascend_env['INSTALL_ROOT']+libascend_env['INSTALL_INCLUDE']+'/solver'
87
88 headers = glob.glob("*.h")
89 libascend_env.InstallHeader(installdir,headers)
90
91 Return('objs')
92
93 # vim: set syntax=python:
94

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