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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 669 - (show annotations) (download)
Wed Jun 21 07:00:45 2006 UTC (14 years, 4 months ago) by johnpye
File size: 1384 byte(s)
Merged changes from DAE branch (revisions 702 to 819) back into trunk.
This adds the Integration API to the ASCEND solver (in base/generic).
Also provides pre-alpha support for 'IDA' from the SUNDIALS suite, a DAE solver.
Many other minor code clean-ups, including adoption of new 'ASC_NEW' and friends (to replace 'ascmalloc')
Added some very sketchy stuff providing 'DIFF(...)' syntax, although it is anticipated that this will be removed.
1 Import('libascend_env')
2
3 csrcs = Split("""
4
5 analyze.c bnd.c bndman.c calc.c cond_config.c
6 conditional.c conopt.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 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 integrator.c lsode.c samplelist.c
15 """)
16
17 solver_env = libascend_env.Copy()
18
19 defs = []
20 for i in libascend_env.get('WITH_SOLVERS'):
21 solver_env.Append(CPPDEFINES=["STATIC_"+i])
22
23 objs = []
24 for c in csrcs:
25 objs += solver_env.SharedObject(c)
26
27 if solver_env.get('WITH_IDA'):
28 sundials_env = solver_env.Copy()
29 sundials_env.Append(
30 CPPPATH=([solver_env.get('IDA_CPPPATH')])
31 )
32 if solver_env.get('IDA_CPPPATH_EXTRA'):
33 sundials_env.Append(
34 CPPPATH=solver_env.get('IDA_CPPPATH_EXTRA')
35 )
36
37 libascend_env.Append(
38 LIBPATH=[solver_env.get('IDA_LIBPPATH')]
39 , LIBS=[solver_env.get('IDA_LIB')]
40 )
41
42 objs += sundials_env.SharedObject('ida.c');
43 else:
44 print "NO IDA REQUESTED!"
45
46 if 'LSOD' in solver_env.get('WITH_SOLVERS'):
47 if solver_env.get('F2C_LIBPATH'):
48 libascend_env.AppendUnique(LIBPATH=[solver_env.get('F2C_LIBPATH')])
49 if solver_env.get('F2C_LIB'):
50 libascend_env.AppendUnique(LIBS=[solver_env.get('F2C_LIB')])
51
52 Return('objs')

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