/[escript]/trunk/dudley/src/SConscript
ViewVC logotype

Contents of /trunk/dudley/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3344 - (show annotations)
Thu Nov 11 23:26:52 2010 UTC (8 years, 4 months ago) by caltinay
File size: 4605 byte(s)
Phew!
-escript, finley, and dudley now uses weipa's saveVTK implementation
-moved tests from finley to weipa accordingly; dudley still to do
-rebaselined all test files
-fixed a few issues in weipa.saveVTK, e.g. saving metadata without schema
-added a deprecation warning to esys.escript.util.saveVTK
-todo: change doco, tests and other places to use weipa.saveVTK


1
2
3 ########################################################
4 #
5 # Copyright (c) 2003-2010 by University of Queensland
6 # Earth Systems Science Computational Center (ESSCC)
7 # http://www.uq.edu.au/esscc
8 #
9 # Primary Business: Queensland, Australia
10 # Licensed under the Open Software License version 3.0
11 # http://www.opensource.org/licenses/osl-3.0.php
12 #
13 ########################################################
14
15
16 import os
17 Import('*')
18
19 local_env = env.Clone()
20 py_wrapper_local_env = env.Clone()
21 local_unroll_env = env.Clone()
22 local_unroll_env.Append(CFLAGS = env['dudley_assemble_flags'])
23
24
25 # Remove the sharedlibrary prefix on all platform - we don't want 'lib' mucking with our python modules
26 del py_wrapper_local_env['SHLIBPREFIX']
27
28 sources = """
29 Assemble_AverageElementData.c
30 Assemble_CopyElementData.c
31 Assemble_CopyNodalData.c
32 Assemble_LumpedSystem.c
33 Assemble_NodeCoordinates.c
34 Assemble_PDE.c
35 Assemble_PDE_Single2_2D.c
36 Assemble_PDE_Single2_3D.c
37 Assemble_PDE_System2_2D.c
38 Assemble_PDE_System2_3D.c
39 Assemble_addToSystemMatrix.c
40 Assemble_getAssembleParameters.c
41 Assemble_getSize.c
42 Assemble_integrate.c
43 Assemble_interpolate.c
44 Assemble_setNormal.c
45 ElementFile.c
46 ElementFile_allocTable.c
47 ElementFile_copyTable.c
48 ElementFile_createColoring.c
49 ElementFile_distributeByRankOfDOF.c
50 ElementFile_gather.c
51 ElementFile_jacobeans.c
52 ElementFile_markNodes.c
53 ElementFile_optimizeOrdering.c
54 ElementFile_relableNodes.c
55 ElementFile_scatter.c
56 ElementFile_setCoordinates.c
57 ElementFile_setNodeRange.c
58 ElementFile_setTags.c
59 ElementType.c
60 Dudley.c
61 IndexList.c
62 Mesh.c
63 Mesh_createNodeFileMappings.c
64 Mesh_distributeByRankOfDOF.c
65 Mesh_findMatchingFaces.c
66 Mesh_getPattern.c
67 Mesh_markNodes.c
68 Mesh_optimizeDOFDistribution.c
69 Mesh_optimizeDOFLabeling.c
70 Mesh_prepare.c
71 Mesh_print.c
72 Mesh_read.c
73 Mesh_readGmsh.c
74 Mesh_relableElementNodes.c
75 Mesh_resolveNodeIds.c
76 Mesh_saveDX.c
77 Mesh_setCoordinates.c
78 Mesh_tagmaps.c
79 Mesh_tet4.c
80 Mesh_tri3.c
81 Mesh_write.c
82 NodeFile.c
83 NodeFile_allocTable.c
84 NodeFile_copyTable.c
85 NodeFile_createDenseLabelings.c
86 NodeFile_gather.c
87 NodeFile_scatter.c
88 NodeFile_setCoordinates.c
89 NodeFile_setIdRange.c
90 NodeFile_setTags.c
91 NodeMapping.c
92 ShapeTable.c
93 TagMap.c
94 Util.c
95 CPPAdapter/DudleyAdapterException.cpp
96 CPPAdapter/DudleyError.cpp
97 CPPAdapter/MeshAdapter.cpp
98 CPPAdapter/MeshAdapterFactory.cpp
99 CPPAdapter/SystemMatrixAdapter.cpp
100 CPPAdapter/TransportProblemAdapter.cpp
101 """.split()
102 unroll_sources= """
103 Assemble_gradient.c
104 Assemble_jacobeans.c
105 """.split()
106
107
108 headers = """
109 Assemble.h
110 Dudley.h
111 DudleyVersion.h
112 ElementFile.h
113 ElementType.h
114 IndexList.h
115 Mesh.h
116 NodeFile.h
117 NodeMapping.h
118 TriangularMesh.h
119 ShapeTable.h
120 TagMap.h
121 Util.h
122 vtkCellType.h
123 """.split()
124 cppadapter_headers = """
125 CPPAdapter/DudleyAdapterException.h
126 CPPAdapter/DudleyError.h
127 CPPAdapter/MeshAdapter.h
128 CPPAdapter/MeshAdapterFactory.h
129 CPPAdapter/SystemMatrixAdapter.h
130 CPPAdapter/TransportProblemAdapter.h
131 CPPAdapter/system_dep.h
132 """.split()
133
134 local_env.Append(LIBS = ['escript', 'esysUtils', 'paso'])
135
136 if IS_WINDOWS :
137 local_env.Append(CPPDEFINES = ['DUDLEY_EXPORTS'])
138
139 module_name = 'dudley'
140
141 un = [ local_unroll_env.SharedObject(x) for x in unroll_sources]
142
143 lib = local_env.SharedLibrary(module_name, sources+un)
144 env.Alias('build_dudley_lib', lib)
145
146 include_path = Dir('dudley', local_env['incinstall'])
147 cppadapter_include_path = Dir('CppAdapter', include_path)
148
149 hdr_inst1 = local_env.Install(include_path, headers )
150 hdr_inst2 = local_env.Install(cppadapter_include_path, cppadapter_headers )
151 env.Alias('install_dudley_headers', [hdr_inst1, hdr_inst2])
152
153 lib_inst = local_env.Install(local_env['libinstall'], lib)
154 env.Alias('install_dudley_lib', lib_inst)
155
156 ### Python wrapper ###
157 py_wrapper_local_env.Append(LIBS = ['dudley', 'escript', 'esysUtils', 'paso'])
158 py_wrapper_name = module_name + 'cpp'
159 py_wrapper_lib = py_wrapper_local_env.SharedLibrary(py_wrapper_name, 'CPPAdapter/dudleycpp.cpp')
160 env.Alias('build_dudleycpp_lib', py_wrapper_lib)
161
162 tmp_inst = os.path.join(local_env['pyinstall'], module_name)
163 if IS_WINDOWS:
164 wrapper_ext = '.pyd'
165 else:
166 wrapper_ext = '.so'
167
168 share_name = os.path.join(tmp_inst, py_wrapper_name+wrapper_ext)
169 mod_inst = py_wrapper_local_env.InstallAs(target=share_name,
170 source=py_wrapper_lib[0])
171 env.Alias('install_dudleycpp_lib', mod_inst)
172
173 # configure python module
174 local_env.SConscript(dirs = ['#/dudley/py_src'], variant_dir='py', duplicate=0)
175
176 # configure unit tests
177 local_env.SConscript(dirs = ['#/dudley/test'], variant_dir='#/build/$PLATFORM/dudley/test', duplicate=0, exports=['py_wrapper_lib'])
178

  ViewVC Help
Powered by ViewVC 1.1.26