From f44dda6cc349fc85645bb6769ef1369ea9f09d84 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Sat, 13 Jun 2026 21:25:03 +0200 Subject: [PATCH 01/15] Add a solids4foam component and test --- perpendicular-flap/metadata.yaml | 10 ++++---- .../component-templates/solids4foam.yaml | 16 +++++++++++++ tools/tests/components.yaml | 24 +++++++++++++++++++ .../tests/dockerfiles/ubuntu_2404/Dockerfile | 6 +++++ tools/tests/reference_versions.yaml | 2 +- tools/tests/tests.yaml | 11 +++++++++ 6 files changed, 63 insertions(+), 6 deletions(-) create mode 100644 tools/tests/component-templates/solids4foam.yaml diff --git a/perpendicular-flap/metadata.yaml b/perpendicular-flap/metadata.yaml index 0cacb742e..23dd4afac 100644 --- a/perpendicular-flap/metadata.yaml +++ b/perpendicular-flap/metadata.yaml @@ -73,8 +73,8 @@ cases: run: ./run.sh component: openfoam-adapter - # solid-solids4foam: - # participant: Solid - # directory: ./solid-solids4foam - # run: ./run.sh - # component: openfoam-adapter + solid-solids4foam: + participant: Solid + directory: ./solid-solids4foam + run: ./run.sh + component: solids4foam diff --git a/tools/tests/component-templates/solids4foam.yaml b/tools/tests/component-templates/solids4foam.yaml new file mode 100644 index 000000000..23ed3920d --- /dev/null +++ b/tools/tests/component-templates/solids4foam.yaml @@ -0,0 +1,16 @@ +build: + context: {{ dockerfile_context }} + args: + {% for key, value in build_arguments.items() %} + - {{key}}={{value}} + {% endfor %} + target: solids4foam +depends_on: + prepare: + condition: service_completed_successfully +volumes: + - {{ run_directory }}:/runs +command: > + /bin/bash -c "id && + cd '/runs/{{ tutorial_folder }}/{{ case_folder }}' && + openfoam {{ run }} | tee system-tests_{{ case_folder }}.log 2>&1" diff --git a/tools/tests/components.yaml b/tools/tests/components.yaml index 0a364f592..9b0d56e0c 100644 --- a/tools/tests/components.yaml +++ b/tools/tests/components.yaml @@ -58,6 +58,30 @@ openfoam-adapter: description: Reference/tag of the OpenFOAM adapter to use default: "master" + +solids4foam: + repository: https://github.com/solids4foam/solids4foam + template: component-templates/solids4foam.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" + OPENFOAM_EXECUTABLE: + description: exectuable of openfoam to use + default: "openfoam2512" + OPENFOAM_ADAPTER_REF: + description: Reference/tag of the OpenFOAM adapter to use + default: "master" + fenics-adapter: repository: https://github.com/precice/fenics-adapter template: component-templates/fenics-adapter.yaml diff --git a/tools/tests/dockerfiles/ubuntu_2404/Dockerfile b/tools/tests/dockerfiles/ubuntu_2404/Dockerfile index a1f0eb74a..5b22b81ba 100644 --- a/tools/tests/dockerfiles/ubuntu_2404/Dockerfile +++ b/tools/tests/dockerfiles/ubuntu_2404/Dockerfile @@ -108,6 +108,12 @@ RUN git clone https://github.com/precice/openfoam-adapter.git &&\ git checkout ${OPENFOAM_ADAPTER_REF} && \ /usr/bin/${OPENFOAM_EXECUTABLE} ./Allwmake -j $(nproc) +FROM openfoam_adapter AS solids4foam +USER precice +RUN python3 -m venv /home/precice/venv && \ + . /home/precice/venv/bin/activate && \ + pip3 install styro && \ + styro install solids4foam FROM precice_dependecies AS python_bindings COPY --from=precice /home/precice/.local/ /home/precice/.local/ diff --git a/tools/tests/reference_versions.yaml b/tools/tests/reference_versions.yaml index c7c3e4c04..4497ebc8e 100644 --- a/tools/tests/reference_versions.yaml +++ b/tools/tests/reference_versions.yaml @@ -22,7 +22,7 @@ OPENFOAM_ADAPTER_REF: "2c3062c" # develop, May 27, 2026 PRECICE_REF: "v3.4.1" PYTHON_BINDINGS_REF: "v3.4.0" SU2_ADAPTER_REF: "5abe79b" # develop, May 27, 2026 -TUTORIALS_REF: "mercurydpm-tests" +TUTORIALS_REF: "solids4foam-component" # Additional settings PRECICE_PRESET: "production-audit" \ No newline at end of file diff --git a/tools/tests/tests.yaml b/tools/tests/tests.yaml index 70faade1d..93b600bd0 100644 --- a/tools/tests/tests.yaml +++ b/tools/tests/tests.yaml @@ -436,6 +436,13 @@ test_suites: - solid-openfoam max_time: 0.03 reference_result: ./perpendicular-flap/reference-results/fluid-openfoam_solid-openfoam.tar.gz + - &perpendicular-flap_fluid-openfoam_solid-solids4foam + path: perpendicular-flap + case_combination: + - fluid-openfoam + - solid-solids4foam + max_time: 0.1 + reference_result: ./perpendicular-flap/reference-results/fluid-openfoam_solid-solids4foam.tar.gz - &perpendicular-flap_fluid-su2_solid-fenics path: perpendicular-flap case_combination: @@ -733,6 +740,10 @@ test_suites: # Excluded: # *elastic-tube-3d_fluid-openfoam_solid-fenics # too small values to compare + solids4foam: + tutorials: + - *perpendicular-flap_fluid-openfoam_solid-solids4foam + su2-adapter: tutorials: - *flow-over-heated-plate_fluid-su2_solid-openfoam From a057dee147801d40869c63f09eb96099664f28e5 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Sat, 13 Jun 2026 21:36:07 +0200 Subject: [PATCH 02/15] Enable OpenFOAM environment --- tools/tests/dockerfiles/ubuntu_2404/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tests/dockerfiles/ubuntu_2404/Dockerfile b/tools/tests/dockerfiles/ubuntu_2404/Dockerfile index 5b22b81ba..0a51a9ca2 100644 --- a/tools/tests/dockerfiles/ubuntu_2404/Dockerfile +++ b/tools/tests/dockerfiles/ubuntu_2404/Dockerfile @@ -113,7 +113,7 @@ USER precice RUN python3 -m venv /home/precice/venv && \ . /home/precice/venv/bin/activate && \ pip3 install styro && \ - styro install solids4foam + /usr/bin/${OPENFOAM_EXECUTABLE} styro install solids4foam FROM precice_dependecies AS python_bindings COPY --from=precice /home/precice/.local/ /home/precice/.local/ From 9ae2f4200e613f4eac0bcba8a3357861658561eb Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Sat, 13 Jun 2026 21:52:09 +0200 Subject: [PATCH 03/15] Build in parallel --- tools/tests/dockerfiles/ubuntu_2404/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tests/dockerfiles/ubuntu_2404/Dockerfile b/tools/tests/dockerfiles/ubuntu_2404/Dockerfile index 0a51a9ca2..f04694ef0 100644 --- a/tools/tests/dockerfiles/ubuntu_2404/Dockerfile +++ b/tools/tests/dockerfiles/ubuntu_2404/Dockerfile @@ -113,7 +113,7 @@ USER precice RUN python3 -m venv /home/precice/venv && \ . /home/precice/venv/bin/activate && \ pip3 install styro && \ - /usr/bin/${OPENFOAM_EXECUTABLE} styro install solids4foam + /usr/bin/${OPENFOAM_EXECUTABLE} WM_NCOMPPROCS=$(nproc) styro install solids4foam FROM precice_dependecies AS python_bindings COPY --from=precice /home/precice/.local/ /home/precice/.local/ From 1798de2451a151001f59ae9c9710b0a8100a4ceb Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Sat, 13 Jun 2026 21:53:14 +0200 Subject: [PATCH 04/15] Increase timeout --- tools/tests/tests.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/tests/tests.yaml b/tools/tests/tests.yaml index 93b600bd0..efacf9790 100644 --- a/tools/tests/tests.yaml +++ b/tools/tests/tests.yaml @@ -442,6 +442,7 @@ test_suites: - fluid-openfoam - solid-solids4foam max_time: 0.1 + timeout: 3600 reference_result: ./perpendicular-flap/reference-results/fluid-openfoam_solid-solids4foam.tar.gz - &perpendicular-flap_fluid-su2_solid-fenics path: perpendicular-flap From f029471c075556a8a05db420f4645fcde8d21fd5 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Sat, 13 Jun 2026 21:56:10 +0200 Subject: [PATCH 05/15] Export WM_NCOMPPROCS --- tools/tests/dockerfiles/ubuntu_2404/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/tests/dockerfiles/ubuntu_2404/Dockerfile b/tools/tests/dockerfiles/ubuntu_2404/Dockerfile index f04694ef0..516cc8792 100644 --- a/tools/tests/dockerfiles/ubuntu_2404/Dockerfile +++ b/tools/tests/dockerfiles/ubuntu_2404/Dockerfile @@ -113,7 +113,8 @@ USER precice RUN python3 -m venv /home/precice/venv && \ . /home/precice/venv/bin/activate && \ pip3 install styro && \ - /usr/bin/${OPENFOAM_EXECUTABLE} WM_NCOMPPROCS=$(nproc) styro install solids4foam + export WM_NCOMPPROCS=$(nproc) && \ + /usr/bin/${OPENFOAM_EXECUTABLE} styro install solids4foam FROM precice_dependecies AS python_bindings COPY --from=precice /home/precice/.local/ /home/precice/.local/ From 75db13ebb1d8255e713aa91a7ca41b92d5b35dfa Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Sun, 14 Jun 2026 09:05:49 +0200 Subject: [PATCH 06/15] Remove timeout override --- tools/tests/tests.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/tests/tests.yaml b/tools/tests/tests.yaml index efacf9790..93b600bd0 100644 --- a/tools/tests/tests.yaml +++ b/tools/tests/tests.yaml @@ -442,7 +442,6 @@ test_suites: - fluid-openfoam - solid-solids4foam max_time: 0.1 - timeout: 3600 reference_result: ./perpendicular-flap/reference-results/fluid-openfoam_solid-solids4foam.tar.gz - &perpendicular-flap_fluid-su2_solid-fenics path: perpendicular-flap From 7031b2cd9d0473a4c05d848c42e608cc891773ae Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Fri, 10 Jul 2026 17:19:39 +0200 Subject: [PATCH 07/15] Use the official solids4foam image for the solids4foam stage --- .../tests/dockerfiles/ubuntu_2404/Dockerfile | 72 ++++++++++++++++--- 1 file changed, 64 insertions(+), 8 deletions(-) diff --git a/tools/tests/dockerfiles/ubuntu_2404/Dockerfile b/tools/tests/dockerfiles/ubuntu_2404/Dockerfile index 4b6151b69..f546a2f89 100644 --- a/tools/tests/dockerfiles/ubuntu_2404/Dockerfile +++ b/tools/tests/dockerfiles/ubuntu_2404/Dockerfile @@ -98,14 +98,6 @@ ENV PKG_CONFIG_PATH="/home/precice/.local/lib/pkgconfig:$PKG_CONFIG_PATH" ENV CMAKE_PREFIX_PATH="/home/precice/.local:$CMAKE_PREFIX_PATH" ### end of precice stage ### -FROM openfoam_adapter AS solids4foam -USER precice -RUN python3 -m venv /home/precice/venv && \ - . /home/precice/venv/bin/activate && \ - pip3 install styro && \ - export WM_NCOMPPROCS=$(nproc) && \ - /usr/bin/${OPENFOAM_EXECUTABLE} styro install solids4foam - FROM precice AS python_bindings ARG PYTHON_BINDINGS_REF @@ -457,3 +449,67 @@ RUN cd "${SU2_HOME}" &&\ ./meson.py build -Denable-pywrapper=true --prefix=$SU2_RUN &&\ ./ninja -C build install ### end of su2_adapter stage ### + + +##################################################################### +# Build stages using third-party base images # +##################################################################### + + +FROM solids4foam/solids4foam:v2.3-openfoam-v2412-latest as solids4foam + +ARG PRECICE_UID=1000 +ARG PRECICE_GID=1000 +ARG OPENFOAM_ADAPTER_PR +ARG OPENFOAM_ADAPTER_REF=v1.3.1 + +USER root +SHELL ["/bin/bash", "-c"] +ENV DEBIAN_FRONTEND=noninteractive + +# Set the same user as the rest of the system tests components, for consistency. +RUN set -eux; \ + if getent group "${PRECICE_GID}" >/dev/null; then \ + existing_group="$(getent group "${PRECICE_GID}" | cut -d: -f1)"; \ + if [ "${existing_group}" != "precice" ]; then \ + groupmod -n precice "${existing_group}"; \ + fi; \ + else \ + groupadd -g "${PRECICE_GID}" precice; \ + fi; \ + if getent passwd "${PRECICE_UID}" >/dev/null; then \ + existing_user="$(getent passwd "${PRECICE_UID}" | cut -d: -f1)"; \ + if [ "${existing_user}" != "precice" ]; then \ + usermod -l precice -d /home/precice -m "${existing_user}"; \ + fi; \ + usermod -g "${PRECICE_GID}" precice; \ + else \ + useradd -u "${PRECICE_UID}" -g "${PRECICE_GID}" -ms /bin/bash precice; \ + fi; \ + mkdir -p /home/precice; \ + chown -R "${PRECICE_UID}:${PRECICE_GID}" /home/precice + +# The base image provides all binaries under /root/, but we prefer to build as a regular user. +RUN mv /root/OpenFOAM/ /home/precice/OpenFOAM/ && \ + chown -R "${PRECICE_UID}:${PRECICE_GID}" /home/precice/OpenFOAM + +# Set a general openfoam executable, to make the component template version-independent +RUN ln -sf /usr/bin/openfoam2412 /usr/bin/openfoam + +RUN apt-get -qq update && \ + apt-get -qq -y install wget git + +# preCICE v3.4 was the last release to support Ubuntu 22.04 (used as a base image), +# so there is no reason to accept the preCICE version as an argument and build it from source. +# Rework this part once a newer base image is used. +RUN wget https://github.com/precice/precice/releases/download/v3.4.1/libprecice3_3.4.1_jammy.deb && \ + apt-get -qq -y install ./libprecice3_3.4.1_jammy.deb + +USER precice +WORKDIR /home/precice + +RUN git clone https://github.com/precice/openfoam-adapter.git &&\ + cd openfoam-adapter && \ + if [ -n "${OPENFOAM_ADAPTER_PR}" ]; then git fetch origin pull/${OPENFOAM_ADAPTER_PR}/head; fi && \ + git checkout ${OPENFOAM_ADAPTER_REF} && \ + /usr/bin/openfoam2412 ./Allwmake -j $(nproc) From b5387635cd2bafaa548eb5c03daa5b0a2de455d0 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Fri, 10 Jul 2026 17:20:54 +0200 Subject: [PATCH 08/15] Revert empty line --- tools/tests/dockerfiles/ubuntu_2404/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/tests/dockerfiles/ubuntu_2404/Dockerfile b/tools/tests/dockerfiles/ubuntu_2404/Dockerfile index f546a2f89..02a139b14 100644 --- a/tools/tests/dockerfiles/ubuntu_2404/Dockerfile +++ b/tools/tests/dockerfiles/ubuntu_2404/Dockerfile @@ -98,6 +98,7 @@ ENV PKG_CONFIG_PATH="/home/precice/.local/lib/pkgconfig:$PKG_CONFIG_PATH" ENV CMAKE_PREFIX_PATH="/home/precice/.local:$CMAKE_PREFIX_PATH" ### end of precice stage ### + FROM precice AS python_bindings ARG PYTHON_BINDINGS_REF From f999cd92a2e522cc09c87c75d45747c65f66bcb8 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Fri, 10 Jul 2026 17:21:35 +0200 Subject: [PATCH 09/15] Remove default for OPENFOAM_ADAPTER_REF --- tools/tests/dockerfiles/ubuntu_2404/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tests/dockerfiles/ubuntu_2404/Dockerfile b/tools/tests/dockerfiles/ubuntu_2404/Dockerfile index 02a139b14..f72ca7f5c 100644 --- a/tools/tests/dockerfiles/ubuntu_2404/Dockerfile +++ b/tools/tests/dockerfiles/ubuntu_2404/Dockerfile @@ -462,7 +462,7 @@ FROM solids4foam/solids4foam:v2.3-openfoam-v2412-latest as solids4foam ARG PRECICE_UID=1000 ARG PRECICE_GID=1000 ARG OPENFOAM_ADAPTER_PR -ARG OPENFOAM_ADAPTER_REF=v1.3.1 +ARG OPENFOAM_ADAPTER_REF USER root SHELL ["/bin/bash", "-c"] From 26c2403805ff9e35b9d8c169b5b912d603f0851c Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Fri, 10 Jul 2026 17:25:45 +0200 Subject: [PATCH 10/15] Adjust the solids4foam component arguments --- tools/tests/components.yaml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/tools/tests/components.yaml b/tools/tests/components.yaml index bb1e6d4fe..ce891f6d1 100644 --- a/tools/tests/components.yaml +++ b/tools/tests/components.yaml @@ -98,18 +98,10 @@ solids4foam: 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" + # The name "PLATFORM" is misleading: For this component, we use a different base image. TUTORIALS_REF: description: Tutorial git reference to use default: "master" - OPENFOAM_EXECUTABLE: - description: exectuable of openfoam to use - default: "openfoam2512" OPENFOAM_ADAPTER_REF: description: Reference/tag of the OpenFOAM adapter to use default: "master" From 4767bb5911f81a21c6a2e7175d6a91e399bf25cc Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Fri, 10 Jul 2026 17:46:48 +0200 Subject: [PATCH 11/15] Move the Dockerfile changes to a standalone Dockerfile --- tools/tests/components.yaml | 3 +- .../ubuntu_2204_solids4foam/Dockerfile | 60 +++++++++++++++++ .../tests/dockerfiles/ubuntu_2404/Dockerfile | 64 ------------------- 3 files changed, 61 insertions(+), 66 deletions(-) create mode 100644 tools/tests/dockerfiles/ubuntu_2204_solids4foam/Dockerfile diff --git a/tools/tests/components.yaml b/tools/tests/components.yaml index ce891f6d1..d8032bff1 100644 --- a/tools/tests/components.yaml +++ b/tools/tests/components.yaml @@ -97,8 +97,7 @@ solids4foam: build_arguments: PLATFORM: description: Dockerfile platform used - default: "ubuntu_2404" - # The name "PLATFORM" is misleading: For this component, we use a different base image. + default: "ubuntu_2204_solids4foam" TUTORIALS_REF: description: Tutorial git reference to use default: "master" diff --git a/tools/tests/dockerfiles/ubuntu_2204_solids4foam/Dockerfile b/tools/tests/dockerfiles/ubuntu_2204_solids4foam/Dockerfile new file mode 100644 index 000000000..6498eb5b7 --- /dev/null +++ b/tools/tests/dockerfiles/ubuntu_2204_solids4foam/Dockerfile @@ -0,0 +1,60 @@ +# A Dockerfile specifically for testing solids4foam, +# based on the ubuntu_2404/Dockerfile. + +FROM solids4foam/solids4foam:v2.3-openfoam-v2412-latest as solids4foam + +ARG PRECICE_UID=1000 +ARG PRECICE_GID=1000 +ARG OPENFOAM_ADAPTER_PR +ARG OPENFOAM_ADAPTER_REF + +USER root +SHELL ["/bin/bash", "-c"] +ENV DEBIAN_FRONTEND=noninteractive + +# Set the same user as the rest of the system tests components, for consistency. +RUN set -eux; \ + if getent group "${PRECICE_GID}" >/dev/null; then \ + existing_group="$(getent group "${PRECICE_GID}" | cut -d: -f1)"; \ + if [ "${existing_group}" != "precice" ]; then \ + groupmod -n precice "${existing_group}"; \ + fi; \ + else \ + groupadd -g "${PRECICE_GID}" precice; \ + fi; \ + if getent passwd "${PRECICE_UID}" >/dev/null; then \ + existing_user="$(getent passwd "${PRECICE_UID}" | cut -d: -f1)"; \ + if [ "${existing_user}" != "precice" ]; then \ + usermod -l precice -d /home/precice -m "${existing_user}"; \ + fi; \ + usermod -g "${PRECICE_GID}" precice; \ + else \ + useradd -u "${PRECICE_UID}" -g "${PRECICE_GID}" -ms /bin/bash precice; \ + fi; \ + mkdir -p /home/precice; \ + chown -R "${PRECICE_UID}:${PRECICE_GID}" /home/precice + +# The base image provides all binaries under /root/, but we prefer to build as a regular user. +RUN mv /root/OpenFOAM/ /home/precice/OpenFOAM/ && \ + chown -R "${PRECICE_UID}:${PRECICE_GID}" /home/precice/OpenFOAM + +# Set a general openfoam executable, to make the component template version-independent +RUN ln -sf /usr/bin/openfoam2412 /usr/bin/openfoam + +RUN apt-get -qq update && \ + apt-get -qq -y install wget git + +# preCICE v3.4 was the last release to support Ubuntu 22.04 (used as a base image), +# so there is no reason to accept the preCICE version as an argument and build it from source. +# Rework this part once a newer base image is used. +RUN wget https://github.com/precice/precice/releases/download/v3.4.1/libprecice3_3.4.1_jammy.deb && \ + apt-get -qq -y install ./libprecice3_3.4.1_jammy.deb + +USER precice +WORKDIR /home/precice + +RUN git clone https://github.com/precice/openfoam-adapter.git &&\ + cd openfoam-adapter && \ + if [ -n "${OPENFOAM_ADAPTER_PR}" ]; then git fetch origin pull/${OPENFOAM_ADAPTER_PR}/head; fi && \ + git checkout ${OPENFOAM_ADAPTER_REF} && \ + /usr/bin/openfoam2412 ./Allwmake -j $(nproc) diff --git a/tools/tests/dockerfiles/ubuntu_2404/Dockerfile b/tools/tests/dockerfiles/ubuntu_2404/Dockerfile index f72ca7f5c..c6c1a4231 100644 --- a/tools/tests/dockerfiles/ubuntu_2404/Dockerfile +++ b/tools/tests/dockerfiles/ubuntu_2404/Dockerfile @@ -450,67 +450,3 @@ RUN cd "${SU2_HOME}" &&\ ./meson.py build -Denable-pywrapper=true --prefix=$SU2_RUN &&\ ./ninja -C build install ### end of su2_adapter stage ### - - -##################################################################### -# Build stages using third-party base images # -##################################################################### - - -FROM solids4foam/solids4foam:v2.3-openfoam-v2412-latest as solids4foam - -ARG PRECICE_UID=1000 -ARG PRECICE_GID=1000 -ARG OPENFOAM_ADAPTER_PR -ARG OPENFOAM_ADAPTER_REF - -USER root -SHELL ["/bin/bash", "-c"] -ENV DEBIAN_FRONTEND=noninteractive - -# Set the same user as the rest of the system tests components, for consistency. -RUN set -eux; \ - if getent group "${PRECICE_GID}" >/dev/null; then \ - existing_group="$(getent group "${PRECICE_GID}" | cut -d: -f1)"; \ - if [ "${existing_group}" != "precice" ]; then \ - groupmod -n precice "${existing_group}"; \ - fi; \ - else \ - groupadd -g "${PRECICE_GID}" precice; \ - fi; \ - if getent passwd "${PRECICE_UID}" >/dev/null; then \ - existing_user="$(getent passwd "${PRECICE_UID}" | cut -d: -f1)"; \ - if [ "${existing_user}" != "precice" ]; then \ - usermod -l precice -d /home/precice -m "${existing_user}"; \ - fi; \ - usermod -g "${PRECICE_GID}" precice; \ - else \ - useradd -u "${PRECICE_UID}" -g "${PRECICE_GID}" -ms /bin/bash precice; \ - fi; \ - mkdir -p /home/precice; \ - chown -R "${PRECICE_UID}:${PRECICE_GID}" /home/precice - -# The base image provides all binaries under /root/, but we prefer to build as a regular user. -RUN mv /root/OpenFOAM/ /home/precice/OpenFOAM/ && \ - chown -R "${PRECICE_UID}:${PRECICE_GID}" /home/precice/OpenFOAM - -# Set a general openfoam executable, to make the component template version-independent -RUN ln -sf /usr/bin/openfoam2412 /usr/bin/openfoam - -RUN apt-get -qq update && \ - apt-get -qq -y install wget git - -# preCICE v3.4 was the last release to support Ubuntu 22.04 (used as a base image), -# so there is no reason to accept the preCICE version as an argument and build it from source. -# Rework this part once a newer base image is used. -RUN wget https://github.com/precice/precice/releases/download/v3.4.1/libprecice3_3.4.1_jammy.deb && \ - apt-get -qq -y install ./libprecice3_3.4.1_jammy.deb - -USER precice -WORKDIR /home/precice - -RUN git clone https://github.com/precice/openfoam-adapter.git &&\ - cd openfoam-adapter && \ - if [ -n "${OPENFOAM_ADAPTER_PR}" ]; then git fetch origin pull/${OPENFOAM_ADAPTER_PR}/head; fi && \ - git checkout ${OPENFOAM_ADAPTER_REF} && \ - /usr/bin/openfoam2412 ./Allwmake -j $(nproc) From 7f26156e108cf2286ea22024ee71d698ebf8f61d Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Fri, 10 Jul 2026 14:52:00 +0200 Subject: [PATCH 12/15] Update perpendicular-flap/solid-solids4foam --- perpendicular-flap/solid-solids4foam/system/fvSchemes | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/perpendicular-flap/solid-solids4foam/system/fvSchemes b/perpendicular-flap/solid-solids4foam/system/fvSchemes index 87d288970..842fba231 100644 --- a/perpendicular-flap/solid-solids4foam/system/fvSchemes +++ b/perpendicular-flap/solid-solids4foam/system/fvSchemes @@ -18,7 +18,7 @@ ddtSchemes gradSchemes { - default extendedLeastSquares 0; + default leastSquaresS4f 0; } divSchemes @@ -46,6 +46,6 @@ interpolationSchemes interpolate(impK) linear; interpolate(grad(D)) linear; interpolate(grad(DD)) linear; - interpolate(sigma0) linear; + interpolate(sigma) linear; } From 38adcc44e542fc56c3bad220b0a8ff7bbaedf97b Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Fri, 10 Jul 2026 17:54:22 +0200 Subject: [PATCH 13/15] Revert "Move the Dockerfile changes to a standalone Dockerfile" This reverts commit 4767bb5911f81a21c6a2e7175d6a91e399bf25cc. --- tools/tests/components.yaml | 3 +- .../ubuntu_2204_solids4foam/Dockerfile | 60 ----------------- .../tests/dockerfiles/ubuntu_2404/Dockerfile | 64 +++++++++++++++++++ 3 files changed, 66 insertions(+), 61 deletions(-) delete mode 100644 tools/tests/dockerfiles/ubuntu_2204_solids4foam/Dockerfile diff --git a/tools/tests/components.yaml b/tools/tests/components.yaml index d8032bff1..ce891f6d1 100644 --- a/tools/tests/components.yaml +++ b/tools/tests/components.yaml @@ -97,7 +97,8 @@ solids4foam: build_arguments: PLATFORM: description: Dockerfile platform used - default: "ubuntu_2204_solids4foam" + default: "ubuntu_2404" + # The name "PLATFORM" is misleading: For this component, we use a different base image. TUTORIALS_REF: description: Tutorial git reference to use default: "master" diff --git a/tools/tests/dockerfiles/ubuntu_2204_solids4foam/Dockerfile b/tools/tests/dockerfiles/ubuntu_2204_solids4foam/Dockerfile deleted file mode 100644 index 6498eb5b7..000000000 --- a/tools/tests/dockerfiles/ubuntu_2204_solids4foam/Dockerfile +++ /dev/null @@ -1,60 +0,0 @@ -# A Dockerfile specifically for testing solids4foam, -# based on the ubuntu_2404/Dockerfile. - -FROM solids4foam/solids4foam:v2.3-openfoam-v2412-latest as solids4foam - -ARG PRECICE_UID=1000 -ARG PRECICE_GID=1000 -ARG OPENFOAM_ADAPTER_PR -ARG OPENFOAM_ADAPTER_REF - -USER root -SHELL ["/bin/bash", "-c"] -ENV DEBIAN_FRONTEND=noninteractive - -# Set the same user as the rest of the system tests components, for consistency. -RUN set -eux; \ - if getent group "${PRECICE_GID}" >/dev/null; then \ - existing_group="$(getent group "${PRECICE_GID}" | cut -d: -f1)"; \ - if [ "${existing_group}" != "precice" ]; then \ - groupmod -n precice "${existing_group}"; \ - fi; \ - else \ - groupadd -g "${PRECICE_GID}" precice; \ - fi; \ - if getent passwd "${PRECICE_UID}" >/dev/null; then \ - existing_user="$(getent passwd "${PRECICE_UID}" | cut -d: -f1)"; \ - if [ "${existing_user}" != "precice" ]; then \ - usermod -l precice -d /home/precice -m "${existing_user}"; \ - fi; \ - usermod -g "${PRECICE_GID}" precice; \ - else \ - useradd -u "${PRECICE_UID}" -g "${PRECICE_GID}" -ms /bin/bash precice; \ - fi; \ - mkdir -p /home/precice; \ - chown -R "${PRECICE_UID}:${PRECICE_GID}" /home/precice - -# The base image provides all binaries under /root/, but we prefer to build as a regular user. -RUN mv /root/OpenFOAM/ /home/precice/OpenFOAM/ && \ - chown -R "${PRECICE_UID}:${PRECICE_GID}" /home/precice/OpenFOAM - -# Set a general openfoam executable, to make the component template version-independent -RUN ln -sf /usr/bin/openfoam2412 /usr/bin/openfoam - -RUN apt-get -qq update && \ - apt-get -qq -y install wget git - -# preCICE v3.4 was the last release to support Ubuntu 22.04 (used as a base image), -# so there is no reason to accept the preCICE version as an argument and build it from source. -# Rework this part once a newer base image is used. -RUN wget https://github.com/precice/precice/releases/download/v3.4.1/libprecice3_3.4.1_jammy.deb && \ - apt-get -qq -y install ./libprecice3_3.4.1_jammy.deb - -USER precice -WORKDIR /home/precice - -RUN git clone https://github.com/precice/openfoam-adapter.git &&\ - cd openfoam-adapter && \ - if [ -n "${OPENFOAM_ADAPTER_PR}" ]; then git fetch origin pull/${OPENFOAM_ADAPTER_PR}/head; fi && \ - git checkout ${OPENFOAM_ADAPTER_REF} && \ - /usr/bin/openfoam2412 ./Allwmake -j $(nproc) diff --git a/tools/tests/dockerfiles/ubuntu_2404/Dockerfile b/tools/tests/dockerfiles/ubuntu_2404/Dockerfile index c6c1a4231..f72ca7f5c 100644 --- a/tools/tests/dockerfiles/ubuntu_2404/Dockerfile +++ b/tools/tests/dockerfiles/ubuntu_2404/Dockerfile @@ -450,3 +450,67 @@ RUN cd "${SU2_HOME}" &&\ ./meson.py build -Denable-pywrapper=true --prefix=$SU2_RUN &&\ ./ninja -C build install ### end of su2_adapter stage ### + + +##################################################################### +# Build stages using third-party base images # +##################################################################### + + +FROM solids4foam/solids4foam:v2.3-openfoam-v2412-latest as solids4foam + +ARG PRECICE_UID=1000 +ARG PRECICE_GID=1000 +ARG OPENFOAM_ADAPTER_PR +ARG OPENFOAM_ADAPTER_REF + +USER root +SHELL ["/bin/bash", "-c"] +ENV DEBIAN_FRONTEND=noninteractive + +# Set the same user as the rest of the system tests components, for consistency. +RUN set -eux; \ + if getent group "${PRECICE_GID}" >/dev/null; then \ + existing_group="$(getent group "${PRECICE_GID}" | cut -d: -f1)"; \ + if [ "${existing_group}" != "precice" ]; then \ + groupmod -n precice "${existing_group}"; \ + fi; \ + else \ + groupadd -g "${PRECICE_GID}" precice; \ + fi; \ + if getent passwd "${PRECICE_UID}" >/dev/null; then \ + existing_user="$(getent passwd "${PRECICE_UID}" | cut -d: -f1)"; \ + if [ "${existing_user}" != "precice" ]; then \ + usermod -l precice -d /home/precice -m "${existing_user}"; \ + fi; \ + usermod -g "${PRECICE_GID}" precice; \ + else \ + useradd -u "${PRECICE_UID}" -g "${PRECICE_GID}" -ms /bin/bash precice; \ + fi; \ + mkdir -p /home/precice; \ + chown -R "${PRECICE_UID}:${PRECICE_GID}" /home/precice + +# The base image provides all binaries under /root/, but we prefer to build as a regular user. +RUN mv /root/OpenFOAM/ /home/precice/OpenFOAM/ && \ + chown -R "${PRECICE_UID}:${PRECICE_GID}" /home/precice/OpenFOAM + +# Set a general openfoam executable, to make the component template version-independent +RUN ln -sf /usr/bin/openfoam2412 /usr/bin/openfoam + +RUN apt-get -qq update && \ + apt-get -qq -y install wget git + +# preCICE v3.4 was the last release to support Ubuntu 22.04 (used as a base image), +# so there is no reason to accept the preCICE version as an argument and build it from source. +# Rework this part once a newer base image is used. +RUN wget https://github.com/precice/precice/releases/download/v3.4.1/libprecice3_3.4.1_jammy.deb && \ + apt-get -qq -y install ./libprecice3_3.4.1_jammy.deb + +USER precice +WORKDIR /home/precice + +RUN git clone https://github.com/precice/openfoam-adapter.git &&\ + cd openfoam-adapter && \ + if [ -n "${OPENFOAM_ADAPTER_PR}" ]; then git fetch origin pull/${OPENFOAM_ADAPTER_PR}/head; fi && \ + git checkout ${OPENFOAM_ADAPTER_REF} && \ + /usr/bin/openfoam2412 ./Allwmake -j $(nproc) From d7b5ca1cd4219d42441c5b3266d741dcf70e706e Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Fri, 10 Jul 2026 17:55:53 +0200 Subject: [PATCH 14/15] Revert TUTORIALS_REF --- tools/tests/reference_versions.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tests/reference_versions.yaml b/tools/tests/reference_versions.yaml index 41c6272ff..a2b84c81c 100644 --- a/tools/tests/reference_versions.yaml +++ b/tools/tests/reference_versions.yaml @@ -25,7 +25,7 @@ OPENFOAM_ADAPTER_REF: "2c3062c" # develop, May 27, 2026 PRECICE_REF: "v3.4.1" PYTHON_BINDINGS_REF: "v3.4.0" SU2_ADAPTER_REF: "5abe79b" # develop, May 27, 2026 -TUTORIALS_REF: "solids4foam-component" +TUTORIALS_REF: "develop" # Additional settings PRECICE_PRESET: "production-audit" \ No newline at end of file From 1510567533896f6e0e7836429b488681a3a24f79 Mon Sep 17 00:00:00 2001 From: preCICE Tests VM Date: Fri, 10 Jul 2026 18:08:54 +0200 Subject: [PATCH 15/15] Add reference results for solids4foam --- .../fluid-openfoam_solid-solids4foam.tar.gz | 3 +++ .../reference-results/reference_results.metadata | 8 +++++--- 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 perpendicular-flap/reference-results/fluid-openfoam_solid-solids4foam.tar.gz diff --git a/perpendicular-flap/reference-results/fluid-openfoam_solid-solids4foam.tar.gz b/perpendicular-flap/reference-results/fluid-openfoam_solid-solids4foam.tar.gz new file mode 100644 index 000000000..1f60848fd --- /dev/null +++ b/perpendicular-flap/reference-results/fluid-openfoam_solid-solids4foam.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:29e4d0f83bc001b8ccd6eecda3b77f5b6a9b8b1c1dd36b42bbb0ae055181db6c +size 23231 diff --git a/perpendicular-flap/reference-results/reference_results.metadata b/perpendicular-flap/reference-results/reference_results.metadata index 50e165dc1..5e1addbd8 100644 --- a/perpendicular-flap/reference-results/reference_results.metadata +++ b/perpendicular-flap/reference-results/reference_results.metadata @@ -11,7 +11,7 @@ We also include some information on the machine used to generate them | name | time | sha256 | |------|------|-------| -| fluid-openfoam_solid-dune.tar.gz | 2026-07-08 13:13:57 | 06408d6dac453863c981a733defbe3bc807f1bc2fb15d04f2551060dd010692b | +| fluid-openfoam_solid-solids4foam.tar.gz | 2026-07-10 18:05:57 | 29e4d0f83bc001b8ccd6eecda3b77f5b6a9b8b1c1dd36b42bbb0ae055181db6c | ## List of arguments used to generate the files @@ -19,8 +19,9 @@ We also include some information on the machine used to generate them |------|------| | PLATFORM | ubuntu_2404 | | CALCULIX_VERSION | 2.20 | -| DUNE_VERSION | 2.9 | | DUMUX_VERSION | 3.7 | +| DUNE_VERSION_DUMUX | 2.9 | +| DUNE_VERSION_DUNE | 2.9 | | OPENFOAM_EXECUTABLE | openfoam2512 | | SU2_VERSION | 7.5.1 | | FENICS_ADAPTER_REF | v2.3.0 | @@ -28,13 +29,14 @@ We also include some information on the machine used to generate them | FMI_RUNNER_REF | v0.2.1 | | CALCULIX_ADAPTER_REF | v2.20.1 | | DEALII_ADAPTER_REF | a421d92 | +| DUNE_ADAPTER_REF | 778d3bb | | DUMUX_ADAPTER_REF | 3f3f54f | | MICRO_MANAGER_REF | bf5ea7b | | OPENFOAM_ADAPTER_REF | 2c3062c | | PRECICE_REF | b770460f2447b94da430086085d6b424e7c073e9 | | PYTHON_BINDINGS_REF | v3.4.0 | | SU2_ADAPTER_REF | 5abe79b | -| TUTORIALS_REF | 54cd04a8e5aa8f4efdce53785d298c115e7e287a | +| TUTORIALS_REF | d7b5ca1cd4219d42441c5b3266d741dcf70e706e | | PRECICE_PRESET | production-audit | | PRECICE_UID | 1003 | | PRECICE_GID | 1003 |