|
| 1 | +\documentclass{standalone} |
| 2 | + |
| 3 | +\usepackage{tikz} |
| 4 | +\usetikzlibrary{fit,positioning,calc} |
| 5 | + |
| 6 | +\usepackage{pgfplots} |
| 7 | +\pgfplotsset{ |
| 8 | + compat=1.16, |
| 9 | +} |
| 10 | +\usepgfplotslibrary{external} |
| 11 | +\tikzexternalize[ |
| 12 | + only named, |
| 13 | +] |
| 14 | + |
| 15 | +\definecolor{pblue}{RGB}{0,102,189} % precice blue |
| 16 | +\definecolor{porange}{RGB}{243,98,33} % precice orange |
| 17 | + |
| 18 | +% Make the 'export as png' a seperate style, with default density 200 |
| 19 | +\tikzset{ |
| 20 | + export as png/.style={ |
| 21 | + external/system call/.add={}{ |
| 22 | + && convert -density #1 -transparent white "\image.pdf" "\image.png" |
| 23 | + }, |
| 24 | + }, |
| 25 | + export as png/.default={200}, |
| 26 | +} |
| 27 | + |
| 28 | +\begin{document} |
| 29 | + |
| 30 | +\tikzset{export as png} |
| 31 | +\tikzsetnextfilename{tutorials-partitioned-heat-conduction-schwarz-setup} |
| 32 | +\begin{tikzpicture} |
| 33 | + \draw |
| 34 | + (0,0) coordinate (a) |
| 35 | + rectangle |
| 36 | + ++(3,3) coordinate (b); |
| 37 | + \node[fill=pblue!50, draw=black, fit=(a) (b),inner sep=0pt] (participantL) {$\Omega_\mathcal{L}$}; |
| 38 | + |
| 39 | + \draw |
| 40 | + ($(participantL.south east)+(2,0)$) coordinate (a) |
| 41 | + rectangle |
| 42 | + ++(3,3) coordinate (b); |
| 43 | + \node[fill=porange!50, draw=black, fit=(a) (b),inner sep=0pt] (participantR) {$\Omega_\mathcal{R}$}; |
| 44 | + |
| 45 | + \draw |
| 46 | + ($(participantL.south east)-(1,0)$) coordinate (a) |
| 47 | + rectangle |
| 48 | + ($(participantL.north east)$) coordinate (b); |
| 49 | + \node[fill=porange!50,opacity=0.5, fit=(a) (b),inner sep=0pt] (overlapL){}; |
| 50 | + |
| 51 | + \draw |
| 52 | + ($(participantR.south west)+(1,0)$) coordinate (a) |
| 53 | + rectangle |
| 54 | + ($(participantR.north west)$) coordinate (b); |
| 55 | + \node[fill=pblue!50,opacity=0.5, fit=(a) (b),inner sep=0pt] (overlapR){}; |
| 56 | + |
| 57 | + \node[below = 0.5cm of participantR,xshift=-0.2cm](overlapLabel){Overlapping region: $\Omega_\mathcal{R}\cap\Omega_\mathcal{L}$}; |
| 58 | + \draw[dashed] ([yshift=-.5cm]overlapL.center) -- (overlapLabel); |
| 59 | + \draw[dashed] ([yshift=-.5cm]overlapR.center) -- (overlapLabel); |
| 60 | + |
| 61 | + \draw[very thick, pblue]($(participantL.south east)-(1,0)$) -- ($(participantL.north east)-(1,0)$); |
| 62 | + \draw[very thick, porange]($(participantR.south west)+(1,0)$) -- ($(participantR.north west)+(1,0)$); |
| 63 | + |
| 64 | + \draw[very thick, porange](participantL.south east) -- node[right]{$\Gamma_\mathcal{R}$}($(participantL.north east)$); |
| 65 | + \draw[very thick, pblue](participantR.south west) -- node[left]{$\Gamma_\mathcal{L}$} ($(participantR.north west)$); |
| 66 | + |
| 67 | + \node[left = 0cm of participantL,align=center] {Dirichlet solver $\mathcal{L}$\\ acts on left part $\Omega_\mathcal{L}$}; |
| 68 | + \node[right = 0cm of participantR,align=center] {Dirichlet solver $\mathcal{R}$\\ acts on right part $\Omega_\mathcal{R}$}; |
| 69 | + |
| 70 | + \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); |
| 71 | + \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); |
| 72 | + |
| 73 | + \draw[draw=none] (participantL.south east) -- node[below]{$\Gamma_D$} (participantL.south west); |
| 74 | + \draw[draw=none] (participantR.south east) -- node[below]{$\Gamma_D$} (participantR.south west); |
| 75 | +\end{tikzpicture} |
| 76 | + |
| 77 | +\end{document} |
0 commit comments