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
|
# This file is part of the OpenLB library
#
# Copyright (C) 2007, 2017 Markus Mohrhard, Mathias Krause
# E-mail contact: info@openlb.net
# The most recent release of OpenLB can be downloaded at
# <http://www.openlb.net/>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
###########################################################################
###########################################################################
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
include $(dir $(mkfile_path))/config.mk
###########################################################################
## conditional settings
ifeq ($(BUILDTYPE), precompiled)
CXXFLAGS := -DOLB_PRECOMPILED $(CXXFLAGS)
endif
ifeq ($(PARALLEL_MODE), MPI)
CXXFLAGS := -DPARALLEL_MODE_MPI $(MPIFLAGS) $(CXXFLAGS)
endif
ifeq ($(PARALLEL_MODE), OMP)
CXXFLAGS := -DPARALLEL_MODE_OMP $(OMPFLAGS) $(CXXFLAGS)
LDFLAGS := $(OMPFLAGS) $(LDFLAGS)
endif
ifeq ($(PARALLEL_MODE), HYBRID)
CXXFLAGS := -DPARALLEL_MODE_OMP -DPARALLEL_MODE_MPI $(OMPFLAGS) $(MPIFLAGS) $(CXXFLAGS)
LDFLAGS := $(OMPFLAGS) $(LDFLAGS)
endif
LDFLAGS += $(if $(filter $(FEATURES), OPENBLAS),-lopenblas)
CXXFLAGS += $(foreach feature,$(FEATURES),-DFEATURE_$(feature))
###########################################################################
## defines shell
SHELL := /bin/sh
###########################################################################
## dependencies, object, library directory and library name
DEPENDDIR := build/$(BUILDTYPE)/dep
OBJDIR := build/$(BUILDTYPE)/obj
LIBDIR := build/$(BUILDTYPE)/lib
LIB := olb
LIBS := -l$(LIB) -lz
###########################################################################
## search directories
SUBDIRS := src/boundary \
src/communication \
src/dynamics \
src/core \
src/geometry \
src/external/tinyxml \
src/external/zlib \
src/functors \
src/functors/analytical \
src/functors/analytical/indicator \
src/functors/lattice \
src/functors/lattice/indicator \
src/functors/lattice/integral \
src/io \
src/particles \
src/particles/forces \
src/particles/boundaries \
src/utilities \
EXAMPLEDIRS := examples/laminar/bstep2d \
examples/laminar/bstep3d \
examples/laminar/cavity2d/sequential \
examples/laminar/cavity2d/parallel \
examples/laminar/cavity3d/sequential \
examples/laminar/cavity3d/parallel \
examples/laminar/cylinder2d \
examples/laminar/cylinder3d \
examples/laminar/poiseuille2d \
examples/laminar/poiseuille3d \
examples/laminar/powerLaw2d \
examples/multiComponent/contactAngle2d \
examples/multiComponent/contactAngle3d \
examples/multiComponent/microFluidics2d \
examples/multiComponent/phaseSeparation2d \
examples/multiComponent/phaseSeparation3d \
examples/multiComponent/rayleighTaylor2d \
examples/multiComponent/rayleighTaylor3d \
examples/multiComponent/youngLaplace2d \
examples/multiComponent/youngLaplace3d \
examples/particles/bifurcation3d/eulerEuler \
examples/particles/bifurcation3d/eulerLagrange \
examples/particles/dkt2d \
examples/particles/magneticParticles3d \
examples/particles/settlingCube3d \
examples/porousMedia/porousPoiseuille2d \
examples/porousMedia/porousPoiseuille3d \
examples/thermal/porousPlate2d \
examples/thermal/porousPlate3d \
examples/thermal/rayleighBenard2d \
examples/thermal/rayleighBenard3d \
examples/thermal/squareCavity2d \
examples/thermal/squareCavity3d \
examples/turbulence/aorta3d \
examples/turbulence/nozzle3d \
examples/turbulence/tgv3d \
examples/turbulence/venturi3d \
INCLUDEDIRS := src \
src/ \
src/external \
src/external/zlib
BUILDTYPEDIRS := build/precompiled \
build/generic
IDIR := $(foreach d,$(INCLUDEDIRS),-I$(ROOT)/$(d))
|