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

Contents of /trunk/dudley/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6145 - (show annotations)
Wed Apr 6 06:28:57 2016 UTC (2 years, 6 months ago) by caltinay
File size: 3643 byte(s)
now refraining from adding all libraries to all targets. So we don't link
unnecessary libraries, e.g. escript does not need parmetis etc...

1
2 ##############################################################################
3 #
4 # Copyright (c) 2003-2016 by The University of Queensland
5 # http://www.uq.edu.au
6 #
7 # Primary Business: Queensland, Australia
8 # Licensed under the Apache License, version 2.0
9 # http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 # Development 2012-2013 by School of Earth Sciences
13 # Development from 2014 by Centre for Geoscience Computing (GeoComp)
14 #
15 ##############################################################################
16
17 Import('*')
18
19 module_name = 'dudley'
20
21 sources = """
22 Assemble_AverageElementData.cpp
23 Assemble_CopyElementData.cpp
24 Assemble_CopyNodalData.cpp
25 Assemble_LumpedSystem.cpp
26 Assemble_NodeCoordinates.cpp
27 Assemble_PDE.cpp
28 Assemble_PDE_Points.cpp
29 Assemble_PDE_Single_2D.cpp
30 Assemble_PDE_Single_3D.cpp
31 Assemble_PDE_System_2D.cpp
32 Assemble_PDE_System_3D.cpp
33 Assemble_addToSystemMatrix.cpp
34 Assemble_getAssembleParameters.cpp
35 Assemble_getNormal.cpp
36 Assemble_getSize.cpp
37 Assemble_integrate.cpp
38 Assemble_interpolate.cpp
39 ElementFile.cpp
40 ElementFile_createColoring.cpp
41 ElementFile_distributeByRankOfDOF.cpp
42 ElementFile_jacobians.cpp
43 IndexList.cpp
44 Mesh.cpp
45 Mesh_createTrilinosGraph.cpp
46 Mesh_distributeByRankOfDOF.cpp
47 Mesh_getPattern.cpp
48 Mesh_optimizeDOFDistribution.cpp
49 Mesh_optimizeDOFLabeling.cpp
50 Mesh_prepare.cpp
51 Mesh_read.cpp
52 Mesh_readGmsh.cpp
53 Mesh_resolveNodeIds.cpp
54 Mesh_tet4.cpp
55 Mesh_tri3.cpp
56 Mesh_write.cpp
57 NodeFile.cpp
58 NodeFile_createDenseLabelings.cpp
59 NodeFile_createMappings.cpp
60 NodeFile_gather.cpp
61 ShapeTable.cpp
62 Util.cpp
63 CPPAdapter/MeshAdapter.cpp
64 CPPAdapter/MeshAdapterFactory.cpp
65 """.split()
66 unroll_sources= """
67 Assemble_gradient.cpp
68 Assemble_jacobians.cpp
69 """.split()
70
71 headers = """
72 Assemble.h
73 Dudley.h
74 DudleyException.h
75 DudleyVersion.h
76 ElementFile.h
77 ElementType.h
78 IndexList.h
79 Mesh.h
80 NodeFile.h
81 NodeMapping.h
82 TriangularMesh.h
83 ShapeTable.h
84 Util.h
85 """.split()
86 cppadapter_headers = """
87 CPPAdapter/MeshAdapter.h
88 CPPAdapter/MeshAdapterFactory.h
89 CPPAdapter/system_dep.h
90 """.split()
91
92 local_env = env.Clone()
93
94 unroll_env = env.Clone()
95 unroll_env.Append(CCFLAGS = env['dudley_assemble_flags'])
96 un = [ unroll_env.SharedObject(x) for x in unroll_sources]
97
98 if IS_WINDOWS :
99 local_env.Append(CPPDEFINES = ['DUDLEY_EXPORTS'])
100
101 # collect dependencies for other modules
102 dudleylibs = env['escript_libs']
103 if env['parmetis']:
104 dudleylibs += env['parmetis_libs']
105 if env['paso']:
106 dudleylibs += env['paso_libs']
107 if env['trilinos']:
108 dudleylibs += env['trilinoswrap_libs']
109
110 local_env.PrependUnique(LIBS = dudleylibs)
111
112 env['dudley_libs'] = [module_name] + dudleylibs
113
114 include_path = Dir(module_name, local_env['incinstall'])
115 cppadapter_include_path = Dir('CppAdapter', include_path)
116 hdr_inst = local_env.Install(include_path, headers)
117 hdr_inst += local_env.Install(cppadapter_include_path, cppadapter_headers)
118
119 lib = local_env.SharedLibrary(module_name, sources+un)
120 lib_inst = local_env.Install(local_env['libinstall'], lib)
121
122 ### Python wrapper ###
123 py_env = env.Clone()
124 py_env.Prepend(LIBS = env['dudley_libs'])
125 py_lib_name = module_name + 'cpp'
126 py_lib = py_env.PythonModule(py_lib_name, 'CPPAdapter/dudleycpp.cpp')
127
128 mod_path = Dir(module_name, local_env['pyinstall'])
129 mod_inst = py_env.Install(mod_path, py_lib)
130
131 build = env.Alias('build_dudley', [hdr_inst, lib, py_lib])
132 env.Alias('install_dudley', [build, lib_inst, mod_inst])
133

  ViewVC Help
Powered by ViewVC 1.1.26