Commit b449c2dc authored by Nicolas Schwenck's avatar Nicolas Schwenck
Browse files

[release] created tag 2.8.0


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/tags/2.8.0@15543 2fb0f335-1f38-0410-981e-8018bf24f1b0
parents d7502b57 55c18350
# build system clutter
Makefile.in
Makefile
.deps/
.libs/
aclocal*
depcomp
dependencies.m4
am
autom4*
dumux.pc
dumux-devel.pc
install-sh
libtool
ltmain
missing
stamp-h1
config.*
configure
# auto-generated doxygen files
Doxyfile
Doxyfile.in
doc/doxygen/html
# auto-saved files
*~
# left overs from git rebase
*.orig
*.rej
# object files
*.o
*.lo
*.la
# ignore CSV files which are usually auto generated
# from some simulation results
*.csv
# latex clutter from dumux handbook
*.pdf
*.aux
*.blg
*.log
*.bbl
*.dvi
*.idx
*.out
*.toc
# simulation results and restart files
*.pvd
*.vtu
*.pvtu
*.vtp
*.drs
# exclude test binaries
test_*
tutorial_coupled
tutorial_decoupled
# always consider files containing source code regardless of their name
!*.cc
!*.hh
!*.c
!*.h
!*.sh
!*.py
# but do not consider the autogenerated files ltmain.sh and config.h
ltmain.sh
config.h
# always consider reference solutions
!*reference.vtu
This diff is collapsed.
#############################################################
# This sets up the DumuxMacros for the current CMake module.
# Call DumuxSweep at the end of your CMake module in order to
# not pullute the namespace with unused variables
#############################################################
macro(DumuxSetup
CMakeModuleName
ModuleName
Framework)
#############
# Set some internal variables which are used within
# the current CMake Module
set(DumuxModule ${CMakeModuleName})
set(DumuxModuleName ${ModuleName})
set(DumuxFramework ${Framework})
set(DumuxLibsFound 1)
set(DumuxLibraryNames)
set(DumuxFound 0)
set(DumuxPathMessage
"Set the ${DumuxModule}_DIR cmake cache entry to the directory
where the ${DumuxModuleName} libraries reside. Alternatively you can set
the ${DumuxFramework}_DIR entry where all ${DumuxFramework} sub-modules have been compiled.")
# Base path to look for libraries and includes
if(${DumuxModule}_DIR)
list(APPEND DumuxModulePath ${${DumuxModule}_DIR})
endif(${DumuxModule}_DIR)
if(${DumuxFramework}_DIR)
list(APPEND DumuxModulePath "${${DumuxFramework}_DIR}/${DumuxModuleName}")
endif(${DumuxFramework}_DIR)
# Path to look for includes (->DumuxIncludePath) and libraries (-> DumuxLibraryPath)
foreach(tmp ${DumuxModulePath})
list(APPEND DumuxIncludePath "${tmp}" "${tmp}/include")
list(APPEND DumuxLibraryPath "${tmp}" "${tmp}/lib")
endforeach(tmp)
list(APPEND DumuxIncludePath "/usr/include" "/usr/local/include")
list(APPEND DumuxLibraryPath "/usr/lib" "/usr/local/lib")
set(DumuxLibraries)
set(DumuxFailedLibraries)
endmacro(DumuxSetup)
#############################################################
# This adds some additional paths to the location where
# includes and libraries are searched
#############################################################
macro(DumuxAddPathSuffixes
IncludeSuffixes
LibSuffixes)
foreach(tmp ${DumuxModulePath})
# deal with the user defined library locations
foreach(foo ${LibSuffixes})
list(APPEND DumuxLibraryPath "${tmp}/${foo}")
endforeach(foo)
# deal with the user defined include locations
foreach(foo ${IncludeSuffixes})
list(APPEND DumuxIncludePath "${tmp}/${foo}")
endforeach(foo)
endforeach(tmp)
endmacro(DumuxAddPathSuffixes)
#############################################################
# Find a given library using some reasonable default
# search paths. Sets Dumux${LibName}_LIBRARY to the location
# where the library was found and extends the DumuxLibraries
# variable.
#############################################################
macro(DumuxFindLibrary LibName)
set(Lib ${DumuxModule}_${LibName}_LIBRARY)
find_library(${Lib}
${LibName}
PATHS ${DumuxLibraryPath}
PATH_SUFFIXES ".libs")
if(${Lib})
list(APPEND DumuxLibraries ${${Lib}})
list(APPEND DumuxLibraryNames ${LibName})
else(${Lib})
list(APPEND DumuxFailedLibraries ${LibName})
endif(${Lib})
endmacro(DumuxFindLibrary)
#############################################################
# Find a given header file using some reasonable default
# search paths.
#############################################################
macro(DumuxFindExtraIncludeDir VarName HeaderName)
set(Inc ${DumuxModule}_${VarName}_INCLUDE_DIR)
find_path(${Inc}
${HeaderName}
PATHS ${DumuxIncludePath})
if(${Inc})
list(APPEND ${DumuxModule}_INCLUDE_DIRS ${${Inc}})
list(APPEND DumuxIncludes ${Inc})
else(${Inc})
list(APPEND DumuxFailedIncludes ${HeaderName})
endif(${Inc})
endmacro(DumuxFindExtraIncludeDir)
macro(DumuxFindIncludeDir HeaderName)
set(Inc ${DumuxModule}_INCLUDE_DIR)
find_path(${Inc}
${HeaderName}
PATHS ${DumuxIncludePath})
if(${Inc})
list(APPEND ${DumuxModule}_INCLUDE_DIRS "${${Inc}}")
list(APPEND DumuxIncludes ${Inc})
else(${Inc})
list(APPEND DumuxFailedIncludes ${HeaderName})
endif(${Inc})
endmacro(DumuxFindIncludeDir)
macro(DumuxFindIncludeBaseDir HeaderName DirSuffix)
set(Inc ${DumuxModule}_INCLUDE_DIR)
find_path(${Inc}
${HeaderName}
PATHS ${DumuxIncludePath})
if(${Inc})
list(APPEND ${DumuxModule}_INCLUDE_DIRS "${${Inc}}/${DirSuffix}")
list(APPEND DumuxIncludes ${Inc})
else(${Inc})
list(APPEND DumuxFailedIncludes ${HeaderName})
endif(${Inc})
endmacro(DumuxFindIncludeBaseDir)
#############################################################
# Make sure the required libraries were found
#############################################################
macro(DumuxRequiredLibsFound)
set(DumuxLibsFound 1)
set(DumuxFailedLibsMessage "Could not find the required libraries ")
foreach(curLib ${ARGN})
set(curLibFound 0)
foreach(tmp ${DumuxLibraryNames})
if (tmp STREQUAL ${curLib})
set(curLibFound 1)
endif (tmp STREQUAL ${curLib})
endforeach(tmp)
if (NOT curLibFound)
set(DumuxLibsFound 0)
set(DumuxFailedLibsMessage "${DumuxFailedLibsMessage} '${curLib}'")
endif(NOT curLibFound)
endforeach(curLib)
endmacro(DumuxRequiredLibsFound)
#############################################################
# Make sure the required libraries were found
#############################################################
macro(DumuxIncludeDirsFound)
endmacro(DumuxIncludeDirsFound)
#############################################################
# Make sure everything required was found
#############################################################
macro(DumuxCheckFound)
# Set the global macros
set(DumuxFound 0)
if(DumuxLibsFound AND ${DumuxModule}_INCLUDE_DIR)
set(DumuxFound 1)
endif(DumuxLibsFound AND ${DumuxModule}_INCLUDE_DIR)
set(${DumuxModule}_FOUND ${DumuxFound})
set(${DumuxModule}_LIBRARIES ${DumuxLibraries})
# print status message if requested
if(NOT ${DumuxModule}_FIND_QUIETLY AND DumuxFound)
message(STATUS "Found ${DumuxModule}")
endif(NOT ${DumuxModule}_FIND_QUIETLY AND DumuxFound)
if(NOT DumuxFound AND ${DumuxModule}_FIND_REQUIRED)
if (DumuxLibsFound)
message(FATAL_ERROR "${DumuxPathMessage}")
else (DumuxLibsFound)
message(FATAL_ERROR "${DumuxPathMessage}
${DumuxFailedLibsMessage}")
endif( DumuxLibsFound)
endif(NOT DumuxFound AND ${DumuxModule}_FIND_REQUIRED)
endmacro(DumuxCheckFound)
# -*-cmake-*-
# - Try to find the UG grid manager
# Once done this will define:
# ALUGrid_FOUND - system has dune-grid
# UG_INCLUDE_DIR - incude paths to use dune-grid
# UG_LIBRARIES - Link these to use dune-grid
Include(DumuxMacros)
DumuxSetup("ALUGrid" "ALUGrid" "ALUGrid")
set(MyIncludeSuffixes
"include/serial"
"include/parallel"
"include/duneinterface")
DumuxAddPathSuffixes("${MyIncludeSuffixes}" "")
DumuxFindIncludeDir("alugrid_2d.h")
DumuxFindExtraIncludeDir("ALU_SERIAL" "serialize.h")
DumuxFindExtraIncludeDir("ALU_PARALLEL" "gitter_pll_impl.h")
DumuxFindExtraIncludeDir("ALU_DUNE" "gitter_dune_impl.h")
DumuxFindLibrary("alugrid")
DumuxRequiredLibsFound("alugrid")
DumuxIncludeDirsFound()
DumuxCheckFound()
# -*-cmake-*-
# - Try to find the Alberta grid manager
# Once done this will define:
# Alberta_FOUND - system has dune-grid
# Alberta_INCLUDE_DIR - incude paths to use dune-grid
# Alberta_LIBRARIES - Link these to use dune-grid
Include(DumuxMacros)
DumuxSetup("Alberta" "Alberta" "Alberta")
#DumuxAddPathSuffixes("${MyIncludeSuffixes}" "")
DumuxFindIncludeDir("alberta.h")
DumuxFindLibrary("ALBERTA22_0")
DumuxFindLibrary("ALBERTA22_1")
DumuxFindLibrary("alberta_util")
DumuxRequiredLibsFound("ALBERTA22_0" "ALBERTA22_1" "alberta_util")
DumuxIncludeDirsFound()
DumuxCheckFound()
# -*-cmake-*-
# - Try to find tje DUNE common library
# Once done this will define:
# DUNE_common_FOUND - system has dune-common
# DUNE_common_INCLUDE_DIR - incude paths to use dune-common
# DUNE_common_LIBRARIES - Link these to use dune-common
INCLUDE(DumuxMacros)
DumuxSetup("DUNE_common" "dune-common" "DUNE")
DumuxFindIncludeDir("dune/common/misc.hh")
DumuxFindLibrary("dunecommon")
DumuxRequiredLibsFound("dunecommon")
DumuxIncludeDirsFound()
DumuxCheckFound()
# -*-cmake-*-
# - Try to find tje DUNE grid library
# Once done this will define:
# Dune_grid_FOUND - system has dune-grid
# Dune_grid_INCLUDE_DIR - incude paths to use dune-grid
# Dune_grid_LIBRARIES - Link these to use dune-grid
INCLUDE(DumuxMacros)
DumuxSetup("DUNE_grid" "dune-grid" "DUNE")
DumuxFindIncludeDir("dune/grid/sgrid.hh")
DumuxFindLibrary("dunegrid")
DumuxRequiredLibsFound("dunegrid")
DumuxIncludeDirsFound()
DumuxCheckFound()
# -*-cmake-*-
# - Try to find tje DUNE istl library
# Once done this will define:
# DUNE_istl_FOUND - system has dune-istl
# DUNE_istl_INCLUDE_DIR - incude paths to use dune-istl
# DUNE_istl_LIBRARIES - Link these to use dune-istl
INCLUDE(DumuxMacros)
DumuxSetup("DUNE_istl" "dune-istl" "DUNE")
DumuxFindIncludeDir("dune/istl/io.hh")
DumuxRequiredLibsFound()
DumuxIncludeDirsFound()
DumuxCheckFound()
# -*-cmake-*-
# - Try to find the DUNE localfunctions library
# Once done this will define:
# DUNE_localfunctions_FOUND - system has dune-localfunctions
# DUNE_localfunctions_INCLUDE_DIR - incude paths to use dune-localfunctions
# DUNE_localfunctions_LIBRARIES - Link these to use dune-localfunctions
INCLUDE(DumuxMacros)
DumuxSetup("DUNE_localfunctions" "dune-localfunctions" "DUNE")
DumuxFindIncludeDir("dune/localfunctions/lagrange.hh")
DumuxRequiredLibsFound()
DumuxIncludeDirsFound()
DumuxCheckFound()
# -*-cmake-*-
# Try to find the DUMUX library
# Once done this will define:
# DUNE_mux_FOUND - system has dune-mux
# DUNE_mux_INCLUDE_DIR - incude paths to use dune-mux
# DUNE_mux_LIBRARIES - Link these to use dune-mux
INCLUDE(DumuxMacros)
DumuxSetup("DUNE_mux" "dune-mux" "DUNE")
set(MyLibSuffixes
"dumux"
"dumux/shapefunctions"
"dumux/onedinndgrid")
DumuxAddPathSuffixes("" "${MyLibSuffixes}" )
#DumuxFindIncludeBaseDir("dumux/material/twophaserelations.hh" "..")
DumuxFindIncludeDir("dumux/material/twophaserelations.hh")
DumuxFindLibrary("dumux")
DumuxRequiredLibsFound("dumux")
DumuxIncludeDirsFound()
DumuxCheckFound()
# -*-cmake-*-
# - Try to find the DUNE pdelab library
# Once done this will define:
# DUNE_pdelab_FOUND - system has dune-pdelab
# DUNE_pdelab_INCLUDE_DIR - incude paths to use dune-pdelab
# DUNE_pdelab_LIBRARIES - Link these to use dune-pdelab
INCLUDE(DumuxMacros)
DumuxSetup("DUNE_pdelab" "dune-pdelab" "DUNE")
DumuxFindIncludeDir("dune/pdelab/common/function.hh")
DumuxRequiredLibsFound()
DumuxIncludeDirsFound()
DumuxCheckFound()
# -*-cmake-*-
# - Try to find the libMETIS graph partioning library
# Once done this will define:
# METIS_FOUND - system has the libMETIS graph partioning library
# METIS_INCLUDE_DIR - incude paths to use libMETIS
# METIS_LIBRARIES - Link these to use libMETIS
Include(DumuxMacros)
DumuxSetup("METIS" "METIS" "METIS")
set(MyIncludeSuffixes "METISLib")
#set(MyLibSuffixes "build/Linux-x86_64/" "build/Linux-i686/" "GKlib/builds/Linux-x86_64/" "GKlib/builds/Linux-i686/")
DumuxAddPathSuffixes("${MyIncludeSuffixes}" "${MyLibSuffixes}")
#DumuxAddPathSuffixes("${MyIncludeSuffixes}" "")
DumuxFindIncludeDir("parmetis.h")
DumuxFindLibrary("parmetis")
#DumuxFindLibrary("GKlib")
#DumuxRequiredLibsFound("metis" "GKlib")
DumuxRequiredLibsFound("parmetis")
DumuxIncludeDirsFound()
DumuxCheckFound()
# - Message Passing Interface (MPI) module.
#
# The Message Passing Interface (MPI) is a library used to write
# high-performance parallel applications that use message passing, and
# is typically deployed on a cluster. MPI is a standard interface
# (defined by the MPI forum) for which many implementations are
# available. All of these implementations have somewhat different
# compilation approaches (different include paths, libraries to link
# against, etc.), and this module tries to smooth out those differences.
#
# This module will set the following variables:
# MPI_FOUND TRUE if we have found MPI
# MPI_COMPILE_FLAGS Compilation flags for MPI programs
# MPI_INCLUDE_PATH Include path(s) for MPI header
# MPI_LINK_FLAGS Linking flags for MPI programs
# MPI_LIBRARY First MPI library to link against (cached)
# MPI_EXTRA_LIBRARY Extra MPI libraries to link against (cached)
# MPI_LIBRARIES All libraries to link MPI programs against
# MPIEXEC Executable for running MPI programs
# MPIEXEC_NUMPROC_FLAG Flag to pass to MPIEXEC before giving it the
# number of processors to run on
# MPIEXEC_PREFLAGS Flags to pass to MPIEXEC directly before the
# executable to run.
# MPIEXEC_POSTFLAGS Flags to pass to MPIEXEC after all other flags.
#
# This module will attempt to auto-detect these settings, first by
# looking for a MPI compiler, which many MPI implementations provide
# as a pass-through to the native compiler to simplify the compilation
# of MPI programs. The MPI compiler is stored in the cache variable
# MPI_COMPILER, and will attempt to look for commonly-named drivers
# mpic++, mpicxx, mpiCC, or mpicc. If the compiler driver is found and
# recognized, it will be used to set all of the module variables. To
# skip this auto-detection, set MPI_LIBRARY and MPI_INCLUDE_PATH in
# the CMake cache.
#
# If no compiler driver is found or the compiler driver is not
# recognized, this module will then search for common include paths
# and library names to try to detect MPI.
#
# If CMake initially finds a different MPI than was intended, and you
# want to use the MPI compiler auto-detection for a different MPI
# implementation, set MPI_COMPILER to the MPI compiler driver you want
# to use (e.g., mpicxx) and then set MPI_LIBRARY to the string
# MPI_LIBRARY-NOTFOUND. When you re-configure, auto-detection of MPI
# will run again with the newly-specified MPI_COMPILER.
#
# When using MPIEXEC to execute MPI applications, you should typically
# use all of the MPIEXEC flags as follows:
# ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} PROCS ${MPIEXEC_PREFLAGS} EXECUTABLE
# ${MPIEXEC_POSTFLAGS} ARGS
# where PROCS is the number of processors on which to execute the program,
# EXECUTABLE is the MPI program, and ARGS are the arguments to pass to the
# MPI program.
# Try to find the MPI driver program
find_program(MPI_COMPILER
NAMES mpicxx mpiCC mpicc mpic++
DOC "MPI compiler. Used only to detect MPI compilation flags.")
mark_as_advanced(MPI_COMPILER)
find_program(MPIEXEC
NAMES mpiexec mpirun lamexec
DOC "Executable for running MPI programs.")
set(MPIEXEC_NUMPROC_FLAG "-np" CACHE STRING "Flag used by MPI to specify the number of processes for MPIEXEC; the next option will be the number of processes.")
set(MPIEXEC_PREFLAGS "" CACHE STRING "These flags will be directly before the executable that is being run by MPIEXEC.")
set(MPIEXEC_POSTFLAGS "" CACHE STRING "These flags will come after all flags given to MPIEXEC.")
set(MPIEXEC_MAX_NUMPROCS "2" CACHE STRING "Maximum number of processors available to run MPI applications.")
mark_as_advanced(MPIEXEC MPIEXEC_NUMPROC_FLAG MPIEXEC_PREFLAGS
MPIEXEC_POSTFLAGS MPIEXEC_MAX_NUMPROCS)
if (MPI_INCLUDE_PATH AND MPI_LIBRARY)
# Do nothing: we already have MPI_INCLUDE_PATH and MPI_LIBRARY in
# the cache, and we don't want to override those settings.
elseif (MPI_COMPILER)
# Check whether the -showme:compile option works. This indicates
# that we have either Open MPI or a newer version of LAM-MPI, and
# implies that -showme:link will also work.
exec_program(${MPI_COMPILER}
ARGS -showme:compile
OUTPUT_VARIABLE MPI_COMPILE_CMDLINE
RETURN_VALUE MPI_COMPILER_RETURN)
if (MPI_COMPILER_RETURN EQUAL 0)
# If we appear to have -showme:compile, then we should also have
# -showme:link. Try it.
exec_program(${MPI_COMPILER}
ARGS -showme:link
OUTPUT_VARIABLE MPI_LINK_CMDLINE
RETURN_VALUE MPI_COMPILER_RETURN)
# Note that we probably have -showme:incdirs and -showme:libdirs
# as well.
set(MPI_COMPILER_MAY_HAVE_INCLIBDIRS TRUE)
endif (MPI_COMPILER_RETURN EQUAL 0)
if (MPI_COMPILER_RETURN EQUAL 0)
# Do nothing: we have our command lines now
else (MPI_COMPILER_RETURN EQUAL 0)
# Older versions of LAM-MPI have "-showme". Try it.
exec_program(${MPI_COMPILER}
ARGS -showme
OUTPUT_VARIABLE MPI_COMPILE_CMDLINE
RETURN_VALUE MPI_COMPILER_RETURN)
endif (MPI_COMPILER_RETURN EQUAL 0)
if (MPI_COMPILER_RETURN EQUAL 0)
# Do nothing: we have our command lines now
else (MPI_COMPILER_RETURN EQUAL 0)
# MPICH uses "-compile-info". Try it.
exec_program(${MPI_COMPILER}
ARGS -compile-info
OUTPUT_VARIABLE MPI_COMPILE_CMDLINE
RETURN_VALUE MPI_COMPILER_RETURN)
endif (MPI_COMPILER_RETURN EQUAL 0)
if (MPI_COMPILER_RETURN EQUAL 0)
# We have our command lines, but we might need to copy
# MPI_COMPILE_CMDLINE into MPI_LINK_CMDLINE, if the underlying
if (NOT MPI_LINK_CMDLINE)
# MPICH uses "-link-info". Try it.
exec_program(${MPI_COMPILER}
ARGS -link-info
OUTPUT_VARIABLE MPI_LINK_CMDLINE
RETURN_VALUE MPI_COMPILER_RETURN)
if (NOT MPI_COMPILER_RETURN EQUAL 0)
message(STATUS "Unable to determine MPI from MPI driver ${MPI_COMPILER}")
endif (NOT MPI_COMPILER_RETURN EQUAL 0)
endif (NOT MPI_LINK_CMDLINE)
else (MPI_COMPILER_RETURN EQUAL 0)
message(STATUS "Unable to determine MPI from MPI driver ${MPI_COMPILER}")
endif (MPI_COMPILER_RETURN EQUAL 0)
endif (MPI_INCLUDE_PATH AND MPI_LIBRARY)
if (MPI_INCLUDE_PATH AND MPI_LIBRARY)
# Do nothing: we already have MPI_INCLUDE_PATH and MPI_LIBRARY in
# the cache, and we don't want to override those settings.
elseif (MPI_COMPILE_CMDLINE)
# Extract compile flags from the compile command line.
string(REGEX MATCHALL "-D([^\" ]+|\"[^\"]+\")" MPI_ALL_COMPILE_FLAGS "${MPI_COMPILE_CMDLINE}")
set(MPI_COMPILE_FLAGS_WORK)
foreach(FLAG ${MPI_ALL_COMPILE_FLAGS})
if (MPI_COMPILE_FLAGS_WORK)
set(MPI_COMPILE_FLAGS_WORK "${MPI_COMPILE_FLAGS_WORK} ${FLAG}")
else(MPI_COMPILE_FLAGS_WORK)
set(MPI_COMPILE_FLAGS_WORK ${FLAG})
endif(MPI_COMPILE_FLAGS_WORK)
endforeach(FLAG)
# Extract include paths from compile command line
string(REGEX MATCHALL "-I([^\" ]+|\"[^\"]+\")" MPI_ALL_INCLUDE_PATHS "${MPI_COMPILE_CMDLINE}")
set(MPI_INCLUDE_PATH_WORK)
foreach(IPATH ${MPI_ALL_INCLUDE_PATHS})
string(REGEX REPLACE "^-I" "" IPATH ${IPATH})
string(REGEX REPLACE "//" "/" IPATH ${IPATH})
list(APPEND MPI_INCLUDE_PATH_WORK ${IPATH})
endforeach(IPATH)
if (NOT MPI_INCLUDE_PATH_WORK)
if (MPI_COMPILER_MAY_HAVE_INCLIBDIRS)