CMakeLists.txt 7.17 KB
Newer Older
1
add_library(MoReFEM4Elasticity_lib ${LIBRARY_TYPE} "")
2

3
target_sources(MoReFEM4Elasticity_lib
4 5 6 7 8 9
    PRIVATE
        "${CMAKE_CURRENT_LIST_DIR}/ElasticityModel.cpp" / 
        "${CMAKE_CURRENT_LIST_DIR}/VariationalFormulationElasticity.cpp"
	PUBLIC
		"${CMAKE_CURRENT_LIST_DIR}/ElasticityModel.hpp" /
		"${CMAKE_CURRENT_LIST_DIR}/ElasticityModel.hxx" /
10
		"${CMAKE_CURRENT_LIST_DIR}/InputData.hpp" /
11 12 13 14
 		"${CMAKE_CURRENT_LIST_DIR}/VariationalFormulationElasticity.hpp" /
		"${CMAKE_CURRENT_LIST_DIR}/VariationalFormulationElasticity.hxx"
)

15
target_link_libraries(MoReFEM4Elasticity_lib
16 17 18
                      ${ALL_LOAD_BEGIN_FLAG}
                      ${MOREFEM_MODEL}
                      ${ALL_LOAD_END_FLAG})
19 20


21 22 23
add_executable(MoReFEM4Elasticity ${CMAKE_CURRENT_LIST_DIR}/main.cpp)
target_link_libraries(MoReFEM4Elasticity
                      MoReFEM4Elasticity_lib)
24

25
apply_lto_if_supported(MoReFEM4Elasticity)                      
26
                      
27 28
morefem_install(MoReFEM4Elasticity MoReFEM4Elasticity_lib)

29 30
add_executable(MoReFEM4ElasticityEnsightOutput ${CMAKE_CURRENT_LIST_DIR}/main_ensight_output.cpp)
target_link_libraries(MoReFEM4ElasticityEnsightOutput
31
                      ${MOREFEM_POST_PROCESSING})
32 33


GILLES Sebastien's avatar
GILLES Sebastien committed
34
add_test(ElasticityModel3D        
35
         MoReFEM4Elasticity
36
         -e MOREFEM_ROOT=${MOREFEM_ROOT}
37
         -i ${MOREFEM_ROOT}/Sources/ModelInstances/Elasticity/demo_3d.lua
38
         -e MOREFEM_RESULT_DIR=${MOREFEM_TEST_OUTPUT_DIR}/Seq/Ascii)
39

40 41
set_tests_properties(ElasticityModel3D PROPERTIES TIMEOUT 8)

42 43
add_test(ElasticityModel3D-mpi
         ${OPEN_MPI_INCL_DIR}/../bin/mpirun
44
         --oversubscribe
45
         -np 4 MoReFEM4Elasticity
46
         -e MOREFEM_ROOT=${MOREFEM_ROOT}
47
         -i ${MOREFEM_ROOT}/Sources/ModelInstances/Elasticity/demo_3d.lua
48
         -e MOREFEM_RESULT_DIR=${MOREFEM_TEST_OUTPUT_DIR}/Mpi4/Ascii)
49

50 51
set_tests_properties(ElasticityModel3D-mpi PROPERTIES TIMEOUT 6)

52 53
add_test(ElasticityModel2D
         MoReFEM4Elasticity
54
         -e MOREFEM_ROOT=${MOREFEM_ROOT}
55
         -i ${MOREFEM_ROOT}/Sources/ModelInstances/Elasticity/demo_2d.lua
56
         -e MOREFEM_RESULT_DIR=${MOREFEM_TEST_OUTPUT_DIR}/Seq/Ascii)
57

58 59
set_tests_properties(ElasticityModel2D PROPERTIES TIMEOUT 8)

60 61
add_test(ElasticityModel2D-mpi
         ${OPEN_MPI_INCL_DIR}/../bin/mpirun
62
         --oversubscribe
63
         -np 4 MoReFEM4Elasticity
64
         -e MOREFEM_ROOT=${MOREFEM_ROOT}
65
         -i ${MOREFEM_ROOT}/Sources/ModelInstances/Elasticity/demo_2d.lua
66
         -e MOREFEM_RESULT_DIR=${MOREFEM_TEST_OUTPUT_DIR}/Mpi4/Ascii)
67

68
set_tests_properties(ElasticityModel2D-mpi PROPERTIES TIMEOUT 6)
69 70 71

add_test(ElasticityModel3DEnsightOutput
         MoReFEM4ElasticityEnsightOutput
72
         -e MOREFEM_ROOT=${MOREFEM_ROOT}
73 74
         -i ${MOREFEM_TEST_OUTPUT_DIR}/Seq/Ascii/Elasticity/3D/input_data.lua
         -e MOREFEM_RESULT_DIR=${MOREFEM_TEST_OUTPUT_DIR}/Seq/Ascii)
75

76 77
set_tests_properties(ElasticityModel3DEnsightOutput PROPERTIES TIMEOUT 2)

78 79
add_test(ElasticityModel3DEnsightOutput-mpi
         MoReFEM4ElasticityEnsightOutput
80
         -e MOREFEM_ROOT=${MOREFEM_ROOT}
81 82
         -i ${MOREFEM_TEST_OUTPUT_DIR}/Mpi4/Ascii/Elasticity/3D/input_data.lua
         -e MOREFEM_RESULT_DIR=${MOREFEM_TEST_OUTPUT_DIR}/Mpi4/Ascii)
83

84 85
set_tests_properties(ElasticityModel3DEnsightOutput-mpi PROPERTIES TIMEOUT 2)

86 87
add_test(ElasticityModel2DEnsightOutput
         MoReFEM4ElasticityEnsightOutput
88
         -e MOREFEM_ROOT=${MOREFEM_ROOT}
89 90
         -i ${MOREFEM_TEST_OUTPUT_DIR}/Mpi4/Ascii/Elasticity/2D/input_data.lua
         -e MOREFEM_RESULT_DIR=${MOREFEM_TEST_OUTPUT_DIR}/Seq/Ascii)
91

92 93
set_tests_properties(ElasticityModel2DEnsightOutput PROPERTIES TIMEOUT 2)

94 95
add_test(ElasticityModel2DEnsightOutput-mpi
         MoReFEM4ElasticityEnsightOutput
96
         -e MOREFEM_ROOT=${MOREFEM_ROOT}
97 98 99
         -i ${MOREFEM_TEST_OUTPUT_DIR}/Mpi4/Ascii/Elasticity/2D/input_data.lua
         -e MOREFEM_RESULT_DIR=${MOREFEM_TEST_OUTPUT_DIR}/Mpi4/Ascii)

100 101
set_tests_properties(ElasticityModel2DEnsightOutput-mpi PROPERTIES TIMEOUT 2)

102
add_test(ElasticityModel3D-bin
103 104
         MoReFEM4Elasticity
         -e MOREFEM_ROOT=${MOREFEM_ROOT}
105
         -i ${MOREFEM_ROOT}/Sources/ModelInstances/Elasticity/demo_3d_binary.lua
106
     -e MOREFEM_RESULT_DIR=${MOREFEM_TEST_OUTPUT_DIR}/Seq/Binary)
107

108 109
set_tests_properties(ElasticityModel3D-bin PROPERTIES TIMEOUT 8)

110
add_test(ElasticityModel3D-mpi-bin
111 112 113 114
         ${OPEN_MPI_INCL_DIR}/../bin/mpirun
         --oversubscribe
         -np 4 MoReFEM4Elasticity
         -e MOREFEM_ROOT=${MOREFEM_ROOT}
115
         -i ${MOREFEM_ROOT}/Sources/ModelInstances/Elasticity/demo_3d_binary.lua
116
         -e MOREFEM_RESULT_DIR=${MOREFEM_TEST_OUTPUT_DIR}/Mpi4/Binary)
117

118 119
set_tests_properties(ElasticityModel3D-mpi-bin PROPERTIES TIMEOUT 6)

120
add_test(ElasticityModel2D-bin
121 122
         MoReFEM4Elasticity
         -e MOREFEM_ROOT=${MOREFEM_ROOT}
123
         -i ${MOREFEM_ROOT}/Sources/ModelInstances/Elasticity/demo_2d_binary.lua
124
         -e MOREFEM_RESULT_DIR=${MOREFEM_TEST_OUTPUT_DIR}/Seq/Binary)
125

126 127
set_tests_properties(ElasticityModel2D-bin PROPERTIES TIMEOUT 8)

128
add_test(ElasticityModel2D-mpi-bin
129 130 131 132
         ${OPEN_MPI_INCL_DIR}/../bin/mpirun
         --oversubscribe
         -np 4 MoReFEM4Elasticity
         -e MOREFEM_ROOT=${MOREFEM_ROOT}
133
         -i ${MOREFEM_ROOT}/Sources/ModelInstances/Elasticity/demo_2d_binary.lua
134
         -e MOREFEM_RESULT_DIR=${MOREFEM_TEST_OUTPUT_DIR}/Mpi4/Binary)
135

136
set_tests_properties(ElasticityModel2D-mpi-bin PROPERTIES TIMEOUT 6)
137 138

add_test(ElasticityModel3DEnsightOutput-bin
139 140 141 142
         MoReFEM4ElasticityEnsightOutput
         -e MOREFEM_ROOT=${MOREFEM_ROOT}
         -i ${MOREFEM_TEST_OUTPUT_DIR}/Seq/Binary/Elasticity/3D/input_data.lua
         -e MOREFEM_RESULT_DIR=${MOREFEM_TEST_OUTPUT_DIR}/Seq/Binary)
143

144 145
set_tests_properties(ElasticityModel3DEnsightOutput-bin PROPERTIES TIMEOUT 2)

146
add_test(ElasticityModel3DEnsightOutput-mpi-bin
147 148 149 150
         MoReFEM4ElasticityEnsightOutput
         -e MOREFEM_ROOT=${MOREFEM_ROOT}
         -i ${MOREFEM_TEST_OUTPUT_DIR}/Mpi4/Binary/Elasticity/3D/input_data.lua
         -e MOREFEM_RESULT_DIR=${MOREFEM_TEST_OUTPUT_DIR}/Mpi4/Binary)
151

152 153
set_tests_properties(ElasticityModel3DEnsightOutput-mpi-bin PROPERTIES TIMEOUT 2)

154
add_test(ElasticityModel2DEnsightOutput-bin
155 156 157 158
         MoReFEM4ElasticityEnsightOutput
         -e MOREFEM_ROOT=${MOREFEM_ROOT}
         -i ${MOREFEM_TEST_OUTPUT_DIR}/Mpi4/Binary/Elasticity/2D/input_data.lua
         -e MOREFEM_RESULT_DIR=${MOREFEM_TEST_OUTPUT_DIR}/Seq/Binary)
159

160 161
set_tests_properties(ElasticityModel2DEnsightOutput-bin PROPERTIES TIMEOUT 2)

162
add_test(ElasticityModel2DEnsightOutput-mpi-bin
163 164 165 166
         MoReFEM4ElasticityEnsightOutput
         -e MOREFEM_ROOT=${MOREFEM_ROOT}
         -i ${MOREFEM_TEST_OUTPUT_DIR}/Mpi4/Binary/Elasticity/2D/input_data.lua
         -e MOREFEM_RESULT_DIR=${MOREFEM_TEST_OUTPUT_DIR}/Mpi4/Binary)
167

168 169
set_tests_properties(ElasticityModel2DEnsightOutput-mpi-bin PROPERTIES TIMEOUT 2)

170
morefem_install(MoReFEM4ElasticityEnsightOutput)
171 172 173

add_executable(MoReFEM4ElasticityCheckResults ${CMAKE_CURRENT_LIST_DIR}/test_results.cpp)
target_link_libraries(MoReFEM4ElasticityCheckResults
174
                       ${MOREFEM_TEST_TOOLS})
175 176 177

add_test(ElasticityCheckResults
         MoReFEM4ElasticityCheckResults
178 179 180 181
         --
         ${MOREFEM_ROOT}
         ${MOREFEM_TEST_OUTPUT_DIR}
         )
182

183
set_tests_properties(ElasticityCheckResults PROPERTIES TIMEOUT 5)