Iniital commit of thesis.tex and stuff
This commit is contained in:
@@ -0,0 +1,89 @@
|
||||
% http://www.texample.net/tikz/examples/flexible-flow-chart/
|
||||
\documentclass{standalone}
|
||||
\usepackage{tikz}
|
||||
\usetikzlibrary{shapes,arrows,chains}
|
||||
\begin{document}
|
||||
% -------------------------------------------------
|
||||
% Color definition
|
||||
\definecolor{myblue}{HTML}{2B86C0}
|
||||
\definecolor{myred}{HTML}{C14400}
|
||||
\definecolor{myyellow}{HTML}{FFD700}
|
||||
\definecolor{mygreen}{HTML}{3F681C}
|
||||
|
||||
%https://www.schemecolor.com/cute-lights.php
|
||||
\definecolor{startstopcolor}{HTML}{FF555E}
|
||||
\definecolor{testcolor}{HTML}{FFE981}
|
||||
\definecolor{proccolor}{HTML}{83B2FF}
|
||||
% -------------------------------------------------
|
||||
% Debugging Layer
|
||||
% top
|
||||
\pgfdeclarelayer{marx}
|
||||
\pgfsetlayers{main,marx}
|
||||
% A macro for marking coordinates (specific to the coordinate naming
|
||||
% scheme used here). Swap the following 2 definitions to deactivate
|
||||
% marks.
|
||||
|
||||
\providecommand{\cmark}[2][]{\relax}
|
||||
\providecommand{\cmark}[2][]{%
|
||||
\begin{pgfonlayer}{marx}
|
||||
\node [nmark] at (c#2#1) {#2};
|
||||
\end{pgfonlayer}{marx}
|
||||
}
|
||||
|
||||
% -------------------------------------------------
|
||||
% Start the picture
|
||||
\begin{tikzpicture}[%
|
||||
>=triangle 60, % Nice arrows; your taste may be different
|
||||
start chain=going below, % General flow is top-to-bottom
|
||||
node distance=6mm and 60mm, % Global setup of box spacing
|
||||
every join/.style={arrow}, % Default linetype for connecting boxes
|
||||
]
|
||||
% -------------------------------------------------
|
||||
% Box styles
|
||||
\tikzset{
|
||||
base/.style={draw, on chain, on grid, align=center, minimum height=4ex, font=\sffamily, draw=none},
|
||||
proc/.style={base, rectangle, text width=10em, fill=proccolor},
|
||||
test/.style={base, diamond, aspect=3, text width=5em, fill=testcolor},
|
||||
startstop/.style={proc, minimum height=6ex, fill=startstopcolor},
|
||||
%base/.style={draw, on chain, on grid, align=center, minimum height=4ex, font=\sffamily},
|
||||
%proc/.style={base, rectangle, text width=10em},
|
||||
%test/.style={base, diamond, aspect=3, text width=5em},
|
||||
%startstop/.style={proc, minimum height=6ex},
|
||||
% Debug styles
|
||||
coord/.style={coordinate, on chain, on grid, node distance=6mm and 25mm},
|
||||
nmark/.style={draw, cyan, circle, font={\sffamily}},
|
||||
% Line styles
|
||||
arrow/.style={->, draw, black},
|
||||
slabel/.style={near start, xshift=1em, font=\sffamily},
|
||||
welabel/.style={near start, yshift=-0.8em, font=\sffamily},
|
||||
}
|
||||
% -------------------------------------------------
|
||||
% Nodes
|
||||
\node [startstop] (start) {Start of Processing};
|
||||
\node [test, join] (test) {$n_\mathrm{left} \leq n_\mathrm{step} \cdot n_\mathrm{cores}$ };
|
||||
\node [proc] (sim) {Run simulation of $n_\mathrm{step}$ on each core};
|
||||
\node [proc, join] (avg) {Average densities among all cores};
|
||||
|
||||
\node [proc, right=of sim, xshift=-3em] (split) {Split up $n_\mathrm{left}$ among cores and simulate};
|
||||
\node [startstop, join] (end) {End of Processing};
|
||||
|
||||
|
||||
% -------------------------------------------------
|
||||
% Coordinate markers
|
||||
\node [coord, below=of avg, yshift=-0.5em] (c0) {}; \cmark{0}
|
||||
\node [coord, left=of test, xshift=-1em] (c1) {}; \cmark{1}
|
||||
\node [coord, right=of test] (c2) {}; \cmark{2}
|
||||
|
||||
% -------------------------------------------------
|
||||
% North south connectors
|
||||
\path (test.south) to node [slabel] {no} (sim);
|
||||
\draw [arrow] (test.south) -- (sim);
|
||||
|
||||
% % -------------------------------------------------
|
||||
% % Complicated connectors
|
||||
\draw [arrow] (avg.south) -- (c0) -| (c1) -- (test.west);
|
||||
\draw [arrow] (test.east) -| (split.north);
|
||||
\path (test.east) to node [welabel] {yes} (c2);
|
||||
|
||||
\end{tikzpicture}
|
||||
\end{document}
|
||||
Reference in New Issue
Block a user