From f44dda6cc349fc85645bb6769ef1369ea9f09d84 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Sat, 13 Jun 2026 21:25:03 +0200 Subject: [PATCH 1/6] 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 2/6] 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 3/6] 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 4/6] 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 5/6] 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 6/6] 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