diff --git a/.github/workflows/system-tests-latest-components.yml b/.github/workflows/system-tests-latest-components.yml index 2953bcf2d..1dc69e34c 100644 --- a/.github/workflows/system-tests-latest-components.yml +++ b/.github/workflows/system-tests-latest-components.yml @@ -4,7 +4,7 @@ on: schedule: - cron: "0 4 * * *" workflow_dispatch: - + jobs: gather-refs: name: Map Git branches to latest refs @@ -140,6 +140,9 @@ jobs: OPENFOAM_ADAPTER_REF:${{ needs.gather-refs.outputs.ref-openfoam-adapter }},\ SU2_VERSION:7.5.1,\ SU2_ADAPTER_REF:${{ needs.gather-refs.outputs.ref-su2-adapter }},\ + DUNE_VERSION:2.9,\ + DUMUX_VERSION:3.7,\ + MICRO_MANAGER_VERSION:0.8.0,\ TUTORIALS_REF:${{ needs.gather-refs.outputs.ref-tutorials }}" system_tests_branch: develop - log_level: "INFO" \ No newline at end of file + log_level: "INFO" diff --git a/free-flow-over-porous-media/metadata.yaml b/free-flow-over-porous-media/metadata.yaml new file mode 100644 index 000000000..c309adb92 --- /dev/null +++ b/free-flow-over-porous-media/metadata.yaml @@ -0,0 +1,21 @@ +name: Free flow over porous media +path: free-flow-over-porous-media +url: https://precice.org/tutorials-free-flow-over-porous-media.html + +participants: + - Free-Flow + - Porous-Media + +cases: + free-flow-dumux: + participant: Free-Flow + directory: ./free-flow-dumux + run: ./run.sh + component: dumux-adapter + + porous-media-dumux: + participant: Porous-Media + directory: ./porous-media-dumux + run: ./run.sh + component: dumux-adapter + diff --git a/tools/tests/component-templates/dumux-adapter.yaml b/tools/tests/component-templates/dumux-adapter.yaml new file mode 100644 index 000000000..e3a93a718 --- /dev/null +++ b/tools/tests/component-templates/dumux-adapter.yaml @@ -0,0 +1,16 @@ +build: + context: {{ dockerfile_context }} + args: + {% for key, value in build_arguments.items() %} + - {{key}}={{value}} + {% endfor %} + target: dumux_adapter +depends_on: + prepare: + condition: service_completed_successfully +volumes: + - {{ run_directory }}:/runs +command: > + /bin/bash -c "id && + cd '/runs/{{ tutorial_folder }}/{{ case_folder }}' && + {{ run }} | tee system-tests_{{ case_folder }}.log 2>&1" diff --git a/tools/tests/component-templates/micro-manager.yaml b/tools/tests/component-templates/micro-manager.yaml new file mode 100644 index 000000000..1a78a1b4b --- /dev/null +++ b/tools/tests/component-templates/micro-manager.yaml @@ -0,0 +1,16 @@ +build: + context: {{ dockerfile_context }} + args: + {% for key, value in build_arguments.items() %} + - {{key}}={{value}} + {% endfor %} + target: micro_manager +depends_on: + prepare: + condition: service_completed_successfully +volumes: + - {{ run_directory }}:/runs +command: > + /bin/bash -c "id && + cd '/runs/{{ tutorial_folder }}/{{ case_folder }}' && + {{ run }} | tee system-tests_{{ case_folder }}.log 2>&1" diff --git a/tools/tests/components.yaml b/tools/tests/components.yaml index 35f5d1739..bd29ba88f 100644 --- a/tools/tests/components.yaml +++ b/tools/tests/components.yaml @@ -165,4 +165,50 @@ dealii-adapter: default: "master" DEALII_ADAPTER_REF: description: Version of deal.ii-adapter to use - default: "master" \ No newline at end of file + default: "master" + +dumux-adapter: + repository: https://github.com/precice/dumux-adapter + template: component-templates/dumux-adapter.yaml + build_arguments: + PLATFORM: + description: Dockerfile platform used + default: "ubuntu_2404" + PRECICE_REF: + description: Version of preCICE to use + default: "main" + PRECICE_PRESET: + description: CMake preset of preCICE + default: "production-audit" + TUTORIALS_REF: + description: Tutorial git reference to use + default: "master" + DUNE_VERSION: + description: Version of DUNE to use + default: "2.9" + DUMUX_VERSION: + description: Version of DuMux to use + default: "3.7" + DUMUX_ADAPTER_REF: + semnantic: Git ref of the dumux adapter to use + default: "main" + +micro-manager: + repository: https://github.com/precice/micro-manager + template: component-templates/micro-manager.yaml + build_arguments: + PLATFORM: + description: Dockerfile platform used + default: "ubuntu_2404" + PRECICE_REF: + description: Version of preCICE to use + default: "main" + PRECICE_PRESET: + description: CMake preset of preCICE + default: "production-audit" + TUTORIALS_REF: + description: Tutorial git reference to use + default: "master" + MICRO_MANAGER_VERSION: + description: Version of Micro-Manager to use + default: "0.8.0" diff --git a/tools/tests/dockerfiles/ubuntu_2404/Dockerfile b/tools/tests/dockerfiles/ubuntu_2404/Dockerfile index 7cd356612..0e26f882a 100644 --- a/tools/tests/dockerfiles/ubuntu_2404/Dockerfile +++ b/tools/tests/dockerfiles/ubuntu_2404/Dockerfile @@ -22,25 +22,25 @@ USER root # Installing necessary dependecies for preCICE RUN apt-get -qq update && \ apt-get -qq -y install \ - build-essential \ - software-properties-common \ - cmake \ - curl \ - g++ \ - gfortran \ - git \ - libbenchmark-dev \ - libboost-all-dev \ - libeigen3-dev \ - libxml2-dev \ - lsb-release \ - petsc-dev \ - python3-dev \ - python3-numpy \ - python3-pip \ - python3-venv \ - pkg-config \ - wget + build-essential \ + software-properties-common \ + cmake \ + curl \ + g++ \ + gfortran \ + git \ + libbenchmark-dev \ + libboost-all-dev \ + libeigen3-dev \ + libxml2-dev \ + lsb-release \ + petsc-dev \ + python3-dev \ + python3-numpy \ + python3-pip \ + python3-venv \ + pkg-config \ + wget USER precice FROM precice_dependecies AS precice @@ -187,4 +187,51 @@ RUN git clone https://github.com/precice/dealii-adapter.git &&\ if [ -n "${DEALII_ADAPTER_PR}" ]; then git fetch origin pull/${DEALII_ADAPTER_PR}/head; fi && \ git checkout ${DEALII_ADAPTER_REF} && \ cmake . && \ - make -j $(nproc) \ No newline at end of file + make -j $(nproc) + + +FROM precice_dependecies AS micro_manager +USER root +WORKDIR /home/precice +USER precice +COPY --from=precice /home/precice/.local/ /home/precice/.local/ + +ARG MICRO_MANAGER_VERSION +RUN python3 -m venv /home/precice/venv && \ + . /home/precice/venv/bin/activate && \ + git clone https://github.com/precice/micro-manager.git && \ + cd micro-manager && \ + git checkout ${MICRO_MANAGER_VERSION} && \ + pip3 install . + +FROM micro_manager AS dumux_adapter +USER root +COPY --from=precice /home/precice/.local/ /home/precice/.local/ +ARG DUNE_VERSION +ARG DUMUX_VERSION +USER precice +WORKDIR /home/precice +RUN mkdir dumux&&\ + cd dumux&&\ + git clone --depth 1 https://gitlab.dune-project.org/core/dune-common.git -b releases/${DUNE_VERSION} &&\ + git clone --depth 1 https://gitlab.dune-project.org/core/dune-geometry.git -b releases/${DUNE_VERSION} &&\ + git clone --depth 1 https://gitlab.dune-project.org/core/dune-grid.git -b releases/${DUNE_VERSION} &&\ + git clone --depth 1 https://gitlab.dune-project.org/core/dune-istl.git -b releases/${DUNE_VERSION} &&\ + git clone --depth 1 https://gitlab.dune-project.org/extensions/dune-subgrid.git -b releases/${DUNE_VERSION} &&\ + git clone --depth 1 https://git.iws.uni-stuttgart.de/dumux-repositories/dumux.git -b releases/${DUMUX_VERSION} &&\ + git clone -b cell_problems https://git.iws.uni-stuttgart.de/dumux-appl/dumux-phasefield.git &&\ + git clone --depth 1 https://gitlab.dune-project.org/extensions/dune-SPGrid.git -b releases/${DUNE_VERSION} &&\ + git clone --depth 1 https://gitlab.dune-project.org/core/dune-localfunctions.git -b releases/${DUNE_VERSION} +WORKDIR /home/precice/dumux +ENV PATH="/home/precice/dumux/dune-common/bin:${PATH}" +# build core DUNE, DuMuX and the adapter +RUN dunecontrol --opts=./dumux/cmake.opts all +ENV DUNE_CONTROL_PATH=/home/precice/dumux/dune-common/dune.module:/home/precice/dumux/dune-geometry/dune.module:/home/precice/dumux/dune-grid/dune.module:/home/precice/dumux/dune-localfunctions/dune.module:/home/precice/dumux/dune-istl/dune.module:/home/precice/dumux/dune-subgrid/dune.module:/home/precice/dumux/dumux/dune.module +ARG DUMUX_ADAPTER_PR +ARG DUMUX_ADAPTER_REF +RUN git clone https://github.com/precice/dumux-adapter.git &&\ + cd dumux-adapter && \ + if [ -n "${DUMUX_ADAPTER_PR}" ]; then git fetch origin pull/${DUMUX_ADAPTER_PR}/head; fi && \ + git checkout ${DUMUX_ADAPTER_REF} && \ + cd .. &&\ + ./dune-common/bin/dunecontrol --opts=./dumux/cmake.opts all \ No newline at end of file diff --git a/tools/tests/reference_versions.yaml b/tools/tests/reference_versions.yaml index d8a250c52..2a900f6fd 100644 --- a/tools/tests/reference_versions.yaml +++ b/tools/tests/reference_versions.yaml @@ -11,3 +11,7 @@ CALCULIX_ADAPTER_REF: "v2.20.1" SU2_VERSION: "7.5.1" SU2_ADAPTER_REF: "64d4aff" # Distribution v2404 DEALII_ADAPTER_REF: "02c5d18" # develop, April 12, 2025 +DUNE_VERSION: "2.9" +DUMUX_VERSION: "3.7" +DUMUX_ADAPTER_REF: "v3.0.0" +MICRO_MANAGER_VERSION: "v0.8.0" diff --git a/tools/tests/tests.yaml b/tools/tests/tests.yaml index 30bfd6ba2..07f774085 100644 --- a/tools/tests/tests.yaml +++ b/tools/tests/tests.yaml @@ -22,8 +22,8 @@ test_suites: tutorials: - path: flow-over-heated-plate case_combination: - - fluid-openfoam - - solid-fenics + - fluid-openfoam + - solid-fenics reference_result: ./flow-over-heated-plate/reference-results/fluid-openfoam_solid-fenics.tar.gz nutils_test: tutorials: @@ -39,6 +39,18 @@ test_suites: - fluid-openfoam - solid-calculix reference_result: ./perpendicular-flap/reference-results/fluid-openfoam_solid-calculix.tar.gz + dumux_test: + tutorials: + # - path: free-flow-over-porous-media + # case_combination: + # - free-flow-dumux + # - porous-media-dumux + # reference_result: ./free-flow-over-porous-media/reference-results/free-flow-dumux_porous-media-dumux.tar.gz + - path: two-scale-heat-conduction + case_combination: + - macro-dumux + - micro-dumux + reference_result: ./two-scale-heat-conduction/reference-results/macro-dumux_micro-dumux.tar.gz su2_test: tutorials: - path: perpendicular-flap @@ -128,4 +140,4 @@ test_suites: - fluid-openfoam - solid-upstream-dealii - solid-downstream-dealii - reference_result: ./perpendicular-flap/reference-results/fluid-openfoam_solid-upstream-dealii_solid-downstream-dealii.tar.gz \ No newline at end of file + reference_result: ./perpendicular-flap/reference-results/fluid-openfoam_solid-upstream-dealii_solid-downstream-dealii.tar.gz diff --git a/two-scale-heat-conduction/metadata.yaml b/two-scale-heat-conduction/metadata.yaml new file mode 100644 index 000000000..d6f51dc84 --- /dev/null +++ b/two-scale-heat-conduction/metadata.yaml @@ -0,0 +1,20 @@ +name: Two-scale heat conduction +path: two-scale-heat-conduction +url: https://precice.org/tutorials-two-scale-heat-conduction.html + +participants: + - macro-heat + - Micro-Manager + +cases: + macro-dumux: + participant: macro-heat + directory: ./macro-dumux + run: ./../compile-dumux-cases.sh && ./run.sh + component: dumux-adapter + + micro-dumux: + participant: Micro-Manager + directory: ./micro-dumux + run: ./../compile-dumux-cases.sh && ./run.sh + component: dumux-adapter