/[escript]/branches/trilinos_from_5897/dudley/src/SConscript
ViewVC logotype

Contents of /branches/trilinos_from_5897/dudley/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6079 - (show annotations)
Mon Mar 21 12:22:38 2016 UTC (2 years, 10 months ago) by caltinay
File size: 4166 byte(s)
Big commit - making dudley much more like finley to make it more
managable. Fixed quite a few issues that had been fixed in finley.
Disposed of all ReducedNode/ReducedDOF entities that dudley never supported.
Compiles and passes tests.

1
2
3 ##############################################################################
4 #
5 # Copyright (c) 2003-2016 by The University of Queensland
6 # http://www.uq.edu.au
7 #
8 # Primary Business: Queensland, Australia
9 # Licensed under the Open Software License version 3.0
10 # http://www.opensource.org/licenses/osl-3.0.php
11 #
12 # Development until 2012 by Earth Systems Science Computational Center (ESSCC)
13 # Development 2012-2013 by School of Earth Sciences
14 # Development from 2014 by Centre for Geoscience Computing (GeoComp)
15 #
16 ##############################################################################
17
18
19 import os
20 Import('*')
21
22 local_env = env.Clone()
23 py_wrapper_local_env = env.Clone()
24 local_unroll_env = env.Clone()
25 local_unroll_env.Append(CFLAGS = env['dudley_assemble_flags'])
26
27
28 # Remove the sharedlibrary prefix on all platform - we don't want 'lib' mucking with our python modules
29 del py_wrapper_local_env['SHLIBPREFIX']
30
31 sources = """
32 Assemble_AverageElementData.cpp
33 Assemble_CopyElementData.cpp
34 Assemble_CopyNodalData.cpp
35 Assemble_LumpedSystem.cpp
36 Assemble_NodeCoordinates.cpp
37 Assemble_PDE.cpp
38 Assemble_PDE_Points.cpp
39 Assemble_PDE_Single_2D.cpp
40 Assemble_PDE_Single_3D.cpp
41 Assemble_PDE_System_2D.cpp
42 Assemble_PDE_System_3D.cpp
43 Assemble_addToSystemMatrix.cpp
44 Assemble_getAssembleParameters.cpp
45 Assemble_getNormal.cpp
46 Assemble_getSize.cpp
47 Assemble_integrate.cpp
48 Assemble_interpolate.cpp
49 ElementFile.cpp
50 ElementFile_createColoring.cpp
51 ElementFile_distributeByRankOfDOF.cpp
52 ElementFile_jacobians.cpp
53 IndexList.cpp
54 Mesh.cpp
55 Mesh_createTrilinosGraph.cpp
56 Mesh_distributeByRankOfDOF.cpp
57 Mesh_getPattern.cpp
58 Mesh_optimizeDOFDistribution.cpp
59 Mesh_optimizeDOFLabeling.cpp
60 Mesh_prepare.cpp
61 Mesh_print.cpp
62 Mesh_read.cpp
63 Mesh_readGmsh.cpp
64 Mesh_resolveNodeIds.cpp
65 Mesh_tet4.cpp
66 Mesh_tri3.cpp
67 Mesh_write.cpp
68 NodeFile.cpp
69 NodeFile_createDenseLabelings.cpp
70 NodeFile_createMappings.cpp
71 NodeFile_gather.cpp
72 ShapeTable.cpp
73 Util.cpp
74 CPPAdapter/MeshAdapter.cpp
75 CPPAdapter/MeshAdapterFactory.cpp
76 """.split()
77 unroll_sources= """
78 Assemble_gradient.cpp
79 Assemble_jacobians.cpp
80 """.split()
81
82
83 headers = """
84 Assemble.h
85 Dudley.h
86 DudleyException.h
87 DudleyVersion.h
88 ElementFile.h
89 ElementType.h
90 IndexList.h
91 Mesh.h
92 NodeFile.h
93 NodeMapping.h
94 TriangularMesh.h
95 ShapeTable.h
96 Util.h
97 """.split()
98 cppadapter_headers = """
99 CPPAdapter/MeshAdapter.h
100 CPPAdapter/MeshAdapterFactory.h
101 CPPAdapter/system_dep.h
102 """.split()
103
104 local_env.Prepend(LIBS = ['escript', 'paso'])
105
106 if local_env['trilinos']:
107 local_env.AppendUnique(LIBS = ['trilinoswrap'])
108 py_wrapper_local_env.AppendUnique(LIBS = ['trilinoswrap'])
109
110 if IS_WINDOWS :
111 local_env.Append(CPPDEFINES = ['DUDLEY_EXPORTS'])
112
113 module_name = 'dudley'
114
115 un = [ local_unroll_env.SharedObject(x) for x in unroll_sources]
116
117 lib = local_env.SharedLibrary(module_name, sources+un)
118 env.Alias('build_dudley_lib', lib)
119
120 include_path = Dir('dudley', local_env['incinstall'])
121 cppadapter_include_path = Dir('CppAdapter', include_path)
122
123 hdr_inst1 = local_env.Install(include_path, headers )
124 hdr_inst2 = local_env.Install(cppadapter_include_path, cppadapter_headers )
125 env.Alias('install_dudley_headers', [hdr_inst1, hdr_inst2])
126
127 lib_inst = local_env.Install(local_env['libinstall'], lib)
128 env.Alias('install_dudley_lib', lib_inst)
129
130 ### Python wrapper ###
131 py_wrapper_local_env.Prepend(LIBS = ['dudley', 'escript', 'paso'])
132 py_wrapper_name = module_name + 'cpp'
133 py_wrapper_lib = py_wrapper_local_env.SharedLibrary(py_wrapper_name, 'CPPAdapter/dudleycpp.cpp')
134 env.Alias('build_dudleycpp_lib', py_wrapper_lib)
135
136 tmp_inst = os.path.join(local_env['pyinstall'], module_name)
137 if IS_WINDOWS:
138 wrapper_ext = '.pyd'
139 else:
140 wrapper_ext = '.so'
141
142 share_name = os.path.join(tmp_inst, py_wrapper_name+wrapper_ext)
143 mod_inst = py_wrapper_local_env.InstallAs(target=share_name,
144 source=py_wrapper_lib[0])
145 env.Alias('install_dudleycpp_lib', mod_inst)
146
147 # configure python module
148 local_env.SConscript(dirs = ['#/dudley/py_src'], variant_dir='py', duplicate=0)
149
150 # configure unit tests
151 local_env.SConscript(dirs = ['#/dudley/test'], variant_dir='test', duplicate=0, exports=['py_wrapper_lib'])
152

  ViewVC Help
Powered by ViewVC 1.1.26