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

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

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


21 22 23
add_executable(MoReFEM4Hyperelasticity ${CMAKE_CURRENT_LIST_DIR}/main.cpp)
target_link_libraries(MoReFEM4Hyperelasticity
                      MoReFEM4Hyperelasticity_lib)
24
apply_lto_if_supported(MoReFEM4Hyperelasticity)
25 26
morefem_install(MoReFEM4Hyperelasticity MoReFEM4Hyperelasticity_lib)

27 28
add_executable(MoReFEM4HyperelasticityEnsightOutput ${CMAKE_CURRENT_LIST_DIR}/main_ensight_output.cpp)
target_link_libraries(MoReFEM4HyperelasticityEnsightOutput
29
                      ${MOREFEM_POST_PROCESSING})
30 31 32

morefem_install(MoReFEM4HyperelasticityEnsightOutput)

33 34
add_executable(MoReFEM4HyperelasticityCheckResults ${CMAKE_CURRENT_LIST_DIR}/test_results.cpp)
target_link_libraries(MoReFEM4HyperelasticityCheckResults
35
                      ${MOREFEM_TEST_TOOLS})
36

37 38
add_test(Hyperelasticity
         MoReFEM4Hyperelasticity
39
         -e MOREFEM_ROOT=${MOREFEM_ROOT}
40 41
         -i ${MOREFEM_ROOT}/Sources/ModelInstances/Hyperelasticity/demo_input_hyperelasticity.lua
         -e MOREFEM_RESULT_DIR=${MOREFEM_TEST_OUTPUT_DIR}/Seq)
42

43 44
set_tests_properties(Hyperelasticity PROPERTIES TIMEOUT 30)

45 46
add_test(Hyperelasticity-mpi
         ${OPEN_MPI_INCL_DIR}/../bin/mpirun
47
         --oversubscribe
48
         -np 4 MoReFEM4Hyperelasticity
49
         -e MOREFEM_ROOT=${MOREFEM_ROOT}
50 51
         -i ${MOREFEM_ROOT}/Sources/ModelInstances/Hyperelasticity/demo_input_hyperelasticity.lua
         -e MOREFEM_RESULT_DIR=${MOREFEM_TEST_OUTPUT_DIR}/Mpi4)
52

53 54
set_tests_properties(Hyperelasticity-mpi PROPERTIES TIMEOUT 20)

55 56
add_test(HyperelasticityModelEnsightOutput
         MoReFEM4HyperelasticityEnsightOutput
57 58
         -e MOREFEM_ROOT=${MOREFEM_ROOT}
         -i ${MOREFEM_TEST_OUTPUT_DIR}/Seq/MidpointHyperelasticity/input_data.lua
59 60
         -e MOREFEM_RESULT_DIR=${MOREFEM_TEST_OUTPUT_DIR}/Seq)

61
set_tests_properties(HyperelasticityModelEnsightOutput PROPERTIES TIMEOUT 5)
62

63 64
add_test(HyperelasticityModelEnsightOutput-mpi
         MoReFEM4HyperelasticityEnsightOutput
65 66
         -e MOREFEM_ROOT=${MOREFEM_ROOT}
         -i ${MOREFEM_TEST_OUTPUT_DIR}/Mpi4/MidpointHyperelasticity/input_data.lua
67
         -e MOREFEM_RESULT_DIR=${MOREFEM_TEST_OUTPUT_DIR}/Mpi4)
68

69
set_tests_properties(HyperelasticityModelEnsightOutput-mpi PROPERTIES TIMEOUT 5)
70

71 72
add_test(HyperelasticityCheckResults
         MoReFEM4HyperelasticityCheckResults
73 74 75 76 77
         --
         ${MOREFEM_ROOT}
         ${MOREFEM_TEST_OUTPUT_DIR}
         )

78
set_tests_properties(HyperelasticityCheckResults PROPERTIES TIMEOUT 5)