Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
0af5285
G+Smo cpp file; run scripts; clean scripts
Crazy-Rich-Meghan Dec 4, 2024
ec7bbcb
Merge branch 'precice:develop' into partitioned-heat-conduction
Crazy-Rich-Meghan Dec 4, 2024
b66de59
Update README.md for G+Smo; rename files
Crazy-Rich-Meghan Dec 4, 2024
5a0fd18
Fix README.md
Crazy-Rich-Meghan Dec 4, 2024
5c46bfc
Merge branch 'precice:develop' into partitioned-heat-conduction
Crazy-Rich-Meghan Sep 10, 2025
4b0ae69
Direct mesh access version for partitioned heat conduction
Crazy-Rich-Meghan Sep 10, 2025
1df1cfc
Merge branch 'precice:develop' into partitioned-heat-conduction
Crazy-Rich-Meghan Oct 16, 2025
2f62738
Update partitioned-heat-conduction/README.md
Crazy-Rich-Meghan Oct 16, 2025
75fa072
Update partitioned-heat-conduction/README.md
Crazy-Rich-Meghan Oct 16, 2025
c3507fc
Update partitioned-heat-conduction/README.md
MakisH Jan 20, 2026
598712e
Merge branch 'develop' into partitioned-heat-conduction
MakisH Jan 20, 2026
002ed8a
Address review comments for G+Smo tutorial
Crazy-Rich-Meghan Jan 21, 2026
a090112
Merge branch 'develop' into partitioned-heat-conduction
MakisH Jan 22, 2026
9f4e55b
Fix style issues in run.sh and README
Crazy-Rich-Meghan Apr 15, 2026
254c5e8
Merge branch 'develop' into partitioned-heat-conduction
MakisH Apr 30, 2026
65ef52c
Make run.sh scripts consistent
MakisH May 13, 2026
98177b5
Use api-access instead of deprecated direct-access
Crazy-Rich-Meghan May 13, 2026
c6b9d30
Document the gsPreCICE submodule dependency for the G+Smo build
Crazy-Rich-Meghan May 13, 2026
e0e8609
Extend clean_gismo() to clean .vtp, .vts, .pvd files
MakisH May 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions partitioned-heat-conduction-direct/dirichlet-gismo/clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env sh
set -e -u

. ../../tools/cleaning-tools.sh

clean_gismo .
9 changes: 9 additions & 0 deletions partitioned-heat-conduction-direct/dirichlet-gismo/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -e -u

. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1

./partitioned-heat-conduction -s 0 -c ../precice-config.xml --plot

close_log
6 changes: 6 additions & 0 deletions partitioned-heat-conduction-direct/neumann-gismo/clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env sh
set -e -u

. ../../tools/cleaning-tools.sh

clean_gismo .
9 changes: 9 additions & 0 deletions partitioned-heat-conduction-direct/neumann-gismo/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -e -u

. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1

./partitioned-heat-conduction -s 1 -c ../precice-config.xml --plot

close_log
4 changes: 2 additions & 2 deletions partitioned-heat-conduction-direct/precice-config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@

<participant name="Dirichlet">
<provide-mesh name="Dirichlet-Mesh" />
<receive-mesh name="Neumann-Mesh" from="Neumann" direct-access="true" />
<receive-mesh name="Neumann-Mesh" from="Neumann" api-access="true" />
<write-data name="Heat-Flux" mesh="Neumann-Mesh" />
<read-data name="Temperature" mesh="Dirichlet-Mesh" />
</participant>

<participant name="Neumann">
<provide-mesh name="Neumann-Mesh" />
<receive-mesh name="Dirichlet-Mesh" from="Dirichlet" direct-access="true" />
<receive-mesh name="Dirichlet-Mesh" from="Dirichlet" api-access="true" />
<write-data name="Temperature" mesh="Dirichlet-Mesh" />
<read-data name="Heat-Flux" mesh="Neumann-Mesh" />
</participant>
Expand Down
34 changes: 33 additions & 1 deletion partitioned-heat-conduction/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Partitioned heat conduction
permalink: tutorials-partitioned-heat-conduction.html
keywords: FEniCS, Nutils, Heat conduction
keywords: FEniCS, Nutils, G+Smo, Heat conduction
summary: We solve a simple heat equation. The domain is partitioned and the coupling is established in a Dirichlet-Neumann fashion.
---

Expand Down Expand Up @@ -39,6 +39,8 @@ You can either couple a solver with itself or different solvers with each other.

* OpenFOAM. This case uses the custom [heatTransfer](https://github.com/precice/tutorials/blob/master/partitioned-heat-conduction/solver-openfoam/heatTransfer.C) solver (find it in `solver-openfoam` and build with `wmake`). Read more details in the [OpenFOAM adapter](https://precice.org/adapter-openfoam-overview.html).

* G+Smo. Install the [G+Smo adapter](https://precice.org/adapter-gismo.html).

## Running the simulation

You can find the corresponding `run.sh` script for running the case in the folders corresponding to the participant you want to use:
Expand Down Expand Up @@ -75,6 +77,34 @@ If you want to use Nutils or OpenFOAM, use `cd dirichlet/neumann-nutils`, respec
mpirun -n <N_PROC> heat.py -d
```

For running G+Smo, follow the [G+Smo adapter installation instructions](https://precice.org/adapter-gismo.html) to build the `partitioned-heat-conduction` example. This tutorial only requires the `gsPreCICE` submodule:

```bash
cmake .. -DGISMO_OPTIONAL="gsPreCICE"
make partitioned-heat-conduction
```

Then link the compiled executable to the `dirichlet-gismo` and `neumann-gismo` folders:

```bash
cd <tutorial-directory>/partitioned-heat-conduction/dirichlet-gismo
ln -sf <gismo-build-directory>/bin/partitioned-heat-conduction ./partitioned-heat-conduction
cd ../neumann-gismo
ln -sf <gismo-build-directory>/bin/partitioned-heat-conduction ./partitioned-heat-conduction
```

Then open two terminals and run:

```bash
cd dirichlet-gismo
./run.sh
```

```bash
cd neumann-gismo
./run.sh
Comment thread
MakisH marked this conversation as resolved.
```

### Note on the combination of Nutils & FEniCS

You can mix the Nutils and FEniCS solver, if you like. Note that the error for a pure FEniCS simulation is lower than for a mixed one. We did not yet study the origin of this error, but assume that this is due to the fact that Nutils uses Gauss points as coupling mesh and therefore entails extrapolation in the data mapping at the top and bottom corners.
Expand All @@ -87,6 +117,8 @@ For FEniCS you can visualize the content with paraview by opening the `*.pvd` fi

For Nutils, please use the files `Dirichlet-*.vtk` or `Neumann-*.vtk`. Please note that these files contain the temperature as well as the reference solution.

For G+Smo, please use the generated `solution.pvd` files in the dirichlet-gismo and neumann-gismo directories.

![Animation of the partitioned heat equation](images/tutorials-partitioned-heat-conduction-FEniCS-movie.gif)

Visualization in paraview for `x_c = 1.5`.
Expand Down
6 changes: 6 additions & 0 deletions partitioned-heat-conduction/dirichlet-gismo/clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env sh
set -e -u

. ../../tools/cleaning-tools.sh

clean_gismo .
9 changes: 9 additions & 0 deletions partitioned-heat-conduction/dirichlet-gismo/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -e -u

. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1

./partitioned-heat-conduction -s 0 -c ../precice-config.xml --plot

close_log
6 changes: 6 additions & 0 deletions partitioned-heat-conduction/neumann-gismo/clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env sh
set -e -u

. ../../tools/cleaning-tools.sh

clean_gismo .
9 changes: 9 additions & 0 deletions partitioned-heat-conduction/neumann-gismo/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -e -u

. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1

./partitioned-heat-conduction -s 1 -c ../precice-config.xml --plot

close_log
3 changes: 3 additions & 0 deletions tools/cleaning-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ clean_gismo(){
cd "$1"
echo "- Cleaning up G+Smo case in $(pwd)"
rm -rfv ./output/
rm -fv ./*.vtp
rm -fv ./*.vts
rm -fv ./*.pvd
clean_precice_logs .
clean_case_logs .
)
Expand Down
Loading