From d7f6f7ae69518cf7b07e849bc6d952a967599606 Mon Sep 17 00:00:00 2001 From: Bernd Flemisch <bernd@iws.uni-stuttgart.de> Date: Tue, 26 Oct 2010 15:06:32 +0000 Subject: [PATCH] removed unnecessary compiler options from several CMakeLists.txt git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@4535 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- CMake/Modules/FindMETIS.cmake | 10 ++-- CMakeLists.txt | 66 ++++++++++----------- dumux/nonlinear/newtoncontroller.hh | 1 - dumux/nonlinear/newtonmethod.hh | 4 +- test/boxmodels/1p/1ptestproblem.hh | 6 +- test/boxmodels/1p/CMakeLists.txt | 2 - test/boxmodels/1p2c/CMakeLists.txt | 2 - test/boxmodels/1p2c/tissue_tumor_problem.hh | 2 + test/boxmodels/2p2c/CMakeLists.txt | 2 - test/boxmodels/2p2cni/CMakeLists.txt | 2 - test/boxmodels/2pni/CMakeLists.txt | 2 - test/boxmodels/richards/CMakeLists.txt | 2 - 12 files changed, 48 insertions(+), 53 deletions(-) diff --git a/CMake/Modules/FindMETIS.cmake b/CMake/Modules/FindMETIS.cmake index bf4db205f6..05fbc3a237 100644 --- a/CMake/Modules/FindMETIS.cmake +++ b/CMake/Modules/FindMETIS.cmake @@ -11,14 +11,14 @@ 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}" "") +DumuxAddPathSuffixes("${MyIncludeSuffixes}" "${MyLibSuffixes}") +#DumuxAddPathSuffixes("${MyIncludeSuffixes}" "") -DumuxFindIncludeDir("metis.h") -DumuxFindLibrary("metis") +DumuxFindIncludeDir("parmetis.h") +DumuxFindLibrary("parmetis") #DumuxFindLibrary("GKlib") #DumuxRequiredLibsFound("metis" "GKlib") -DumuxRequiredLibsFound("metis") +DumuxRequiredLibsFound("parmetis") DumuxIncludeDirsFound() DumuxCheckFound() diff --git a/CMakeLists.txt b/CMakeLists.txt index 1243b78e2e..f50c902096 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,9 +37,9 @@ FIND_PACKAGE(Boost REQUIRED) ############## # Find the optional packages FIND_PACKAGE(MPI) -FIND_PACKAGE(UG) +#FIND_PACKAGE(UG) FIND_PACKAGE(ALUGrid) -#FIND_PACKAGE(METIS REQUIRED) +FIND_PACKAGE(METIS) #FIND_PACKAGE(Alberta) ############## @@ -86,7 +86,7 @@ add_definitions("-std=c++0x -Wall -Wno-sign-compare --no-strict-aliasing") if(CMAKE_BUILD_TYPE STREQUAL "debug") # debug mode add_definitions("-g") - add_definitions(-DDEBUG -DDUNE_DEVEL_MODE=1 -DDUNE_ISTL_WITH_CHECKING) +# add_definitions(-DDEBUG -DDUNE_DEVEL_MODE=1 -DDUNE_ISTL_WITH_CHECKING) else(CMAKE_BUILD_TYPE STREQUAL "debug") # Release mode add_definitions("-O3 -march=native") @@ -122,40 +122,40 @@ SetConfigHVar(PROJECT_MAINTAINER_EMAIL ProjectMaintainerEmail) # adapt build system to detected packages # deal with UG -if (UG_FOUND) - set(DumuxLinkLibraries ${DumuxLinkLibraries} - ${UG_LIBRARIES}) - set(DumuxIncludeDirectories ${DumuxIncludeDirectories} - ${UG_INCLUDE_DIRS}) -endif(UG_FOUND) -SetConfigHVar(HAVE_UG UG_FOUND) +#if (UG_FOUND) +# set(DumuxLinkLibraries ${DumuxLinkLibraries} +# ${UG_LIBRARIES}) +# set(DumuxIncludeDirectories ${DumuxIncludeDirectories} +# ${UG_INCLUDE_DIRS}) +#endif(UG_FOUND) +#SetConfigHVar(HAVE_UG UG_FOUND) # deal with ALUGrid -if (ALUGrid_FOUND) - set(DumuxLinkLibraries ${DumuxLinkLibraries} - ${ALUGrid_LIBRARIES}) - set(DumuxIncludeDirectories ${DumuxIncludeDirectories} - ${ALUGrid_INCLUDE_DIRS}) -endif(ALUGrid_FOUND) -SetConfigHVar(HAVE_ALUGRID ALUGrid_FOUND) +#if (ALUGrid_FOUND) +# set(DumuxLinkLibraries ${DumuxLinkLibraries} +# ${ALUGrid_LIBRARIES}) +# set(DumuxIncludeDirectories ${DumuxIncludeDirectories} +# ${ALUGrid_INCLUDE_DIRS}) +#endif(ALUGrid_FOUND) +#SetConfigHVar(HAVE_ALUGRID ALUGrid_FOUND) # deal with METIS -if (METIS_FOUND) - set(DumuxLinkLibraries ${DumuxLinkLibraries} - ${METIS_LIBRARIES}) - set(DumuxIncludeDirectories ${DumuxIncludeDirectories} - ${METIS_INCLUDE_DIRS}) -endif(METIS_FOUND) -SetConfigHVar(HAVE_METIS METIS_FOUND) +#if (METIS_FOUND) +# set(DumuxLinkLibraries ${DumuxLinkLibraries} +# ${METIS_LIBRARIES}) +# set(DumuxIncludeDirectories ${DumuxIncludeDirectories} +# ${METIS_INCLUDE_DIRS}) +#endif(METIS_FOUND) +#SetConfigHVar(HAVE_METIS METIS_FOUND) # deal with Alberta -if (Alberta_FOUND) - set(DumuxLinkLibraries ${DumuxLinkLibraries} - ${Alberta_LIBRARIES}) - set(DumuxIncludeDirectories ${DumuxIncludeDirectories} - ${Alberta_INCLUDE_DIRS}) -endif(Alberta_FOUND) -SetConfigHVar(HAVE_ALBERTA Alberta_FOUND) +#if (Alberta_FOUND) +# set(DumuxLinkLibraries ${DumuxLinkLibraries} +# ${Alberta_LIBRARIES}) +# set(DumuxIncludeDirectories ${DumuxIncludeDirectories} +# ${Alberta_INCLUDE_DIRS}) +#endif(Alberta_FOUND) +#SetConfigHVar(HAVE_ALBERTA Alberta_FOUND) ############## if (MPI_FOUND) @@ -163,7 +163,7 @@ if (MPI_FOUND) separate_arguments(TMP) add_definitions(${TMP}) add_definitions(-DENABLE_MPI=1) - add_definitions(-DModelP) # tell UG that the model is parallelized +# add_definitions(-DModelP) # tell UG that the model is parallelized set(DumuxLinkLibraries ${DumuxLinkLibraries} ${MPI_LIBRARIES}) set(DumuxIncludeDirectories ${DumuxIncludeDirectories} ${MPI_INCLUDE_PATH}) @@ -172,7 +172,7 @@ endif (MPI_FOUND) # actually write the config.h file to disk configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h ) -add_definitions(-DHAVE_CONFIG_H -DDUNE_ENABLE_OLD_NUMBERING) +#add_definitions(-DHAVE_CONFIG_H) ############## # tell cmake that we've got a few subdirectories. (that's the diff --git a/dumux/nonlinear/newtoncontroller.hh b/dumux/nonlinear/newtoncontroller.hh index ecc43f909d..f82b3f5532 100644 --- a/dumux/nonlinear/newtoncontroller.hh +++ b/dumux/nonlinear/newtoncontroller.hh @@ -212,7 +212,6 @@ class NewtonController enum { enableTimeStepRampUp = GET_PROP_VALUE(TypeTag, PTAG(EnableTimeStepRampUp)) }; enum { enablePartialReassemble = GET_PROP_VALUE(TypeTag, PTAG(EnablePartialReassemble)) }; - enum { Red = JacobianAssembler::Red }; // class to keep track of the most offending vertices in a way // compatible with std::priority_queue diff --git a/dumux/nonlinear/newtonmethod.hh b/dumux/nonlinear/newtonmethod.hh index 0118019ae6..fdbe457f5e 100644 --- a/dumux/nonlinear/newtonmethod.hh +++ b/dumux/nonlinear/newtonmethod.hh @@ -60,7 +60,9 @@ class NewtonMethod typedef typename GET_PROP_TYPE(TypeTag, PTAG(JacobianAssembler)) JacobianAssembler; public: NewtonMethod(Problem &problem) - : problem_(problem) + : uOld_(problem.model().curSol()), + residual_(problem.model().curSol()), + problem_(problem) { } /*! diff --git a/test/boxmodels/1p/1ptestproblem.hh b/test/boxmodels/1p/1ptestproblem.hh index f77bacbcb6..8f552b45a9 100644 --- a/test/boxmodels/1p/1ptestproblem.hh +++ b/test/boxmodels/1p/1ptestproblem.hh @@ -17,10 +17,14 @@ #ifndef DUMUX_1PTEST_PROBLEM_HH #define DUMUX_1PTEST_PROBLEM_HH +#ifdef HAVE_UG #include <dune/grid/io/file/dgfparser/dgfug.hh> +#endif +#ifdef HAVE_ALUGRID +#include <dune/grid/io/file/dgfparser/dgfalu.hh> +#endif #include <dune/grid/io/file/dgfparser/dgfs.hh> #include <dune/grid/io/file/dgfparser/dgfyasp.hh> -#include <dune/grid/io/file/dgfparser/dgfalu.hh> #include <dune/grid/io/file/gmshreader.hh> #include <dumux/boxmodels/1p/1pmodel.hh> diff --git a/test/boxmodels/1p/CMakeLists.txt b/test/boxmodels/1p/CMakeLists.txt index b2dc4c2f8c..0f1ffb7146 100644 --- a/test/boxmodels/1p/CMakeLists.txt +++ b/test/boxmodels/1p/CMakeLists.txt @@ -1,5 +1,3 @@ -add_definitions(-DYASPGRID -DENABLE_ALBERTA -DENABLE_ALUGRID -DENABLE_UG) - # build target for the onephase-onecomponent test problem ADD_EXECUTABLE("test_1p" test_1p.cc) TARGET_LINK_LIBRARIES("test_1p" ${DumuxLinkLibraries}) diff --git a/test/boxmodels/1p2c/CMakeLists.txt b/test/boxmodels/1p2c/CMakeLists.txt index 156f2f8347..e600c7d807 100644 --- a/test/boxmodels/1p2c/CMakeLists.txt +++ b/test/boxmodels/1p2c/CMakeLists.txt @@ -1,5 +1,3 @@ -add_definitions(-DYASPGRID -DENABLE_ALBERTA -DENABLE_ALUGRID -DENABLE_UG) - ADD_EXECUTABLE("test_1p2c" test_1p2c.cc) TARGET_LINK_LIBRARIES("test_1p2c" ${DumuxLinkLibraries}) diff --git a/test/boxmodels/1p2c/tissue_tumor_problem.hh b/test/boxmodels/1p2c/tissue_tumor_problem.hh index b80077bf86..7ff8570cb0 100644 --- a/test/boxmodels/1p2c/tissue_tumor_problem.hh +++ b/test/boxmodels/1p2c/tissue_tumor_problem.hh @@ -24,7 +24,9 @@ #ifndef DUMUX_TISSUE_TUMOR_PROBLEM_HH #define DUMUX_TISSUE_TUMOR_PROBLEM_HH +#ifdef HAVE_UG #include <dune/grid/io/file/dgfparser/dgfug.hh> +#endif #include <dune/grid/io/file/dgfparser/dgfs.hh> #include <dune/grid/io/file/dgfparser/dgfyasp.hh> diff --git a/test/boxmodels/2p2c/CMakeLists.txt b/test/boxmodels/2p2c/CMakeLists.txt index ad33076f53..9faa5f7802 100644 --- a/test/boxmodels/2p2c/CMakeLists.txt +++ b/test/boxmodels/2p2c/CMakeLists.txt @@ -1,5 +1,3 @@ -add_definitions(-DYASPGRID -DENABLE_ALBERTA -DENABLE_ALUGRID -DENABLE_UG) - # build target for the twophase-twocomponent test problem ADD_EXECUTABLE("test_2p2c" test_2p2c.cc) TARGET_LINK_LIBRARIES("test_2p2c" ${DumuxLinkLibraries}) diff --git a/test/boxmodels/2p2cni/CMakeLists.txt b/test/boxmodels/2p2cni/CMakeLists.txt index c4f52acea6..b88b7db7f3 100644 --- a/test/boxmodels/2p2cni/CMakeLists.txt +++ b/test/boxmodels/2p2cni/CMakeLists.txt @@ -1,5 +1,3 @@ -add_definitions(-DENABLE_UG) - # build target for the 2p2cni test problem ADD_EXECUTABLE("test_2p2cni" test_2p2cni.cc) TARGET_LINK_LIBRARIES("test_2p2cni" ${DumuxLinkLibraries}) diff --git a/test/boxmodels/2pni/CMakeLists.txt b/test/boxmodels/2pni/CMakeLists.txt index 9870500082..570cc328a0 100644 --- a/test/boxmodels/2pni/CMakeLists.txt +++ b/test/boxmodels/2pni/CMakeLists.txt @@ -1,5 +1,3 @@ -add_definitions(-DYASPGRID -DENABLE_ALBERTA -DENABLE_ALUGRID -DENABLE_UG) - ADD_EXECUTABLE("test_2pni" test_2pni.cc) TARGET_LINK_LIBRARIES("test_2pni" ${DumuxLinkLibraries}) diff --git a/test/boxmodels/richards/CMakeLists.txt b/test/boxmodels/richards/CMakeLists.txt index cc51863d3b..b8c343660b 100644 --- a/test/boxmodels/richards/CMakeLists.txt +++ b/test/boxmodels/richards/CMakeLists.txt @@ -1,5 +1,3 @@ -add_definitions(-DYASPGRID -DENABLE_ALBERTA -DENABLE_ALUGRID -DENABLE_UG) - if (MPI_FOUND) # tell UG that the model is parallelized add_definitions(-DModelP) -- GitLab