diff --git a/CMake/Modules/FindMETIS.cmake b/CMake/Modules/FindMETIS.cmake index bf4db205f65598e76bad3ac35da808e49ae9c3ab..05fbc3a2377006d7ef530becf98d739117cf1575 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 1243b78e2e59956aaf773cce92cc85e4c202b85f..f50c9020966fbd090e7e8620f6bce671c8b2b1dd 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 ecc43f909d66c320aaf7243d8b4e3d3fda37b91c..f82b3f5532e16970d43c5b1fdce044e515a3e6bf 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 0118019ae6b7d94fc741d89c00bbcaf5f2325b8c..fdbe457f5e5ffb9a2aa357c8fda551820ec517fb 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 f77bacbcb658718ee3e013116d1def8029f215f9..8f552b45a9fa7999953eaba3e6571dbe75862303 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 b2dc4c2f8c0444ba4c0f1a427ddc3bdca0b90f4e..0f1ffb7146135a12f041d6dea968dc2fa9ed1a4a 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 156f2f83475d468a523eb4e336f91f625e8f69d8..e600c7d807221ecd0d7ca806337d7553a80e1625 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 b80077bf86ed372a15f7b21372b5c398d810848d..7ff8570cb0a2da8f6a987c9cee7f17d9a5594884 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 ad33076f533a6d95cc564f69aa8f8df7f55defbc..9faa5f78026e58a0a7cdf3e055b6deb5ffe17aeb 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 c4f52acea62a444f787875b417ca4c6e37c7d080..b88b7db7f33eff1d8b7c483ca01e535ce72c01fa 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 987050008202c8bfc9dad2dcdc8ae0839239481c..570cc328a0703e0e0c8f3a6d3078dac93815613c 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 cc51863d3bd909e3683a8f24eb6059e31ac5db95..b8c343660bacab56da4a9a83698f45e3c2d33619 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)