Skip to content

Commit

Permalink
Add image to documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminRodenberg committed Oct 11, 2023
1 parent d5a8a15 commit 9ca81a0
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 0 deletions.
6 changes: 6 additions & 0 deletions partitioned-heat-conduction-schwarz/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ summary: We solve a simple heat equation. The domain is partitioned and the coup
Get the [case files of this tutorial](https://github.com/precice/tutorials/tree/master/partitioned-heat-conduction-schwarz). Read how in the [tutorials introduction](https://www.precice.org/tutorials.html).
{% endnote %}

## Setup

We solve a partitioned heat equation, but apply an overlapping Schwarz-type domain decomposition method in this tutorial.

![Case setup of partitioned-heat-conduction case with Schwarz-type domain decomposition](images/tutorials-partitioned-heat-conduction-schwarz-setup.png)

## Running the simulation

This tutorial is for FEniCS.
Expand Down
9 changes: 9 additions & 0 deletions partitioned-heat-conduction-schwarz/images/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*.aux
*.auxlock
*.fdb_latexmk
*.fls
*.log
tikzcode.pdf
*.synctex.gz
*.dpth
*.md5
75 changes: 75 additions & 0 deletions partitioned-heat-conduction-schwarz/images/tikzcode.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
\documentclass{standalone}

\usepackage{tikz}
\usetikzlibrary{fit,positioning,calc}

\usepackage{pgfplots}
\pgfplotsset{
compat=1.16,
}
\usepgfplotslibrary{external}
\tikzexternalize[
only named,
]

\definecolor{pblue}{RGB}{0,102,189} % precice blue
\definecolor{porange}{RGB}{243,98,33} % precice orange

% Make the 'export as png' a seperate style, with default density 200
\tikzset{
export as png/.style={
external/system call/.add={}{
&& convert -density #1 -transparent white "\image.pdf" "\image.png"
},
},
export as png/.default={200},
}

\begin{document}

\tikzset{export as png}
\tikzsetnextfilename{tutorials-partitioned-heat-conduction-schwarz-setup}
\begin{tikzpicture}
\draw[fill=pblue!50](0,0) rectangle ++(1,1);
\draw
(0,0) coordinate (a)
rectangle
++(3,3) coordinate (b);
\node[fill=pblue!50, draw=black, fit=(a) (b),inner sep=0pt] (participantL) {$\Omega_\mathcal{L}$};

\draw
($(participantL.south east)+(1,0)$) coordinate (a)
rectangle
++(3,3) coordinate (b);
\node[fill=porange!50, draw=black, fit=(a) (b),inner sep=0pt] (participantR) {$\Omega_\mathcal{R}$};

\draw
($(participantL.south east)-(1,0)$) coordinate (a)
rectangle
($(participantL.north east)$) coordinate (b);
\node[fill=porange!50,opacity=0.5, fit=(a) (b),inner sep=0pt] (overlapL){};

\draw
($(participantR.south west)+(1,0)$) coordinate (a)
rectangle
($(participantR.north west)$) coordinate (b);
\node[fill=pblue!50,opacity=0.5, fit=(a) (b),inner sep=0pt] (overlapR){};

\node[below = 0.2cm of participantR](overlapLabel){Overlapping region: $\Omega_\mathcal{R}\cap\Omega_\mathcal{L}$};
\draw[dashed] ([yshift=-.5cm]overlapL.center) -- (overlapLabel);
\draw[dashed] ([yshift=-.5cm]overlapR.center) -- (overlapLabel);

\draw[very thick, pblue]($(participantL.south east)-(1,0)$) -- ($(participantL.north east)-(1,0)$);
\draw[very thick, porange]($(participantR.south west)+(1,0)$) -- ($(participantR.north west)+(1,0)$);

\draw[very thick, porange](participantL.south east) -- node[left]{$\Gamma_\mathcal{R}$}($(participantL.north east)$);
\draw[very thick, pblue](participantR.south west) -- node[right]{$\Gamma_\mathcal{L}$} ($(participantR.north west)$);

\node[left = 0cm of participantL,align=center] {Dirichlet solver $\mathcal{L}$\\ acts on left part $\Omega_\mathcal{L}$};
\node[right = 0cm of participantR,align=center] {Dirichlet solver $\mathcal{R}$\\ acts on right part $\Omega_\mathcal{R}$};

\draw[->]($(participantR.north west)+(1,0)$) to[out=150,in=30] node[above right,align=center]{Temperature $u$ on $\Gamma_\mathcal{R}$ for $\mathcal{L}$} (participantL.north east);
\draw[->]($(participantL.north east)-(1,0)$) to[out=30,in=150] node[above left,align=center]{Temperature $u$ on $\Gamma_\mathcal{L}$ for $\mathcal{R}$} (participantR.north west);
\end{tikzpicture}

\end{document}
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9ca81a0

Please sign in to comment.