Am Montag, 13. Mai 2022, finden Wartungsarbeiten am Gitlab-Server (Update auf neue Version statt). Der Dienst wird daher am Montag für einige Zeit nicht verfügbar sein.
On Monday, May 13th 2022, the Gitlab server will be updated. The service will therefore not be accessible for some time on Monday.

CMakeLists.txt 4.29 KB
Newer Older
1
2
3
project("amdis_demo")
cmake_minimum_required(VERSION 2.8)

Thomas Witkowski's avatar
Thomas Witkowski committed
4
5
#find_package(AMDIS REQUIRED COMPONENTS umfpack )
find_package(AMDIS REQUIRED)
6

Thomas Witkowski's avatar
Thomas Witkowski committed
7
if(AMDIS_FOUND)
8
	message("amdis was found\n")
Thomas Witkowski's avatar
Thomas Witkowski committed
9
10
11
	include(${AMDIS_USE_FILE})
	SET(BASIS_LIBS ${AMDIS_LIBRARIES})
endif(AMDIS_FOUND)
12

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
set(ball src/ball.cc)
set(bunny src/bunny.cc)
set(ellipt src/ellipt.cc)
set(heat src/heat.cc)
set(neumann src/neumann.cc)
set(nonlin src/nonlin.cc)
set(parametric src/parametric.cc)
set(periodic src/periodic.cc)
set(sphere src/sphere.cc)
set(torus src/torus.cc)
set(vecellipt src/vecellipt.cc)
set(vecheat src/vecheat.cc)

add_executable("ball" ${ball})
target_link_libraries("ball" ${BASIS_LIBS})
28
install(TARGETS ball RUNTIME DESTINATION bin)
Praetorius, Simon's avatar
Praetorius, Simon committed
29

30
31
add_executable("bunny" ${bunny})
target_link_libraries("bunny" ${BASIS_LIBS})
32
install(TARGETS bunny RUNTIME DESTINATION bin)
Praetorius, Simon's avatar
Praetorius, Simon committed
33

34
35
add_executable("ellipt" ${ellipt})
target_link_libraries("ellipt" ${BASIS_LIBS})
36
install(TARGETS ellipt RUNTIME DESTINATION bin)
37
38
39

add_executable("heat" ${heat})
target_link_libraries("heat" ${BASIS_LIBS})
40
install(TARGETS heat RUNTIME DESTINATION bin)
41
42
43

add_executable("neumann" ${neumann})
target_link_libraries("neumann" ${BASIS_LIBS})
44
install(TARGETS neumann RUNTIME DESTINATION bin)
45
46
47

add_executable("nonlin" ${nonlin})
target_link_libraries("nonlin" ${BASIS_LIBS})
48
install(TARGETS nonlin ball RUNTIME DESTINATION bin)
49
50
51

add_executable("parametric" ${parametric})
target_link_libraries("parametric" ${BASIS_LIBS})
52
install(TARGETS parametric RUNTIME DESTINATION bin)
53
54
55

add_executable("periodic" ${periodic})
target_link_libraries("periodic" ${BASIS_LIBS})
56
install(TARGETS periodic RUNTIME DESTINATION bin)
57
58
59

add_executable("sphere" ${sphere})
target_link_libraries("sphere" ${BASIS_LIBS})
60
install(TARGETS sphere RUNTIME DESTINATION bin)
61
62
63

add_executable("torus" ${torus})
target_link_libraries("torus" ${BASIS_LIBS})
64
install(TARGETS torus RUNTIME DESTINATION bin)
65
66
67

add_executable("vecellipt" ${vecellipt})
target_link_libraries("vecellipt" ${BASIS_LIBS})
68
install(TARGETS vecellipt RUNTIME DESTINATION bin)
69
70
71

add_executable("vecheat" ${vecheat})
target_link_libraries("vecheat" ${BASIS_LIBS})
72
install(TARGETS vecheat RUNTIME DESTINATION bin)
73

Praetorius, Simon's avatar
Praetorius, Simon committed
74
# find tools-directory
Praetorius, Simon's avatar
Praetorius, Simon committed
75
find_path(TOOLS_DIR NAMES "baseProblem/BaseProblem.h" "misc/Helpers.h" DOC "Path to tools directory in AMDiS-trunk dir" )
Praetorius, Simon's avatar
Praetorius, Simon committed
76
if (TOOLS_DIR)
Praetorius, Simon's avatar
Praetorius, Simon committed
77
  if (NOT EXISTS ${TOOLS_DIR}/misc/Helpers.h OR NOT EXISTS ${TOOLS_DIR}/baseProblems/BaseProblem.h)
Praetorius, Simon's avatar
Praetorius, Simon committed
78
79
80
81
82
    message(WARNING "Wrong tools directory! Directory must contain the subdirectories 'diffuseDomain' and 'baseProblems'")
  else()

    include_directories(${TOOLS_DIR}/diffuseDomain)
    include_directories(${TOOLS_DIR}/baseProblems)
Praetorius, Simon's avatar
Praetorius, Simon committed
83
    include_directories(${TOOLS_DIR}/misc)
Praetorius, Simon's avatar
Praetorius, Simon committed
84

Praetorius, Simon's avatar
Praetorius, Simon committed
85
86
87
88
89
90
91
    set(elliptBase src/elliptBaseProblem.cc)
    add_executable("elliptBase" ${elliptBase})
    target_link_libraries("elliptBase" ${BASIS_LIBS})

    set(elliptImplicit src/elliptImplicit.cc)
    add_executable("elliptImplicit" ${elliptImplicit})
    target_link_libraries("elliptImplicit" ${BASIS_LIBS})
Praetorius, Simon's avatar
Praetorius, Simon committed
92
93
94
95
96

    set(cahn_hilliard src/cahn_hilliard.cc ${TOOLS_DIR}/baseProblems/CahnHilliard.cc)
    add_executable("cahn_hilliard" ${cahn_hilliard})
    target_link_libraries("cahn_hilliard" ${BASIS_LIBS})

Praetorius, Simon's avatar
Praetorius, Simon committed
97
    set(pfc src/pfc.cc ${TOOLS_DIR}/baseProblems/PhaseFieldCrystal_Base.cc  ${TOOLS_DIR}/misc/Helpers.cc)
Praetorius, Simon's avatar
Praetorius, Simon committed
98
99
100
    add_executable("pfc" ${pfc})
    target_link_libraries("pfc" ${BASIS_LIBS})

Praetorius, Simon's avatar
Praetorius, Simon committed
101
102
103
104
105
106
107
    set(drivenCavity ${TOOLS_DIR}/diffuseDomain/POperators.cc
		    ${TOOLS_DIR}/baseProblems/CahnHilliard.cc
		    ${TOOLS_DIR}/baseProblems/NavierStokes_TaylorHood.cc
		    src/chns/drivenCavity.cc)
    add_executable("drivenCavity" ${drivenCavity})
    target_link_libraries("drivenCavity" ${BASIS_LIBS})

Praetorius, Simon's avatar
Praetorius, Simon committed
108
109
110
111
112
113
114
115
116
117
    include_directories(/home/spraetor/projects/src/common)
    set(navierStokes ${TOOLS_DIR}/diffuseDomain/POperators.cc
# 		    ${TOOLS_DIR}/baseProblems/NavierStokes_TaylorHood.cc
		    ${TOOLS_DIR}/baseProblems/NavierStokes_TaylorHood_RB.cc
		    ${TOOLS_DIR}/baseProblems/time/ExtendedRosenbrockStationary.cc
		    /home/spraetor/projects/src/common/GeometryTools.cc
		    src/navierStokes.cc)
    add_executable("navierStokes" ${navierStokes})
    target_link_libraries("navierStokes" ${BASIS_LIBS})

Praetorius, Simon's avatar
Praetorius, Simon committed
118
119
120
121
122
  endif()
else()
    message(WARNING "No tools directory specified! Some demos will not be build.")
endif(TOOLS_DIR)

123
#create the output dir
124
# file(MAKE_DIRECTORY output)