/
CMakeLists.txt
281 lines (259 loc) · 6.72 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
if(MSVC)
add_definitions(-DFCAppFem -DHAVE_ACOSH -DHAVE_ASINH -DHAVE_ATANH)
else(MSVC)
add_definitions(-DHAVE_LIMITS_H -DHAVE_CONFIG_H)
endif(MSVC)
if(BUILD_FEM_NETGEN)
add_definitions(-DFCWithNetgen ${NETGEN_DEFINITIONS})
endif(BUILD_FEM_NETGEN)
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/src
${CMAKE_BINARY_DIR}/src
${CMAKE_CURRENT_BINARY_DIR}
${Boost_INCLUDE_DIRS}
${OCC_INCLUDE_DIR}
${PYTHON_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIR}
${XercesC_INCLUDE_DIRS}
${SMESH_INCLUDE_DIR}
${NETGEN_INCLUDE_DIRS}
${VTK_INCLUDE_DIRS}
)
link_directories(${OCC_LIBRARY_DIR})
set(Fem_LIBS
Part
FreeCADApp
StdMeshers
SMESH
SMDS
SMESHDS
)
if(BUILD_FEM_NETGEN)
list(APPEND Fem_LIBS
NETGENPlugin
)
endif(BUILD_FEM_NETGEN)
generate_from_xml(FemMeshPy)
SET(Python_SRCS
FemMeshPy.xml
FemMeshPyImp.cpp
HypothesisPy.cpp
HypothesisPy.h
)
SOURCE_GROUP("Python" FILES ${Python_SRCS})
SET(Mod_SRCS
AppFem.cpp
AppFemPy.cpp
FemTools.cpp
FemTools.h
PreCompiled.cpp
PreCompiled.h
)
SOURCE_GROUP("Module" FILES ${Mod_SRCS})
SET(FemScripts_SRCS
_CommandAnalysis.py
_CommandBeamSection.py
_CommandClearMesh.py
_CommandControlSolver.py
_CommandConstraintSelfWeight.py
_CommandFEMMesh2Mesh.py
_CommandMaterialMechanicalNonlinear.py
_CommandMaterialSolid.py
_CommandMaterialFluid.py
_CommandMeshGmshFromShape.py
_CommandMeshNetgenFromShape.py
_CommandMeshGroup.py
_CommandMeshRegion.py
_CommandPrintMeshInfo.py
_CommandPurgeResults.py
_CommandRunSolver.py
_CommandShellThickness.py
_CommandShowResult.py
_CommandSolverCalculix.py
_CommandSolverZ88.py
_FemBeamSection.py
_FemConstraintSelfWeight.py
_FemMaterialMechanicalNonlinear.py
_FemMechanicalResult.py
_FemMeshGmsh.py
_FemMeshGroup.py
_FemMeshRegion.py
_FemShellThickness.py
_FemSolverCalculix.py
_FemSolverZ88.py
_FemMaterial.py
_TaskPanelFemBeamSection.py
_TaskPanelFemMeshGmsh.py
_TaskPanelFemMeshGroup.py
_TaskPanelFemMeshRegion.py
_TaskPanelFemShellThickness.py
_TaskPanelFemSolverCalculix.py
_TaskPanelFemMaterial.py
_TaskPanelShowResult.py
_ViewProviderFemBeamSection.py
_ViewProviderFemConstraintSelfWeight.py
_ViewProviderFemMaterialMechanicalNonlinear.py
_ViewProviderFemMechanicalResult.py
_ViewProviderFemMeshGmsh.py
_ViewProviderFemMeshGroup.py
_ViewProviderFemMeshRegion.py
_ViewProviderFemShellThickness.py
_ViewProviderFemSolverCalculix.py
_ViewProviderFemSolverZ88.py
_ViewProviderFemMaterial.py
convert2TetGen.py
importCcxDatResults.py
importCcxFrdResults.py
importInpMesh.py
importVTKResults.py
importZ88Mesh.py
importZ88O2Results.py
Init.py
InitGui.py
FemCommands.py
FemGmshTools.py
FemInputWriter.py
FemInputWriterCcx.py
FemInputWriterZ88.py
FemMesh2Mesh.py
FemMeshTools.py
FemTools.py
FemToolsCcx.py
FemToolsZ88.py
FemSelectionObserver.py
ObjectsFem.py
TestFem.py
TaskPanelFemBeamSection.ui
TaskPanelFemMeshGmsh.ui
TaskPanelFemMeshGroup.ui
TaskPanelFemMeshRegion.ui
TaskPanelFemShellThickness.ui
TaskPanelFemSolverCalculix.ui
TaskPanelFemMaterial.ui
TaskPanelShowResult.ui
)
#SOURCE_GROUP("Scripts" FILES ${FemScripts_SRCS})
SET(FemTests_SRCS
test_files/ccx/mesh_points.csv
test_files/ccx/mesh_volumes.csv
test_files/ccx/cube_frequency.inp
test_files/ccx/cube_frequency.dat
test_files/ccx/cube_frequency.frd
test_files/ccx/cube_frequency_expected_values
test_files/ccx/cube_static.inp
test_files/ccx/cube_static.dat
test_files/ccx/cube_static.frd
test_files/ccx/cube_static_expected_values
test_files/ccx/cube.fcstd
test_files/ccx/spine_points.csv
test_files/ccx/spine_volumes.csv
test_files/ccx/spine_thermomech.inp
test_files/ccx/spine_thermomech.dat
test_files/ccx/spine_thermomech.frd
test_files/ccx/spine_thermomech_expected_values
test_files/ccx/spine_thermomech.fcstd
)
SET(FemBase_SRCS
FemMeshObject.cpp
FemMeshObject.h
FemMeshShapeObject.cpp
FemMeshShapeObject.h
FemMeshShapeNetgenObject.cpp
FemMeshShapeNetgenObject.h
FemAnalysis.cpp
FemAnalysis.h
FemMesh.cpp
FemMesh.h
FemResultObject.cpp
FemResultObject.h
FemSolverObject.cpp
FemSolverObject.h
FemConstraint.cpp
FemConstraint.h
FemMeshProperty.cpp
FemMeshProperty.h
)
SOURCE_GROUP("Base types" FILES ${FemBase_SRCS})
SET(FemSet_SRCS
FemSetObject.cpp
FemSetObject.h
FemSetNodesObject.cpp
FemSetNodesObject.h
FemSetElementsObject.cpp
FemSetElementsObject.h
FemSetFacesObject.cpp
FemSetFacesObject.h
FemSetGeometryObject.cpp
FemSetGeometryObject.h
)
SOURCE_GROUP("Set objects" FILES ${FemSet_SRCS})
SET(FemConstraints_SRCS
FemConstraintBearing.h
FemConstraintBearing.cpp
FemConstraintFixed.cpp
FemConstraintFixed.h
FemConstraintForce.cpp
FemConstraintForce.h
FemConstraintFluidBoundary.cpp
FemConstraintFluidBoundary.h
FemConstraintPressure.cpp
FemConstraintPressure.h
FemConstraintGear.cpp
FemConstraintGear.h
FemConstraintPulley.cpp
FemConstraintPulley.h
FemConstraintDisplacement.h
FemConstraintDisplacement.cpp
FemConstraintTemperature.h
FemConstraintTemperature.cpp
FemConstraintHeatflux.h
FemConstraintHeatflux.cpp
FemConstraintInitialTemperature.h
FemConstraintInitialTemperature.cpp
FemConstraintPlaneRotation.cpp
FemConstraintPlaneRotation.h
FemConstraintContact.cpp
FemConstraintContact.h
FemConstraintTransform.cpp
FemConstraintTransform.h
)
SOURCE_GROUP("Constraints" FILES ${FemConstraints_SRCS})
if(BUILD_FEM_VTK)
SET(FemPost_SRCS
PropertyPostDataObject.h
PropertyPostDataObject.cpp
FemPostObject.h
FemPostObject.cpp
FemPostPipeline.h
FemPostPipeline.cpp
FemPostFilter.h
FemPostFilter.cpp
FemPostFunction.h
FemPostFunction.cpp
FemVTKTools.h
FemVTKTools.cpp
)
SOURCE_GROUP("PostObjects" FILES ${FemPost_SRCS})
endif(BUILD_FEM_VTK)
SET(Fem_SRCS
${FemBase_SRCS}
${FemSet_SRCS}
${FemConstraints_SRCS}
${FemResult_SRCS}
${FemPost_SRCS}
${Mod_SRCS}
${Python_SRCS}
)
add_library(Fem SHARED ${Fem_SRCS})
target_link_libraries(Fem ${Fem_LIBS} ${VTK_LIBRARIES})
fc_target_copy_resource(Fem
${CMAKE_SOURCE_DIR}/src/Mod/Fem
${CMAKE_BINARY_DIR}/Mod/Fem
Init.py
${FemScripts_SRCS}
${FemTests_SRCS}
)
SET_BIN_DIR(Fem Fem /Mod/Fem)
SET_PYTHON_PREFIX_SUFFIX(Fem)
INSTALL(TARGETS Fem DESTINATION ${CMAKE_INSTALL_LIBDIR})