Skip to content

Commit 722a662

Browse files
authored
Update elastic-tube-1d Fortran cases and add them to the tests (#823)
1 parent 00a0756 commit 722a662

20 files changed

Lines changed: 96 additions & 41 deletions

changelog-entries/823.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Updated the elastic-tube-1d fortran-module cases to download the fortran-module into `thirdparty/` [#823](https://github.com/precice/tutorials/pull/823)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
thirdparty/

elastic-tube-1d/fluid-fortran-module/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ add_executable(FluidSolver
2020
src/FluidComputeSolution.f90
2121
src/utilities.f90
2222
src/FluidSolver.f90
23-
src/precice.f90
23+
thirdparty/precice.f90
2424
)
2525

2626
target_link_libraries(FluidSolver PRIVATE precice::precice)

elastic-tube-1d/fluid-fortran-module/run.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ set -e -u
44
. ../../tools/log.sh
55
exec > >(tee --append "$LOGFILE") 2>&1
66

7-
if [ ! -f src/precice.f90 ]; then
8-
echo "Fetching precice.f90 (Module for Fortran bindings of preCICE)..."
9-
curl -o src/precice.f90 https://raw.githubusercontent.com/precice/fortran-module/master/precice.f90
7+
if [ ! -f thirdparty/precice.f90 ]; then
8+
# Get the preCICE Fortran module. Switch the branch with ./run.sh <branch>.
9+
DEFAULT_BRANCH="main"
10+
echo "Fetching precice.f90 from https://github.com/precice/fortran-module/tree/${1:-$DEFAULT_BRANCH}..."
11+
curl --create-dirs -o thirdparty/precice.f90 "https://raw.githubusercontent.com/precice/fortran-module/${1:-$DEFAULT_BRANCH}/precice.f90"
1012
fi
1113

1214
if [ ! -d build ]; then

elastic-tube-1d/fluid-fortran-module/src/FluidSolver.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ program FluidSolver
101101
vertexIDs(i) = i - 1
102102
end do
103103

104-
call precicef_set_vertices(meshName, chunkLength, grid, vertexIDs, len_trim(meshName))
104+
call precicef_set_mesh_vertices(meshName, chunkLength, grid, vertexIDs, len_trim(meshName))
105105

106106
! Check if Initial Data is Required and Write if Necessary
107107
call precicef_requires_initial_data(bool)

elastic-tube-1d/fluid-fortran/src/FluidSolver.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ program FluidSolver
100100
vertexIDs(i) = i - 1
101101
end do
102102

103-
call precicef_set_vertices(meshName, chunkLength, grid, vertexIDs)
103+
call precicef_set_mesh_vertices(meshName, chunkLength, grid, vertexIDs)
104104

105105
! Check if Initial Data is Required and Write if Necessary
106106
call precicef_requires_initial_data(bool)

elastic-tube-1d/metadata.yaml

Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,56 @@ cases:
1010
fluid-cpp:
1111
participant: Fluid
1212
directory: ./fluid-cpp
13-
run: mkdir build && cmake -S . -B build && cmake --build build && ./run.sh
13+
run: ./run.sh
1414
component: bare
1515

16-
solid-cpp:
17-
participant: Solid
18-
directory: ./solid-cpp
19-
run: mkdir build && cmake -S . -B build && cmake --build build && ./run.sh
16+
fluid-fortran:
17+
participant: Fluid
18+
directory: ./fluid-fortran
19+
run: ./run.sh
2020
component: bare
21-
21+
22+
fluid-fortran-module:
23+
participant: Fluid
24+
directory: ./fluid-fortran-module
25+
run: ./run.sh develop
26+
component: bare
27+
2228
fluid-python:
2329
participant: Fluid
2430
directory: ./fluid-python
2531
run: ./run.sh
2632
component: python-bindings
27-
28-
solid-python:
29-
participant: Solid
30-
directory: ./solid-python
31-
run: ./run.sh
32-
component: python-bindings
33-
33+
3434
fluid-rust:
3535
participant: Fluid
3636
directory: ./fluid-rust
3737
run: ./run.sh
3838
component: bare
39+
40+
solid-cpp:
41+
participant: Solid
42+
directory: ./solid-cpp
43+
run: ./run.sh
44+
component: bare
45+
46+
solid-fortran:
47+
participant: Solid
48+
directory: ./solid-fortran
49+
run: ./run.sh
50+
component: bare
51+
52+
solid-fortran-module:
53+
participant: Solid
54+
directory: ./solid-fortran-module
55+
run: ./run.sh develop
56+
component: bare
57+
58+
solid-python:
59+
participant: Solid
60+
directory: ./solid-python
61+
run: ./run.sh
62+
component: python-bindings
3963

4064
solid-rust:
4165
participant: Solid
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:6cdb7515613c0d6ef5f7e3d86c08e4d0dd933ccec1b41c5459c956d8b68c84e0
3-
size 250418
2+
oid sha256:96e14acd91881112e38f7e4445329c565178353b62c1bebbc8a72a63d03cc0e6
3+
size 250333
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:3a87326b2673b9a17ce94a9c280d4c76664a9465946a1b18e9fa118c70be51a6
3-
size 25983
2+
oid sha256:6c79542944d1d623b8a39110e8534b7297a1f5fe62348c00e4e34279e23ae25b
3+
size 25969
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:6cf76ce3df2836f842c3db9928ba3fe97af7e14c6244f45e5c672379481254af
3+
size 250849

0 commit comments

Comments
 (0)