diff --git a/.github/issue_template.md b/.github/issue_template.md index 79b7996..c146a9b 100644 --- a/.github/issue_template.md +++ b/.github/issue_template.md @@ -12,12 +12,12 @@ Please provide information about the operating system and relevant versions of the software. Example: -Ubuntu 20.04 LTS, preCICE 2.3.0, DuMuX 3.4, DuMuX-preCICE 0.1 +Ubuntu 22.04 LTS, preCICE 3.0.0, DuMuX 3.7, DuMuX-preCICE 2.0.0 ---> ## Steps to reproduce - + ### Expected behavior diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index d1637ca..2bc3bc4 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -11,7 +11,7 @@ jobs: strategy: max-parallel: 2 matrix: - dumux_version: [3.4, 3.5] + dumux_version: [3.7, 3.8] precice_version: [develop] container: image: precice/dumux-precice:${{ matrix.dumux_version }}-${{ matrix.precice_version }} diff --git a/.github/workflows/build-docker-containers.yml b/.github/workflows/build-docker-containers.yml index 068ce5d..ab7e16c 100644 --- a/.github/workflows/build-docker-containers.yml +++ b/.github/workflows/build-docker-containers.yml @@ -17,7 +17,7 @@ jobs: dockerhub_username: precice strategy: matrix: - dumux_version: [3.4, 3.5] + dumux_version: [3.7, 3.8] precice_version: [develop] steps: - name: Checkout Repository @@ -37,8 +37,8 @@ jobs: file: "./dockerfile.slim" tags: ${{ env.dockerhub_username }}/dumux-precice:${{ matrix.dumux_version }}-${{ matrix.precice_version }} build-args: | - DUNEVERSION=2.8 - PRECICEUBUNTU=focal + DUNEVERSION=2.9 + PRECICEUBUNTU=jammy DUMUXVERSION=${{ matrix.dumux_version }} PRECICEVERSION=${{ matrix.precice_version }} build-dune-precice: @@ -69,5 +69,5 @@ jobs: tags: ${{ env.dockerhub_username }}/dune-precice:${{ matrix.dune_version }}-${{ matrix.precice_version }} build-args: | DUNEVERSION=${{ matrix.dune_version }} - PRECICEUBUNTU=focal + PRECICEUBUNTU=jammy PRECICEVERSION=${{ matrix.precice_version }} diff --git a/CHANGELOG.md b/CHANGELOG.md index cb7df87..964988b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ # DuMuX-preCICE change log -## Not released yet +## v2.0.0 -- 2023-08-10: Updated the adapter to align with preCICE V3. Updated the examples accordingly. +- 2023-08-10: Updated the adapter to be compatible with preCICE v3.0.0. Updated the examples too. ## v1.0.0 diff --git a/README.md b/README.md index 1aff4f0..273d98e 100644 --- a/README.md +++ b/README.md @@ -23,13 +23,13 @@ The DuMuX-preCICE adapter is a DUNE module named `dumux-precice` which can be bu ### Prerequisites -- DuMuX **newer** than 3.2 +- DuMuX >= than 3.7 - Builds using the current `master` branch of DuMuX might fail. - If you run into trouble with a new DuMuX release, please open an issue in the repository and add the error message that you receive. - Needs UMFPack (available via SuiteSparse) as solver for linear systems of equations. This is needed to run the examples included in the adapter. Otherwise you can skip UMFPack. -- preCICE >=2.0.0 +- preCICE >=3.0.0 - The adapter is build via the DUNE build system that is based on CMake. Thus, the CMake [link instructions for preCICE](https://precice.org/installation-linking.html#cmake) apply. @@ -42,7 +42,7 @@ The DuMuX-preCICE adapter should build fine if DuMuX, preCICE and their dependen ### Detailed installation steps -1. Install [DuMuX](https://dumux.org/) and the needed dependencies. The easiest way is to follow [DuMuX's installation instructions](https://dumux.org/installation/). The DuMuX project provides a script that installs and DuMuX and the DUNE modules required by DuMuX. This means, after installing DuMuX via the provided script you should be good to go to use the DuMuX-preCICE adapter. +1. Install [DuMuX](https://dumux.org/) and the needed dependencies. The easiest way is to follow [DuMuX's installation instructions](https://dumux.org/docs/doxygen/master/installation.html). The DuMuX project provides a script that installs and DuMuX and the DUNE modules required by DuMuX. This means, after installing DuMuX via the provided script you should be good to go to use the DuMuX-preCICE adapter. After the installation you should have a root directory that contains the base DUNE modules, i.e. a number of directories named like `dune-common`, `dune-geometry` etc., and a directory called `dumux`. @@ -51,13 +51,13 @@ The DuMuX-preCICE adapter should build fine if DuMuX, preCICE and their dependen 2. Download the DuMuX-preCICE adapter to the same directory as the DUNE modules and the `dumux` folder. It is recommended to use the latest release of the adapter, which can be found by checking out the relevant release tag. ```text - git clone -b v1.0.0 https://github.com/precice/dumux-adapter.git + git clone -b v2.0.0 https://github.com/precice/dumux-adapter.git ``` You can also try to clone the repository via SSH: ```text - git clone -b v1.0.0 git@github.com:precice/dumux-adapter.git + git clone -b v2.0.0 git@github.com:precice/dumux-adapter.git ``` 3. Verify that the `dumux-adapter` folder is in the same directory as the DUNE module folders and the `dumux` folder. @@ -68,7 +68,7 @@ The DuMuX-preCICE adapter should build fine if DuMuX, preCICE and their dependen ./dune-common/bin/dunecontrol --only=dumux-precice all ``` - After the build and configure step a new directory `build-cmake` was created inside the `dumux-precice` directory. + After the build and configure step a new directory `build-cmake` was created inside the `dumux-adapter` directory. You can configure the build and configuration process using advanced options by manipulating CMake variables. `dunecontrol` allows to pass an options file for that @@ -84,7 +84,7 @@ The DuMuX-preCICE adapter should build fine if DuMuX, preCICE and their dependen This provided `cmake-test.opts` file turns off some system-dependent optimizations such that the tests create comparable results on different computers. - For more ways do manipulate/adapt the build and configuration step, please consult the `dunecontrol` documentation. + For more ways to manipulate/adapt the build and configuration step, please consult the `dunecontrol` documentation. 5. Optional, but recommended: Build all tests to verify the installation. For this navigate in the `build-cmake/` directory and build the `build_tests` target. diff --git a/doc/user/docs/installation.md b/doc/user/docs/installation.md index a0177c5..84821b7 100644 --- a/doc/user/docs/installation.md +++ b/doc/user/docs/installation.md @@ -4,7 +4,7 @@ The DuMuX-preCICE adapter is a DUNE module named `dumux-precice` which can be bu ## Prerequisites -- DuMuX **newer** than 3.2 +- DuMuX >= 3.7 - Builds using the current `master` branch of DuMuX might fail. - If you run into trouble with a new DuMuX release, please open an issue in the repository and add the error message that you receive. @@ -46,7 +46,7 @@ The DuMuX-preCICE adapter should build fine if DuMuX, preCICE and their dependen dune-common/bin/dunecontrol --only=dumux-precice all ``` - After the build and configure step a new directory `build-cmake` was created inside the `dumux-precice` directory. + After the build and configure step a new directory `build-cmake` was created inside the `dumux-adapter` directory. You can configure the build and configuration process using advanced options by manipulating CMake variables. `dunecontrol` allows to pass an options file for that @@ -65,7 +65,7 @@ The DuMuX-preCICE adapter should build fine if DuMuX, preCICE and their dependen To use the adapter in a separate DUNE module, we recommend building the adapter as a shared library. To do so, use the CMake option `-DBUILD_SHARED_LIBS=ON` to build the adapter and upstream modules. The DuMux install script uses `dumux/cmake.opts`, which already sets this option. Note that to change this setting it may be required to clear the CMake caches in `build-cmake/CMakeCache.txt`. - For more ways do manipulate/adapt the build and configuration step, please consult the `dunecontrol` documentation. + For more ways to manipulate/adapt the build and configuration step, please consult the `dunecontrol` documentation. 5. Optional, but recommended: Build all tests to verify the installation. For this navigate in the `build-cmake/` directory and build the `build_tests` target. diff --git a/docker/README.md b/docker/README.md index 0ed0d4c..2cb2fc6 100644 --- a/docker/README.md +++ b/docker/README.md @@ -19,15 +19,15 @@ For more details on what is installed, please check the `Dockerfile`. The versions of the main dependencies can be manipulated when building the Docker image via the arguments with given default values -- `ARG DUNEVERSION=2.7`: DUNE version. Available in all recipes. -- `ARG DUMUXVERSION=3.4`: DuMuX version. Available in all recipes. -- `ARG PRECICEVERSION=2.2.1`: preCICE version. Available only in "large" and "slim" recipes. -- `ARG PRECICEUBUNTU=focal`: preCICE target platform (here, Ubuntu Focal Fossa). Available only in "large" recipe. +- `ARG DUNEVERSION=2.9`: DUNE version. Available in all recipes. +- `ARG DUMUXVERSION=3.7`: DuMuX version. Available in all recipes. +- `ARG PRECICEVERSION=3.0.0`: preCICE version. Available only in "large" and "slim" (use branch name e.g. "v3.0.0" or "develop") recipes. +- `ARG PRECICEUBUNTU=jammy`: preCICE target platform (here, Ubuntu Jammy Jellyfish). Available only in "large" recipe. -If one wants to build a "slim" image using DUNE 2.8, DuMuX from the current master branch and preCICE 2.4.0 one could call it with the following command: +If one wants to build a "slim" image using DUNE 2.9, DuMuX from the current master branch and preCICE 3.0.0 one could call it with the following command: ```text -sudo docker build --build-arg DUNEVERSION=2.8 --build-arg DUMUXVERSION=master --build-arg PRECICEVERSION=2.4.0 -t ajaust/dumux-precice:master-2.4.0 --file dockerfile.slim . +sudo docker build --build-arg DUNEVERSION=2.9 --build-arg DUMUXVERSION=master --build-arg PRECICEVERSION=v3.0.0 -t precice/dumux-precice:master-v3.0.0 --file dockerfile.slim . ``` The script `rebuild-docker-images.sh` can be used to rebuild the Docker images locally. diff --git a/docker/dockerfile.base b/docker/dockerfile.base index a0363d6..26fd30f 100644 --- a/docker/dockerfile.base +++ b/docker/dockerfile.base @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 ENV DEBIAN_FRONTEND noninteractive @@ -13,8 +13,8 @@ ARG DUMUXINSTALLPATH=/opt/DUMUX WORKDIR ${DUMUXINSTALLPATH} # Obtain DuMuX and Dune repositories -ARG DUNEVERSION=2.8 -ARG DUMUXVERSION=3.5 +ARG DUNEVERSION=2.9 +ARG DUMUXVERSION=3.7 COPY checkout_repositories.sh . RUN bash checkout_repositories.sh ${DUNEVERSION} ${DUMUXVERSION} diff --git a/docker/dockerfile.large b/docker/dockerfile.large index 0e4c5c6..4ad9162 100644 --- a/docker/dockerfile.large +++ b/docker/dockerfile.large @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 # Install DUNE and DuMuX in /home/dumux WORKDIR ${USER_HOME} @@ -14,8 +14,8 @@ RUN apt-get install -y apt-utils vim htop git RUN apt-get install -y openmpi-bin libopenmpi-dev git gcc g++ wget cmake sudo libboost-all-dev pkg-config python3 # Obtain DuMuX and Dune repositories -ARG DUNEVERSION=2.7 -ARG DUMUXVERSION=3.4 +ARG DUNEVERSION=2.9 +ARG DUMUXVERSION=3.7 COPY checkout_repositories.sh . RUN bash checkout_repositories.sh ${DUNEVERSION} ${DUMUXVERSION} @@ -31,9 +31,9 @@ ENV DUNE_CONTROL_PATH=${USER_HOME}/dune-common/dune.module:${USER_HOME}/dune-geo ENV PYTHONPATH ${USER_HOME}/dumux/bin/testing:${PYTHONPATH} #Install preCICE -ARG PRECICEVERSION=2.2.1 -ARG PRECICEUBUNTU=focal -RUN wget https://github.com/precice/precice/releases/download/v${PRECICEVERSION}/libprecice2_${PRECICEVERSION}_${PRECICEUBUNTU}.deb -O libprecice${PRECICEVERSION}-${PRECICEUBUNTU}.deb \ +ARG PRECICEVERSION=3.0.0 +ARG PRECICEUBUNTU=jammy +RUN wget https://github.com/precice/precice/releases/download/v${PRECICEVERSION}/libprecice3_${PRECICEVERSION}_${PRECICEUBUNTU}.deb -O libprecice${PRECICEVERSION}-${PRECICEUBUNTU}.deb \ && apt install -y ./libprecice${PRECICEVERSION}-${PRECICEUBUNTU}.deb \ && rm -f ./libprecice${PRECICEVERSION}-${PRECICEUBUNTU}.deb diff --git a/docker/dockerfile.slim b/docker/dockerfile.slim index d62d736..0c2ea18 100644 --- a/docker/dockerfile.slim +++ b/docker/dockerfile.slim @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 ENV DEBIAN_FRONTEND noninteractive @@ -7,14 +7,14 @@ ADD 01_nodoc /etc/dpkg/dpkg.cfg.d/01_nodoc # Install dependencies from RUN apt-get update -RUN apt-get install -y git gcc g++ gfortran cmake pkg-config libboost-log1.71.0 libboost-thread1.71.0 libboost-system1.71.0 libboost-filesystem1.71.0 libboost-program-options1.71.0 libboost-test1.71.0 libboost-container1.71.0 libeigen3-dev libxml2 libboost-log-dev libboost-thread-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-test-dev libboost-container-dev libeigen3-dev libxml2-dev libsuitesparse-dev python3 +RUN apt-get install -y git gcc g++ gfortran cmake pkg-config libboost-log1.74.0 libboost-thread1.74.0 libboost-system1.74.0 libboost-filesystem1.74.0 libboost-program-options1.74.0 libboost-test1.74.0 libboost-container1.74.0 libeigen3-dev libxml2 libboost-log-dev libboost-thread-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-test-dev libboost-container-dev libeigen3-dev libxml2-dev libsuitesparse-dev python3 ARG DUMUXINSTALLPATH=/opt/DUMUX WORKDIR ${DUMUXINSTALLPATH} # Obtain DuMuX and Dune repositories -ARG DUNEVERSION=2.8 -ARG DUMUXVERSION=3.5 +ARG DUNEVERSION=2.9 +ARG DUMUXVERSION=3.7 COPY checkout_repositories.sh . RUN bash checkout_repositories.sh ${DUNEVERSION} ${DUMUXVERSION} @@ -30,9 +30,8 @@ ENV DUNE_CONTROL_PATH=${DUMUXINSTALLPATH}/dune-common/dune.module:${DUMUXINSTALL ENV PYTHONPATH ${DUMUXINSTALLPATH}/dumux/bin/testing:${PYTHONPATH} # Compile minmum version of preCICE -#ARG PRECICEVERSION=2.4.0 -ARG PRECICEVERSION=develop -ARG PRECICEUBUNTU=focal +ARG PRECICEVERSION=v3.0.0 +ARG PRECICEUBUNTU=jammy RUN git clone --depth 1 -b ${PRECICEVERSION} https://github.com/precice/precice.git precice-${PRECICEVERSION} && cd precice-${PRECICEVERSION} && mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPRECICE_FEATURE_MPI_COMMUNICATION=OFF -DPRECICE_FEATURE_PETSC_MAPPING=OFF -DPRECICE_FEATURE_PYTHON_ACTIONS=OFF -DCMAKE_INSTALL_PREFIX=/usr && make -j 4 && make test && make install && cd ../../ && rm -rf precice-${PRECICEVERSION} RUN apt-get purge -y libboost-log-dev libboost-thread-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-test-dev libboost-container-dev libxml2-dev diff --git a/docker/dockerfile_dune-precice.slim b/docker/dockerfile_dune-precice.slim index e452805..8c2d334 100644 --- a/docker/dockerfile_dune-precice.slim +++ b/docker/dockerfile_dune-precice.slim @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 ENV DEBIAN_FRONTEND noninteractive @@ -7,13 +7,13 @@ ADD 01_nodoc /etc/dpkg/dpkg.cfg.d/01_nodoc # Install dependencies from RUN apt-get update -RUN apt-get install -y git gcc g++ gfortran cmake pkg-config libboost-log1.71.0 libboost-thread1.71.0 libboost-system1.71.0 libboost-filesystem1.71.0 libboost-program-options1.71.0 libboost-test1.71.0 libboost-container1.71.0 libeigen3-dev libxml2 libboost-log-dev libboost-thread-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-test-dev libboost-container-dev libeigen3-dev libxml2-dev libsuitesparse-dev python3 +RUN apt-get install -y git gcc g++ gfortran cmake pkg-config libboost-log1.74.0 libboost-thread1.74.0 libboost-system1.74.0 libboost-filesystem1.74.0 libboost-program-options1.74.0 libboost-test1.74.0 libboost-container1.74.0 libeigen3-dev libxml2 libboost-log-dev libboost-thread-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-test-dev libboost-container-dev libeigen3-dev libxml2-dev libsuitesparse-dev python3 ARG DUMUXINSTALLPATH=/opt/DUMUX WORKDIR ${DUMUXINSTALLPATH} # Obtain DuMuX and Dune repositories -ARG DUNEVERSION=2.8 +ARG DUNEVERSION=2.9 COPY checkout_repositories.sh . RUN bash checkout_repositories.sh ${DUNEVERSION} none @@ -27,9 +27,8 @@ RUN dunecontrol --opts=cmake-test.opts all ENV DUNE_CONTROL_PATH=${DUMUXINSTALLPATH}/dune-common/dune.module:${DUMUXINSTALLPATH}/dune-geometry/dune.module:${DUMUXINSTALLPATH}/dune-grid/dune.module:${DUMUXINSTALLPATH}/dune-localfunctions/dune.module:${DUMUXINSTALLPATH}/dune-istl/dune.module:${DUMUXINSTALLPATH}/dune-subgrid/dune.module # Compile minmum version of preCICE -#ARG PRECICEVERSION=2.4.0 -ARG PRECICEVERSION=develop -ARG PRECICEUBUNTU=focal +ARG PRECICEVERSION=v3.0.0 +ARG PRECICEUBUNTU=jammy RUN git clone --depth 1 -b ${PRECICEVERSION} https://github.com/precice/precice.git precice-${PRECICEVERSION} && cd precice-${PRECICEVERSION} && mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPRECICE_FEATURE_MPI_COMMUNICATION=OFF -DPRECICE_FEATURE_PETSC_MAPPING=OFF -DPRECICE_FEATURE_PYTHON_ACTIONS=OFF -DCMAKE_INSTALL_PREFIX=/usr && make -j 4 && make test && make install && cd ../../ && rm -rf precice-${PRECICEVERSION} RUN apt-get purge -y libboost-log-dev libboost-thread-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-test-dev libboost-container-dev libxml2-dev diff --git a/docker/rebuild-docker-images.sh b/docker/rebuild-docker-images.sh index 3c87767..0d86af9 100755 --- a/docker/rebuild-docker-images.sh +++ b/docker/rebuild-docker-images.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash -DUNE_VERSION="2.8" -DUMUX_VERSIONS=("3.4" "3.5") +DUNE_VERSION="2.9" +DUMUX_VERSIONS=("3.7" "3.8") PRECICE_VERSIONS=("develop") for dumux_version in ${DUMUX_VERSIONS[@]}; do diff --git a/dune.module b/dune.module index 694e26c..e3f8732 100644 --- a/dune.module +++ b/dune.module @@ -4,9 +4,9 @@ #Name of the module Module: dumux-precice -Version: 1.0.0 +Version: 2.0.0 Maintainer: ishaan.desai@ipvs.uni-stuttgart.de # Required build dependencies -Depends: dumux (>=3.2) +Depends: dumux (>=3.7) # Optional build dependencies Suggests: dune-subgrid diff --git a/examples/dummysolver/precice-dummy-solver-config.xml b/examples/dummysolver/precice-dummy-solver-config.xml index ccc88b5..80379d0 100644 --- a/examples/dummysolver/precice-dummy-solver-config.xml +++ b/examples/dummysolver/precice-dummy-solver-config.xml @@ -1,6 +1,6 @@ - + diff --git a/examples/ff-pm/flow-over-cube-3d/1pspatialparams.hh b/examples/ff-pm/flow-over-cube-3d/1pspatialparams.hh index ef81c28..e7855f2 100644 --- a/examples/ff-pm/flow-over-cube-3d/1pspatialparams.hh +++ b/examples/ff-pm/flow-over-cube-3d/1pspatialparams.hh @@ -24,11 +24,7 @@ #ifndef DUMUX_1P_TEST_SPATIALPARAMS_HH #define DUMUX_1P_TEST_SPATIALPARAMS_HH -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR >= 5 #include -#else -#include -#endif namespace Dumux { @@ -39,30 +35,16 @@ namespace Dumux * 1p cc model */ template -class OnePSpatialParams -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR >= 5 - : public FVPorousMediumFlowSpatialParamsOneP< - FVGridGeometry, - Scalar, - OnePSpatialParams> -#else - : public FVSpatialParamsOneP> -#endif +class OnePSpatialParams : public FVPorousMediumFlowSpatialParamsOneP< + FVGridGeometry, + Scalar, + OnePSpatialParams> { using GridView = typename FVGridGeometry::GridView; - using ParentType = -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR >= 5 - FVPorousMediumFlowSpatialParamsOneP< - FVGridGeometry, - Scalar, - OnePSpatialParams>; -#else - FVSpatialParamsOneP>; -#endif + using ParentType = FVPorousMediumFlowSpatialParamsOneP< + FVGridGeometry, + Scalar, + OnePSpatialParams>; using Element = typename GridView::template Codim<0>::Entity; using GlobalPosition = typename Element::Geometry::GlobalCoordinate; @@ -108,7 +90,6 @@ public: return alphaBJ_; } -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR > 4 /*! * \brief Return the temperature within the domain in [K]. * @@ -118,7 +99,6 @@ public: { return 273.15 + 10; // 10°C } -#endif private: Scalar permeability_; diff --git a/examples/ff-pm/flow-over-cube-3d/ffproblem-reversed.hh b/examples/ff-pm/flow-over-cube-3d/ffproblem-reversed.hh index df1bce4..cc782b6 100644 --- a/examples/ff-pm/flow-over-cube-3d/ffproblem-reversed.hh +++ b/examples/ff-pm/flow-over-cube-3d/ffproblem-reversed.hh @@ -25,20 +25,14 @@ #include -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR >= 4 #include -#endif #include #include #include #include -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR >= 6 #include -#else -#include -#endif #include @@ -98,15 +92,9 @@ struct EnableGridVolumeVariablesCache { * \brief The free flow sub problem */ template -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR >= 6 class StokesSubProblem : public NavierStokesStaggeredProblem { using ParentType = NavierStokesStaggeredProblem; -#else -class StokesSubProblem : public NavierStokesProblem -{ - using ParentType = NavierStokesProblem; -#endif using GridGeometry = GetPropType; using GridView = typename GridGeometry::GridView; @@ -126,11 +114,7 @@ class StokesSubProblem : public NavierStokesProblem using GlobalPosition = typename Element::Geometry::GlobalCoordinate; using PrimaryVariables = GetPropType; -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR >= 4 using NumEqVector = Dumux::NumEqVector; -#else - using NumEqVector = GetPropType; -#endif using FluidSystem = GetPropType; public: @@ -148,19 +132,6 @@ public: */ // \{ -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR < 5 - /*! - * \brief Return the temperature within the domain in [K]. - * - * This problem assumes a temperature of 10 degrees Celsius. - */ - Scalar temperature() const - { - // 10°C - return 273.15 + 10; - } -#endif - /*! * \brief Return the sources within the domain. * @@ -317,11 +288,7 @@ public: using std::sqrt; const Scalar dPdX = -deltaP_ / (this->gridGeometry().bBoxMax()[0] - this->gridGeometry().bBoxMin()[0]); -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR > 4 static const Scalar mu = FluidSystem::viscosity(273.15 + 10, 1e5); -#else - static const Scalar mu = FluidSystem::viscosity(temperature(), 1e5); -#endif static const Scalar alpha = getParam("Darcy.SpatialParams.AlphaBeaversJoseph"); static const Scalar K = diff --git a/examples/ff-pm/flow-over-cube-3d/main_ff-reversed.cc b/examples/ff-pm/flow-over-cube-3d/main_ff-reversed.cc index fcab969..8dc80e4 100644 --- a/examples/ff-pm/flow-over-cube-3d/main_ff-reversed.cc +++ b/examples/ff-pm/flow-over-cube-3d/main_ff-reversed.cc @@ -41,13 +41,9 @@ #include #include -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR >= 7 #include #include #include -#else -#include -#endif #include #include @@ -299,11 +295,7 @@ try { GetPropType; auto freeFlowGridGeometry = std::make_shared(freeFlowGridView); -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR >= 5 freeFlowGridGeometry->update(freeFlowGridManager.grid().leafGridView()); -#else - freeFlowGridGeometry->update(); -#endif // the problem (initial and boundary conditions) using FreeFlowProblem = GetPropType; @@ -408,13 +400,9 @@ try { freeFlowProblem, freeFlowGridGeometry, freeFlowGridVariables); // the linear solver -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR >= 7 using LinearSolver = UMFPackIstlSolver>; -#else - using LinearSolver = UMFPackBackend; -#endif auto linearSolver = std::make_shared(); // the non-linear solver diff --git a/examples/ff-pm/flow-over-cube-3d/main_pm-reversed.cc b/examples/ff-pm/flow-over-cube-3d/main_pm-reversed.cc index cb49357..55e0092 100644 --- a/examples/ff-pm/flow-over-cube-3d/main_pm-reversed.cc +++ b/examples/ff-pm/flow-over-cube-3d/main_pm-reversed.cc @@ -42,13 +42,9 @@ bool printstuff = false; #include #include -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR >= 7 #include #include #include -#else -#include -#endif #include @@ -341,11 +337,7 @@ try { using DarcyGridGeometry = GetPropType; auto darcyGridGeometry = std::make_shared(darcyGridView); -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR >= 5 darcyGridGeometry->update(darcyGridManager.grid().leafGridView()); -#else - darcyGridGeometry->update(); -#endif using DarcyProblem = GetPropType; auto darcyProblem = std::make_shared(darcyGridGeometry); @@ -448,13 +440,9 @@ try { darcyProblem, darcyGridGeometry, darcyGridVariables); // the linear solver -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR >= 7 using LinearSolver = UMFPackIstlSolver>; -#else - using LinearSolver = UMFPackBackend; -#endif auto linearSolver = std::make_shared(); // the non-linear solver diff --git a/examples/ff-pm/flow-over-cube-3d/pmproblem-reversed.hh b/examples/ff-pm/flow-over-cube-3d/pmproblem-reversed.hh index 4413b36..e4e1c5a 100644 --- a/examples/ff-pm/flow-over-cube-3d/pmproblem-reversed.hh +++ b/examples/ff-pm/flow-over-cube-3d/pmproblem-reversed.hh @@ -26,9 +26,7 @@ #include -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR >= 4 #include -#endif #include @@ -97,11 +95,7 @@ class DarcySubProblem : public PorousMediumFlowProblem typename GetPropType::GridView; using Scalar = GetPropType; using PrimaryVariables = GetPropType; -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR >= 4 using NumEqVector = Dumux::NumEqVector; -#else - using NumEqVector = GetPropType; -#endif using BoundaryTypes = Dumux::BoundaryTypes< GetPropType::numEq()>; using VolumeVariables = GetPropType; @@ -131,19 +125,6 @@ public: */ // \{ -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR < 5 - /*! - * \brief Return the temperature within the domain in [K]. - * - */ - Scalar temperature() const - { - // 10°C - return 273.15 + 10; - } - // \} -#endif - /*! * \name Boundary conditions */ diff --git a/examples/ff-pm/flow-over-square-2d/1pspatialparams.hh b/examples/ff-pm/flow-over-square-2d/1pspatialparams.hh index ef81c28..e7855f2 100644 --- a/examples/ff-pm/flow-over-square-2d/1pspatialparams.hh +++ b/examples/ff-pm/flow-over-square-2d/1pspatialparams.hh @@ -24,11 +24,7 @@ #ifndef DUMUX_1P_TEST_SPATIALPARAMS_HH #define DUMUX_1P_TEST_SPATIALPARAMS_HH -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR >= 5 #include -#else -#include -#endif namespace Dumux { @@ -39,30 +35,16 @@ namespace Dumux * 1p cc model */ template -class OnePSpatialParams -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR >= 5 - : public FVPorousMediumFlowSpatialParamsOneP< - FVGridGeometry, - Scalar, - OnePSpatialParams> -#else - : public FVSpatialParamsOneP> -#endif +class OnePSpatialParams : public FVPorousMediumFlowSpatialParamsOneP< + FVGridGeometry, + Scalar, + OnePSpatialParams> { using GridView = typename FVGridGeometry::GridView; - using ParentType = -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR >= 5 - FVPorousMediumFlowSpatialParamsOneP< - FVGridGeometry, - Scalar, - OnePSpatialParams>; -#else - FVSpatialParamsOneP>; -#endif + using ParentType = FVPorousMediumFlowSpatialParamsOneP< + FVGridGeometry, + Scalar, + OnePSpatialParams>; using Element = typename GridView::template Codim<0>::Entity; using GlobalPosition = typename Element::Geometry::GlobalCoordinate; @@ -108,7 +90,6 @@ public: return alphaBJ_; } -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR > 4 /*! * \brief Return the temperature within the domain in [K]. * @@ -118,7 +99,6 @@ public: { return 273.15 + 10; // 10°C } -#endif private: Scalar permeability_; diff --git a/examples/ff-pm/flow-over-square-2d/ffproblem-reversed.hh b/examples/ff-pm/flow-over-square-2d/ffproblem-reversed.hh index 4d6109e..4be7f23 100644 --- a/examples/ff-pm/flow-over-square-2d/ffproblem-reversed.hh +++ b/examples/ff-pm/flow-over-square-2d/ffproblem-reversed.hh @@ -24,20 +24,15 @@ #define DUMUX_STOKES_SUBPROBLEM_HH #include -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR >= 4 + #include -#endif #include #include #include #include -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR >= 6 #include -#else -#include -#endif #include @@ -97,15 +92,9 @@ struct EnableGridVolumeVariablesCache { * \brief The free flow sub problem */ template -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR >= 6 class StokesSubProblem : public NavierStokesStaggeredProblem { using ParentType = NavierStokesStaggeredProblem; -#else -class StokesSubProblem : public NavierStokesProblem -{ - using ParentType = NavierStokesProblem; -#endif using GridGeometry = GetPropType; using GridView = typename GridGeometry::GridView; @@ -126,11 +115,7 @@ class StokesSubProblem : public NavierStokesProblem using PrimaryVariables = GetPropType; -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR >= 4 using NumEqVector = Dumux::NumEqVector; -#else - using NumEqVector = GetPropType; -#endif using FluidSystem = GetPropType; @@ -149,19 +134,6 @@ public: */ // \{ -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR < 5 - /*! - * \brief Return the temperature within the domain in [K]. - * - * This problem assumes a temperature of 10 degrees Celsius. - */ - Scalar temperature() const - { - // 10°C - return 273.15 + 10; - } -#endif - /*! * \brief Return the sources within the domain. * @@ -316,11 +288,7 @@ public: using std::sqrt; const Scalar dPdX = -deltaP_ / (this->gridGeometry().bBoxMax()[0] - this->gridGeometry().bBoxMin()[0]); -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR > 4 static const Scalar mu = FluidSystem::viscosity(273.15 + 10, 1e5); -#else - static const Scalar mu = FluidSystem::viscosity(temperature(), 1e5); -#endif static const Scalar alpha = getParam("Darcy.SpatialParams.AlphaBeaversJoseph"); static const Scalar K = diff --git a/examples/ff-pm/flow-over-square-2d/main_ff.cc b/examples/ff-pm/flow-over-square-2d/main_ff.cc index 7d72f90..042f21e 100644 --- a/examples/ff-pm/flow-over-square-2d/main_ff.cc +++ b/examples/ff-pm/flow-over-square-2d/main_ff.cc @@ -41,13 +41,9 @@ #include #include -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR >= 7 #include #include #include -#else -#include -#endif #include #include @@ -191,11 +187,7 @@ try { GetPropType; auto freeFlowGridGeometry = std::make_shared(freeFlowGridView); -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR >= 5 freeFlowGridGeometry->update(freeFlowGridManager.grid().leafGridView()); -#else - freeFlowGridGeometry->update(); -#endif // the problem (initial and boundary conditions) using FreeFlowProblem = GetPropType; @@ -300,13 +292,9 @@ try { freeFlowProblem, freeFlowGridGeometry, freeFlowGridVariables); // the linear solver -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR >= 7 using LinearSolver = UMFPackIstlSolver>; -#else - using LinearSolver = UMFPackBackend; -#endif auto linearSolver = std::make_shared(); // the non-linear solver diff --git a/examples/ff-pm/flow-over-square-2d/main_pm.cc b/examples/ff-pm/flow-over-square-2d/main_pm.cc index 29b37cd..66d428e 100644 --- a/examples/ff-pm/flow-over-square-2d/main_pm.cc +++ b/examples/ff-pm/flow-over-square-2d/main_pm.cc @@ -42,13 +42,9 @@ bool printstuff = false; #include #include -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR >= 7 #include #include #include -#else -#include -#endif #include @@ -235,11 +231,7 @@ try { using DarcyGridGeometry = GetPropType; auto darcyGridGeometry = std::make_shared(darcyGridView); -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR >= 5 darcyGridGeometry->update(darcyGridManager.grid().leafGridView()); -#else - darcyGridGeometry->update(); -#endif using DarcyProblem = GetPropType; auto darcyProblem = std::make_shared(darcyGridGeometry); @@ -342,13 +334,9 @@ try { darcyProblem, darcyGridGeometry, darcyGridVariables); // the linear solver -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR >= 7 using LinearSolver = UMFPackIstlSolver>; -#else - using LinearSolver = UMFPackBackend; -#endif auto linearSolver = std::make_shared(); // the non-linear solver diff --git a/examples/ff-pm/flow-over-square-2d/pmproblem-reversed.hh b/examples/ff-pm/flow-over-square-2d/pmproblem-reversed.hh index e21868a..76bc0d3 100644 --- a/examples/ff-pm/flow-over-square-2d/pmproblem-reversed.hh +++ b/examples/ff-pm/flow-over-square-2d/pmproblem-reversed.hh @@ -26,9 +26,7 @@ #include -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR >= 4 #include -#endif #include #include @@ -96,11 +94,7 @@ class DarcySubProblem : public PorousMediumFlowProblem using Scalar = GetPropType; using PrimaryVariables = GetPropType; -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR >= 4 using NumEqVector = Dumux::NumEqVector; -#else - using NumEqVector = GetPropType; -#endif using BoundaryTypes = Dumux::BoundaryTypes< GetPropType::numEq()>; @@ -131,18 +125,6 @@ public: */ // \{ -#if DUMUX_VERSION_MAJOR >= 3 & DUMUX_VERSION_MINOR < 5 - /*! - * \brief Return the temperature within the domain in [K]. - * - */ - Scalar temperature() const - { - // 10°C - return 273.15 + 10; - } - // \} -#endif /*! * \name Boundary conditions */