Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 2013-PippingSanderKornhuber
  • 2014-Dissertation-Pipping
  • 2016-PippingKornhuberRosenauOncken
  • 2021-GraeserKornhuberPodlesny
  • 2022-Strikeslip-Benchmark
  • AverageCrosspoints
  • Dissertation2021
  • last_working
  • old_solver_new_datastructure
  • separate-deformation
10 results

Target

Select target project
  • podlesny / dune-tectonic
  • agnumpde / dune-tectonic
2 results
Select Git revision
  • 2013-PippingSanderKornhuber
  • 2014-Dissertation-Pipping
  • 2016-PippingKornhuberRosenauOncken
3 results
Show changes

Commits on Source 178

78 additional commits have been omitted to prevent performance issues.
368 files
+ 28937
3425
Compare changes
  • Side-by-side
  • Inline

Files

+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ include(DuneMacros)

# start a dune project with information from dune.module
dune_project()

dune_enable_all_packages()
find_package(HDF5 COMPONENTS C REQUIRED)

add_subdirectory("src")
+91 −0
Original line number Diff line number Diff line
\pgfplotsarraynew\heights{%
  -40\\-20\\-10\\-5\\-2.5\\%
  0\\%
  2.5\\5\\10\\20\\40\\%
}
\def\fnamebase{2d-dip-contours}
\def\fname{rfpitol=100e-7}

\newread\threequakesminread
\openin\threequakesminread=generated/timeframe:min:threequakes:\fname.tex
\read\threequakesminread to \threequakesmin
\closein\threequakesminread

\newread\threequakesmaxread
\openin\threequakesmaxread=generated/timeframe:max:threequakes:\fname.tex
\read\threequakesmaxread to \threequakesmax
\closein\threequakesmaxread

\begin{tikzpicture}[trim axis group left, trim axis group right]
  \begin{groupplot}[
    xmin=\threequakesmin, xmax=\threequakesmax, max space between ticks=40pt,
    x tick label style={ /pgf/number format/1000 sep={} },
    tick label style={font=\footnotesize},
    label style={font=\small},
    group style={
      x descriptions at = edge bottom,
      group size=1 by 4,
      vertical sep=0cm
    },
    width=12cm,
    enlargelimits=false]
    \nextgroupplot[
    semithick,
    height = 6.5cm,
    /pgf/number format/1000 sep={},
    ymax=0.7,
    colormap/jet,
    y tick label style={
      /pgf/number format/.cd,
      fixed, fixed zerofill, precision=2,
      /tikz/.cd
    },
    tick label style={font=\footnotesize},
    label style={font=\small},
    legend style={font=\small,
                  at={(1.05,1)},
                  anchor=north west,
                  fill=none},
    ylabel = distance from trench, y unit = m,
    legend cell align=right,
    contour/labels=false,
    contour prepared]
    \pgfplotsinvokeforeach{1,...,9} { % level 0 and 10 are empty
      \pgfplotscolormapaccess[0:10]{#1}{jet}
      \def\TEMP{\definecolor{mycolor#1}{rgb}}
      \expandafter\TEMP\expandafter{\pgfmathresult}
      \def\fnameX{generated/\fnamebase:\fname:level:%
        \pgfplotsarrayvalueofelem#1\of\heights.tex}
      \addplot[contour prepared={draw color=mycolor#1}, forget plot] table \fnameX;
      \addlegendimage{line legend,color=mycolor#1}
      \addlegendentry{%
         \SI{\pgfplotsarrayvalueofelem#1\of\heights}{\micro\meter}}
    };
    \nextgroupplot[
    semithick,
    height = 3.5cm,
    ylabel style={align=center}, ylabel = time step\\size, y unit = s,
    ytick={1e-3,1e-2,1e-1},
    ymax = 1, ymin = 1e-4,
    ymode = log]
    \addplot[const plot, mark=none] table[col sep=comma, y=timeIncrement]
    {generated/2d-performance:\fname.csv};
    \nextgroupplot[
    semithick,
    height = 3.5cm,
    ylabel style={align=center}, ylabel=fixed-point\\iterations,
    ytick={2,4,6,8},
    ymin=0, ymax=10]
    \addplot[const plot, mark=none] table[col sep=comma, y=fixedPointIterations]
    {generated/2d-performance:\fname.csv};
    \nextgroupplot[
    semithick,
    height = 3.5cm,
    xlabel = time, x unit = s,
    ylabel style={align=center}, ylabel=multigrid\\iterations,
    ytick={5,10,15,20},
    ymin=0, ymax=25]
    \addplot[const plot, mark=none] table[col sep=comma, y=multiGridIterations]
    {generated/2d-performance:\fname.csv};
  \end{groupplot}
\end{tikzpicture}
+51 −0
Original line number Diff line number Diff line
\def\fnamebase{dip-single-points}
\def\fname{rfpitol=100e-7}

\newread\threequakesminread
\openin\threequakesminread=generated/timeframe:min:threequakes:\fname.tex
\read\threequakesminread to \threequakesmin
\closein\threequakesminread

\newread\threequakesmaxread
\openin\threequakesmaxread=generated/timeframe:max:threequakes:\fname.tex
\read\threequakesmaxread to \threequakesmax
\closein\threequakesmaxread

\begin{tikzpicture}[trim axis left, trim axis right]
  \begin{axis}[
    xmin=\threequakesmin, xmax=\threequakesmax, max space between ticks=40pt,
    /pgf/number format/1000 sep={},
    x tick label style={
      /pgf/number format/.cd,
      1000 sep={},
      /tikz/.cd
    },
    y tick label style={
      /pgf/number format/.cd,
      fixed, fixed zerofill, precision=2,
      /tikz/.cd
    },
    tick label style={font=\footnotesize},
    label style={font=\small},
    legend style={font=\small, at={(1.05,1)},
                  anchor=north west,
                  fill=none},
    legend entries={
      \SI{15}{\centi\meter},
      \SI{30}{\centi\meter},
      \SI{45}{\centi\meter}
    },
    ylabel style={align=center}, ylabel=vertical surface\\displacement, y unit = m,
    change y base, y SI prefix=micro,
    xlabel = time, x unit=s,
    width = 12cm,
    height = 4cm,
    semithick]
    \addplot[width=2pt] table[col sep=comma, x index = 0, y index=1]
      {generated/\fnamebase:\fname.csv};
    \addplot[width=2pt, dashed] table[col sep=comma, x index = 0, y index=2]
      {generated/\fnamebase:\fname.csv};
    \addplot[width=2pt, dotted] table[col sep=comma, x index = 0, y index=3]
      {generated/\fnamebase:\fname.csv};
  \end{axis}
\end{tikzpicture}
+17 −0
Original line number Diff line number Diff line
\begin{tikzpicture}[trim axis left, trim axis right]
  \begin{axis}[
    semithick,
    width = 12cm,
    height = 4cm,
    xmode=log,
    %ymin = 0,
    % scaled y ticks=base 10:0,
    xlabel = fixed point tolerance,
    ylabel style={align=center}, ylabel = multigrid\\iterations, % (multigrid steps)
    extra x ticks       = 1e-5,
    extra x tick labels = { time-stepping\\tolerance },
    extra x tick style  = { align=center, grid = major, ticklabel pos=right }
    ]
    \addplot[mark=+] table[col sep=comma, y=mg] {generated/fpi-data.csv};
  \end{axis}
\end{tikzpicture}
Original line number Diff line number Diff line
\pgfplotsarraynew\contourlevels{%
  1\\3\\
  10\\30\\
  100\\300\\
  1000\\3000\\
}

\def\fname{threequakes:rfpitol=100e-7}

\newread\threequakesminread
\openin\threequakesminread=generated/timeframe:min:\fname.tex
\read\threequakesminread to \threequakesmin
\closein\threequakesminread

\newread\threequakesmaxread
\openin\threequakesmaxread=generated/timeframe:max:\fname.tex
\read\threequakesmaxread to \threequakesmax
\closein\threequakesmaxread

\begin{tikzpicture}[trim axis left, trim axis right]
  \begin{axis}[
    xmin=\threequakesmin, xmax=\threequakesmax, max space between ticks=40pt,
    ymax=0.85,
    colormap/jet,
    x tick label style={
      /pgf/number format/.cd,
      1000 sep={},
      /tikz/.cd
    },
    y tick label style={
      /pgf/number format/.cd,
      fixed, fixed zerofill, precision=2,
      /tikz/.cd
    },
    tick label style={font=\footnotesize},
    label style={font=\small},
    legend style={font=\small,
                  at={(1.05,1)},
                  anchor=north west,
                  fill=none},
    ylabel = distance from trench, y unit = m,
    xlabel = time, x unit=s,
    width = 12cm, height = 6.5cm,
    legend cell align=right,
    contour/labels=false,
    enlargelimits=false,
    semithick]

    \pgfplotsinvokeforeach{0,2,4,6} {
      \pgfplotscolormapaccess[0:7]{#1}{jet}
      \def\TEMP{\definecolor{mycolor#1}{rgb}}
      \expandafter\TEMP\expandafter{\pgfmathresult}
      \def\fnameX{generated/2d-velocity-contours:\fname:level:%
        \pgfplotsarrayvalueofelem#1\of\contourlevels.tex}
      \addplot[contour prepared={draw color=mycolor#1}, forget plot] table \fnameX;
      \addlegendimage{line legend,color=mycolor#1}
      \addlegendentry{%
        \SI{\pgfplotsarrayvalueofelem#1\of\contourlevels}{\micro\meter/\second}}
    };
  \end{axis}
\end{tikzpicture}
+51 −0
Original line number Diff line number Diff line
\pgfplotsarraynew\contourlevels{%
  1\\3\\
  10\\30\\
  100\\300\\
  1000\\3000\\
}

\def\fname{zoom:rfpitol=100e-7}
\begin{tikzpicture}[trim axis left, trim axis right]
  \begin{axis}[
    max space between ticks=40pt,
    ymax=0.7,
    colormap/jet,
    x tick label style={
      /pgf/number format/.cd,
      fixed, fixed zerofill, precision=2,
      1000 sep={},
      /tikz/.cd
    },
    y tick label style={
      /pgf/number format/.cd,
      fixed, fixed zerofill, precision=2,
      /tikz/.cd
    },
    tick label style={font=\footnotesize},
    label style={font=\small},
    legend style={font=\small,
                  at={(1.05,1)},
                  anchor=north west,
                  fill=none},
    ylabel = distance from trench, y unit = m,
    xlabel = time, x unit=s,
    width = 12cm, height = 6.5cm,
    legend cell align=right,
    enlargelimits=false,
    contour/labels=false,
    semithick]

    \pgfplotsinvokeforeach{0,...,6} { % level 7 is empty
      \pgfplotscolormapaccess[0:7]{#1}{jet}
      \def\TEMP{\definecolor{mycolor#1}{rgb}}
      \expandafter\TEMP\expandafter{\pgfmathresult}
      \def\fnameX{generated/2d-velocity-contours:\fname:level:%
        \pgfplotsarrayvalueofelem#1\of\contourlevels.tex}
      \addplot[contour prepared={draw color=mycolor#1}, forget plot] table \fnameX;
      \addlegendimage{line legend,color=mycolor#1}
      \addlegendentry{%
        \SI{\pgfplotsarrayvalueofelem#1\of\contourlevels}{\micro\meter/\second}}
    };
  \end{axis}
\end{tikzpicture}
+57 −0
Original line number Diff line number Diff line
\def\fname{rtol=1e-5_diam=1e-2}

\newread\threequakesminread
\openin\threequakesminread=generated/timeframe:min:threequakes:\fname.tex
\read\threequakesminread to \threequakesmin
\closein\threequakesminread

\newread\threequakesmaxread
\openin\threequakesmaxread=generated/timeframe:max:threequakes:\fname.tex
\read\threequakesmaxread to \threequakesmax
\closein\threequakesmaxread

\begin{tikzpicture}[trim axis group left, trim axis group right]
  \begin{groupplot}[
    xmin=\threequakesmin, xmax=\threequakesmax,
    max space between ticks=40pt,
    x tick label style={
      /pgf/number format/.cd,
      1000 sep={},
      /tikz/.cd
    },
    tick label style={font=\footnotesize},
    label style={font=\small},
    group style={
      x descriptions at = edge bottom,
      group size=1 by 3,
      vertical sep=0cm
    },
    height=3.5cm, width=12cm,
    enlargelimits=false]

    \nextgroupplot[
    semithick,
    ylabel style={align=center}, ylabel = time step\\size, y unit = s,
    ytick={1e-3,1e-2,1e-1},
    ymax = 1, ymin = 1e-4,
    ymode = log]
    \addplot[const plot, mark=none] table[col sep=comma, y=timeIncrement]
    {generated/3d-performance:\fname.csv};
    \nextgroupplot[
    semithick,
    ylabel style={align=center}, ylabel = fixed-point\\iterations,
    ytick={2,4,6,8},
    ymin=0, ymax=10]
    \addplot[const plot, mark=none] table[col sep=comma, y=fixedPointIterations]
    {generated/3d-performance:\fname.csv};
    \nextgroupplot[
    semithick,
    xlabel = time, x unit = s,
    ylabel style={align=center}, ylabel=multigrid\\iterations,
    ytick={5,10,15,20},
    ymin=0, ymax=25
    ]
    \addplot[const plot, mark=none] table[col sep=comma, y=multiGridIterations]
    {generated/3d-performance:\fname.csv};
  \end{groupplot}
\end{tikzpicture}
+156 −0
Original line number Diff line number Diff line
\def\fname{generated/3d-velocity-contours:rtol=1e-5_diam=1e-2}
\pgfplotstableread[col sep=comma]{\fname:times.csv}\myloadedtable

\pgfplotsarraynew\contourlevels{%
  1\\2\\3\\5\\%
  10\\20\\30\\50\\%
  100\\200\\300\\500\\%
  1000\\
}

\begin{tikzpicture}[trim axis group left, trim axis group right]
  \begin{groupplot}[
    group style={
      y descriptions at = edge left,
      group size=6 by 1,
      horizontal sep=0cm
    },
    ymin=-0.30, ymax= 0.30,
    enlarge x limits=false,
    colormap/jet,
    y tick label style={
      /pgf/number format/.cd,
      fixed, fixed zerofill, precision=2,
      /tikz/.cd
    },
    ytick = {-0.30,-0.20,-0.10,0.00,0.10,0.20,0.30},
    tick label style={font=\footnotesize},
    label style={font=\small},
    width = 3.5cm, height = 6cm,
    enlargelimits=false,
    contour/labels=false,
    %
    groupplot xlabel={distance from trench [\si{\meter}]},
    ]

    \nextgroupplot[semithick, xlabel = {
      \pgfplotstablegetelem{0}{times}\of\myloadedtable%
      $t_0 \approx
      \SI[round-mode=places,round-precision=0]{\pgfplotsretval}{\second}$
    },
    ylabel = width, y unit = m]
    \draw[color=gray!20] (0.162533,-0.30) -- (0.162533,+0.30);           % X
    \draw[color=gray!20] (0.362533+0.05,-0.30) -- (0.362533-0.05,+0.30); % Y
    \pgfplotsinvokeforeach{0,...,12} {
      \pgfplotscolormapaccess[0:14]{#1}{jet}
      \def\TEMP{\definecolor{mycolor#1}{rgb}}
      \expandafter\TEMP\expandafter{\pgfmathresult}

      \pgfplotstablegetelem{0}{timeSteps}\of\myloadedtable
      \edef\fnameX{\fname:%
        step:\pgfplotsretval:%
        level:\pgfplotsarrayvalueofelem#1\of\contourlevels.tex}
      \addplot[contour prepared={draw color=mycolor#1}] table \fnameX;
    };

    \nextgroupplot[semithick, xlabel = {
      \pgfplotstablegetelem{1}{timeOffsets}\of\myloadedtable%
      $t_0 +
      \SI[round-mode=places,round-precision=2]{\pgfplotsretval}{\second}$
    }]
    \draw[color=gray!20] (0.162533,-0.30) -- (0.162533,+0.30);           % X
    \draw[color=gray!20] (0.362533+0.05,-0.30) -- (0.362533-0.05,+0.30); % Y
    \pgfplotsinvokeforeach{0,...,12} { % level 13 and 14 are empty
      \pgfplotscolormapaccess[0:14]{#1}{jet}
      \def\TEMP{\definecolor{mycolor#1}{rgb}}
      \expandafter\TEMP\expandafter{\pgfmathresult}
      \pgfplotstablegetelem{1}{timeSteps}\of\myloadedtable
      \edef\fnameX{\fname:%
        step:\pgfplotsretval:%
        level:\pgfplotsarrayvalueofelem#1\of\contourlevels.tex}
      \addplot[contour prepared={draw color=mycolor#1}] table \fnameX;
    };

    \nextgroupplot[semithick, xlabel = {
      \pgfplotstablegetelem{2}{timeOffsets}\of\myloadedtable%
      $t_0 +
      \SI[round-mode=places,round-precision=2]{\pgfplotsretval}{\second}$
    }]
    \draw[color=gray!20] (0.162533,-0.30) -- (0.162533,+0.30);           % X
    \draw[color=gray!20] (0.362533+0.05,-0.30) -- (0.362533-0.05,+0.30); % Y
    \pgfplotsinvokeforeach{0,...,12} { % level 13 and 14 are empty
      \pgfplotscolormapaccess[0:14]{#1}{jet}
      \def\TEMP{\definecolor{mycolor#1}{rgb}}
      \expandafter\TEMP\expandafter{\pgfmathresult}
      \pgfplotstablegetelem{2}{timeSteps}\of\myloadedtable
      \edef\fnameX{\fname:%
        step:\pgfplotsretval:%
        level:\pgfplotsarrayvalueofelem#1\of\contourlevels.tex}
      \addplot[contour prepared={draw color=mycolor#1}] table \fnameX;
    };

    \nextgroupplot[semithick, xlabel = {
      \pgfplotstablegetelem{3}{timeOffsets}\of\myloadedtable%
      $t_0 +
      \SI[round-mode=places,round-precision=2]{\pgfplotsretval}{\second}$
    },
    legend columns=4,
    legend cell align=right,
    legend style={font=\small,
                  at={(0,1.05)},
                  anchor=south,
                  fill=none},
    ]
    \draw[color=gray!20] (0.162533,-0.30) -- (0.162533,+0.30);           % X
    \draw[color=gray!20] (0.362533+0.05,-0.30) -- (0.362533-0.05,+0.30); % Y
    \pgfplotsinvokeforeach{0,...,12} { % level 13 and 14 are empty
      \pgfplotscolormapaccess[0:14]{#1}{jet}
      \def\TEMP{\definecolor{mycolor#1}{rgb}}
      \expandafter\TEMP\expandafter{\pgfmathresult}
      \pgfplotstablegetelem{3}{timeSteps}\of\myloadedtable
      \edef\fnameX{\fname:%
        step:\pgfplotsretval:%
        level:\pgfplotsarrayvalueofelem#1\of\contourlevels.tex}
      \addplot[contour prepared={draw color=mycolor#1}, forget plot] table \fnameX;
      \addlegendimage{line legend,color=mycolor#1}
      \addlegendentry{%
        \SI{\pgfplotsarrayvalueofelem#1\of\contourlevels}{\micro\meter/\second}}
    };

    \nextgroupplot[semithick, xlabel = {
      \pgfplotstablegetelem{4}{timeOffsets}\of\myloadedtable%
      $t_0 +
      \SI[round-mode=places,round-precision=2]{\pgfplotsretval}{\second}$
    }]
    \draw[color=gray!20] (0.162533,-0.30) -- (0.162533,+0.30);           % X
    \draw[color=gray!20] (0.362533+0.05,-0.30) -- (0.362533-0.05,+0.30); % Y
    \pgfplotsinvokeforeach{0,...,12} { % level 13 and 14 are empty
      \pgfplotscolormapaccess[0:14]{#1}{jet}
      \def\TEMP{\definecolor{mycolor#1}{rgb}}
      \expandafter\TEMP\expandafter{\pgfmathresult}
      \pgfplotstablegetelem{4}{timeSteps}\of\myloadedtable
      \edef\fnameX{\fname:%
        step:\pgfplotsretval:%
        level:\pgfplotsarrayvalueofelem#1\of\contourlevels.tex}
      \addplot[contour prepared={draw color=mycolor#1}] table \fnameX;
    };

    \nextgroupplot[semithick, xlabel = {
      \pgfplotstablegetelem{5}{timeOffsets}\of\myloadedtable%
      $t_0 +
      \SI[round-mode=places,round-precision=2]{\pgfplotsretval}{\second}$
    }]
    \draw[color=gray!20] (0.162533,-0.30) -- (0.162533,+0.30);           % X
    \draw[color=gray!20] (0.362533+0.05,-0.30) -- (0.362533-0.05,+0.30); % Y
    \pgfplotsinvokeforeach{0,...,12} { % level 13 and 14 are empty
      \pgfplotscolormapaccess[0:14]{#1}{jet}
      \def\TEMP{\definecolor{mycolor#1}{rgb}}
      \expandafter\TEMP\expandafter{\pgfmathresult}
      \pgfplotstablegetelem{5}{timeSteps}\of\myloadedtable
      \edef\fnameX{\fname:%
        step:\pgfplotsretval:%
        level:\pgfplotsarrayvalueofelem#1\of\contourlevels.tex}
      \addplot[contour prepared={draw color=mycolor#1}] table \fnameX;
    };
  \end{groupplot}
\end{tikzpicture}

data/boxplot.tikz

0 → 100644
+43 −0
Original line number Diff line number Diff line
\def\simulationtag{rfpitol=100e-7}
\begin{tikzpicture}[trim axis group left, trim axis group right]
  \begin{groupplot}[
    tick label style={font=\footnotesize},
    label style={font=\small},
    %
    group style={
      y descriptions at = edge left,
      group size=3 by 1,
      horizontal sep=0.75cm
    },
    height=4cm,
    width=4.5cm,
    %
    ytick={1,2,3},
    yticklabels={experiment, simulation}
    ]
    %
    \nextgroupplot[semithick, xlabel = recurrence time, x unit = s, xmode=log,
    log ticks with fixed point, xtick={5,10,20,40}]
    \addplot[mark=+, boxplot={ box extend = 0.5 }]
    table[y index=0] {generated/boxplot-data:lab:recurrence.tex};
    \addplot[mark=+, boxplot={ box extend = 0.5 }]
    table[y index=0] {generated/boxplot-data:simulation:\simulationtag:recurrence.tex};
    %
    \nextgroupplot[semithick, xlabel = rupture width, x unit=m, xmin=0, xmax=0.4,
    extra x ticks       = 0.2,
    extra x tick labels = ,
    extra x tick style  = { grid = major }
    ]
    \addplot[mark=+, boxplot={ box extend = 0.5 }]
    table[y index=0] {generated/boxplot-data:lab:ruptureWidth.tex};
    \addplot[mark=+, boxplot={ box extend = 0.5 }]
    table[y index=0] {generated/boxplot-data:simulation:\simulationtag:ruptureWidth.tex};
    %
    \nextgroupplot[semithick, xlabel = peak slip, x unit=mm, xmode=log, log ticks with fixed point,
    xtick={0.03, 0.06, 0.12}]
    \addplot[mark=+, boxplot={ box extend = 0.5 }]
    table[y index=0] {generated/boxplot-data:lab:peakSlip.tex};
    \addplot[mark=+, boxplot={ box extend = 0.5 }]
    table[y index=0] {generated/boxplot-data:simulation:\simulationtag:peakSlip.tex};
  \end{groupplot}
\end{tikzpicture}
+10 −0
Original line number Diff line number Diff line
start,end,peakSlipRate,ruptureWidth
26.75999999999787,26.784999999997865,0.027083990074991897,0.7066604616124774
28.98999999999762,29.049999999997617,0.03226818570782891,0.7066460434893268
31.56499999999734,31.614999999997334,0.042600764506162535,0.7065953907642707
34.18999999999705,34.24499999999704,0.039804029857929246,0.7065001704582403
36.69999999999678,36.75499999999677,0.04534969591160434,0.7063800319864028
39.32999999999648,39.39499999999648,0.038848015455120025,0.7062439809396165
42.71999999999611,42.7699999999961,0.04713727822866609,0.7063968867127027
45.77499999999578,45.83999999999577,0.04896737991925046,0.7064612510276674
48.69499999999545,48.75499999999545,0.04528040064825157,0.7062545440454634

data/includes.tex

0 → 100644
+51 −0
Original line number Diff line number Diff line
\usepackage{pgfplots}
\pgfplotsset{compat=1.11} % FIXME: 1.12 would be nice; debian:8.7 only has 1.11
\usepackage{pgfplotstable}
\usepgfplotslibrary{groupplots}
\usepgfplotslibrary{statistics}
\usepgfplotslibrary{units}


%% Typeset the mu from '[xy] SI prefix=micro' as an upright mu
%% From https://tex.stackexchange.com/a/224574
\pgfplotsset{
  x SI prefix/micro/.style={/pgfplots/axis base prefix={axis x base 6 prefix \micro}},
  y SI prefix/micro/.style={/pgfplots/axis base prefix={axis y base 6 prefix \micro}},
  z SI prefix/micro/.style={/pgfplots/axis base prefix={axis z base 6 prefix \micro}},
  unit code/.code 2 args={\si{#1#2}},
}

%% Add support for 'groupplot [xy]label'
%% From http://tex.stackexchange.com/a/117935/16940, see also
%% https://sourceforge.net/p/pgfplots/feature-requests/48/
\makeatletter
\pgfplotsset{
    groupplot xlabel/.initial={},
    every groupplot x label/.style={
        at={($({\pgfplots@group@name\space c1r\pgfplots@group@rows.west}|-{\pgfplots@group@name\space c1r\pgfplots@group@rows.outer south})!0.5!({\pgfplots@group@name\space c\pgfplots@group@columns r\pgfplots@group@rows.east}|-{\pgfplots@group@name\space c\pgfplots@group@columns r\pgfplots@group@rows.outer south})$)},
        anchor=north,
    },
    groupplot ylabel/.initial={},
    every groupplot y label/.style={
            rotate=90,
        at={($({\pgfplots@group@name\space c1r1.north}-|{\pgfplots@group@name\space c1r1.outer
west})!0.5!({\pgfplots@group@name\space c1r\pgfplots@group@rows.south}-|{\pgfplots@group@name\space c1r\pgfplots@group@rows.outer west})$)},
        anchor=south
    },
    execute at end groupplot/.code={%
      \node [/pgfplots/every groupplot x label]
{\pgfkeysvalueof{/pgfplots/groupplot xlabel}};
      \node [/pgfplots/every groupplot y label]
{\pgfkeysvalueof{/pgfplots/groupplot ylabel}};
    }
}

\def\endpgfplots@environment@groupplot{%
    \endpgfplots@environment@opt%
    \pgfkeys{/pgfplots/execute at end groupplot}%
    \endgroup%
}
\makeatother

%% Have \includegraphics{} support tikz files
\usepackage{tikzscale}
 No newline at end of file
Original line number Diff line number Diff line
\documentclass[border={3cm 0cm}]{standalone}
\usepackage{siunitx}
\input{includes}

\begin{document}
\includegraphics{2d-dip-contours-performance.tikz}
\end{document}
Original line number Diff line number Diff line
\documentclass[border={3cm 0cm}]{standalone}
\usepackage{siunitx}
\input{includes}

\begin{document}
\includegraphics{2d-dip-single-points.tikz}
\end{document}
Original line number Diff line number Diff line
\documentclass[border={3cm 0cm}]{standalone}
\usepackage{siunitx}
\input{includes}

\begin{document}
\includegraphics{2d-effort-over-tolerance.tikz}
\end{document}
Original line number Diff line number Diff line
\documentclass[border={3cm 0cm}]{standalone}
\usepackage{siunitx}
\input{includes}

\begin{document}
\includegraphics{2d-velocity-contours-threequakes}
\end{document}
Original line number Diff line number Diff line
\documentclass[border={3cm 0cm}]{standalone}
\usepackage{siunitx}
\input{includes}

\begin{document}
\includegraphics{2d-velocity-contours-zoom}
\end{document}
+7 −0
Original line number Diff line number Diff line
\documentclass[border={3cm 0cm}]{standalone}
\usepackage{siunitx}
\input{includes}

\begin{document}
\includegraphics{3d-performance.tikz}
\end{document}
Original line number Diff line number Diff line
\documentclass[border={3cm 0cm}]{standalone}
\usepackage{siunitx}
\input{includes}

\begin{document}
\includegraphics{3d-velocity-contours.tikz}
\end{document}
+18 −0
Original line number Diff line number Diff line
PDFs=\
  2d-dip-contours-performance.pdf \
  2d-dip-single-points.pdf \
  2d-effort-over-tolerance.pdf \
  2d-velocity-contours-threequakes.pdf \
  2d-velocity-contours-zoom.pdf \
  3d-performance.pdf \
  3d-velocity-contours.pdf \
  boxplot.pdf
PNGs=$(PDFs:.pdf=.png)

pdf: $(PDFs)
%.pdf: standalone/%.tex
	latexmk -pdf $<

png: $(PNGs)
%.png: %.pdf
	convert -density 300 $< -quality 100 $@
+7 −0
Original line number Diff line number Diff line
\documentclass[border={3cm 0cm}]{standalone}
\usepackage{siunitx}
\input{includes}

\begin{document}
\input{boxplot.tikz}
\end{document}
+108 −0
Original line number Diff line number Diff line
source('tools/support/findQuakes.R')
source('tools/support/writeContours.R')
Rcpp::sourceCpp('tools/support/trapezoidal.cpp')

finalTime              <- 1000 # s
specialTrenchDistances <- c(0.15,0.30,0.45) # m
convergenceVelocity    <- 5e-5 # m/s

last      <- function(x) x[[length(x)]]
paste.    <- function(...) paste(..., sep='.')
pasteColon<- function(...) paste(..., sep=':')

directories <- ini::read.ini('config.ini')$directories
dir.create(directories[['output']], recursive=TRUE, showWarnings=FALSE)
for (basedir in c("rfpitol=100e-7")) {
  dir          <- file.path(directories[['simulation']],
                            '2d-lab-fpi-tolerance', basedir)
  h5file       <- h5::h5file(file.path(dir, 'output.h5'), 'r')
  relativeTime <- h5file['relativeTime'][]
  realTime     <- finalTime * relativeTime

  calcMask     <- relativeTime >= 0.7
  calcTime     <- realTime[calcMask]
  calcDuration <- last(calcTime) - calcTime[[1]]
  calcRange    <- range(which(calcMask))
  calcLength   <- sum(calcMask)

  ## We are interested in an enlarged time range around actual events here,
  ## (and no other quantities!) hence we pass a very low velocity here.
  quakes           <- findQuakes(1e-6 + convergenceVelocity,
                                 h5file['/frictionalBoundary/velocity'][,,],
                                 indices = calcRange[1]:calcRange[2])
  quakes$beginning <- realTime[quakes$beginningIndex]
  quakes$ending    <- realTime[quakes$endingIndex]
  quakes$duration  <- quakes$ending - quakes$beginning
  numQuakes        <- nrow(quakes)

  relaxedTime <- extendrange(c(quakes[[numQuakes-2,'beginning']],
                               quakes[[numQuakes,  'ending']]), f=0.02)
  threeQuakeTimeMask <- (realTime > relaxedTime[[1]]) & (realTime < relaxedTime[[2]])

  plotMask   <- threeQuakeTimeMask
  plotTime   <- realTime[plotMask]
  plotRange  <- range(which(plotMask))
  plotLength <- sum(plotMask)

  write(relaxedTime[[1]],
        file.path(directories[['output']],
                  paste.(pasteColon('timeframe', 'min', 'threequakes', basedir),
                         'tex')))
  write(relaxedTime[[2]],
        file.path(directories[['output']],
                  paste.(pasteColon('timeframe', 'max', 'threequakes', basedir),
                         'tex')))

  surfaceCoordinates    <- h5file['/surface/coordinates'][]
  surfaceTrenchDistance <- surfaceCoordinates[,1] / cos(atan(.27))
  perm                  <- order(surfaceTrenchDistance)

  displacement <- h5file['/surface/displacement']
  # This is the displacement imposed through the Dirichlet condition at the last node
  displacementOffset <- displacement[calcRange[1]:calcRange[2],last(perm),1]
  balancedSurfaceDisplacement <- matrix(nrow = plotLength, ncol = displacement@dim[2])
  for (k in 1:displacement@dim[2]) {
    d <- displacement[calcRange[1]:calcRange[2],k,1:2]
    d[,,1] <- d[,,1] - displacementOffset
    # We're in a tilted coordinate system
    dv <- -sin(atan(.27))*d[,,1] + cos(atan(.27))*d[,,2]
    meanVertSurfaceDisplacement  <- trapezoidal(calcTime, dv) / calcDuration
    balancedSurfaceDisplacement[,k] <- (dv - meanVertSurfaceDisplacement)[
      (plotRange[1] - calcRange[1] + 1):(plotRange[2] - calcRange[1] + 1)
    ]
  }

  ## Interpolate velocity to special points from surrounding velocities
  {
    data <- matrix(nrow=plotLength, ncol=1+length(specialTrenchDistances))
    data[,1] <- plotTime
    for (k in seq(plotLength)) {
      interpolant <- approxfun(surfaceTrenchDistance[perm],
                               balancedSurfaceDisplacement[k,perm])
      for (i in seq(specialTrenchDistances)) {
        specialTrenchDistance <- specialTrenchDistances[[i]]
        data[k,i+1] <- interpolant(specialTrenchDistance)
      }
    }
    singleDataName <- file.path(directories[['output']],
                                paste.(pasteColon('dip-single-points', basedir),
                                       'csv'))
    write.csv(data, singleDataName, row.names = FALSE)
  }
  h5::h5close(h5file)

  printlevels <- c('-40','-20','-10','-5','-2.5','0','2.5','5','10','20','40')
  levels      <- as.numeric(printlevels) * 1e-6

  ret <- contourLines(plotTime,
                      surfaceTrenchDistance[perm],
                      balancedSurfaceDisplacement[,perm],
                      levels=levels)

  for (i in seq(printlevels))
    writeContours(ret, levels[[i]],
                  file.path(directories[['output']],
                            paste.(pasteColon('2d-dip-contours', basedir,
                                              'level', printlevels[[i]]),
                                   'tex')))
}
+68 −0
Original line number Diff line number Diff line
source('tools/support/findQuakes.R')

finalTime              <- 1000 # s
convergenceVelocity    <- 5e-5 # m/s
criticalVelocity       <- 1000e-6 + convergenceVelocity

paste.    <- function(...) paste(..., sep='.')
pasteColon<- function(...) paste(..., sep=':')

directories <- ini::read.ini('config.ini')$directories
dir.create(directories[['output']], recursive=TRUE, showWarnings=FALSE)
for (basedir in c("rfpitol=100e-7")) {
  dir          <- file.path(directories[['simulation']],
                            '2d-lab-fpi-tolerance', basedir)
  h5file       <- h5::h5file(file.path(dir, 'output.h5'), 'r')
  relativeTime <- h5file['relativeTime'][]
  realTime     <- finalTime * relativeTime

  velocityProxy<- h5file['/frictionalBoundary/velocity']

  quakes <- findQuakes(criticalVelocity, velocityProxy,
                       indices = 1:dim(velocityProxy)[1], 1)

  basalCoordinates <- h5file['/frictionalBoundary/coordinates'][]

  maximumVelocities<- maxVelocity(velocityProxy[,,1])
  displacement     <- h5file['/frictionalBoundary/displacement']
  numVertices      <- dim(displacement)[[2]]
  for (quakeID in seq(nrow(quakes))) {
    qb <- quakes[[quakeID,'beginningIndex']]
    qe <- quakes[[quakeID,'endingIndex']]
    localSlippingTimes <- abs(velocityProxy[qb:qe,,1][,,1]) > criticalVelocity

    qd   <- displacement[qb:qe,,1]
    slip <- vector(mode='numeric', length=numVertices)
    for (i in seq(numVertices)) {
      if (any(localSlippingTimes[,i])) {
        begs <- positiveStarts(localSlippingTimes[,i])
        ends <- negativeStarts(localSlippingTimes[,i])
        slip[i]<- sum(qd[ends,i,] - qd[begs,i,])
      }
    }
    quakes[quakeID,'peakSlip']     <- max(abs(slip))
    quakes[quakeID,'peakSlipRate'] <- max(maximumVelocities[qb:qe])

    maxRuptureWidth <- 0
    for (ts in seq(dim(localSlippingTimes)[[1]])) {
      st <- localSlippingTimes[ts,]
      if (!any(st))
        next;

      slippingCoordinates <- basalCoordinates[st,1] # x-coordinate only
      maxRuptureWidth <- max(maxRuptureWidth, diff(range(slippingCoordinates)))
    }
    quakes[quakeID,'ruptureWidth'] <- maxRuptureWidth
  }
  h5::h5close(h5file)

  quakes$beginning <- realTime[quakes$beginningIndex]
  quakes$ending    <- realTime[quakes$endingIndex]

  write.csv(quakes[c('beginning','ending',
                     'peakSlip','peakSlipRate',
                     'ruptureWidth')],
            row.names = FALSE, quote = FALSE,
            file = file.path(directories[['output']],
                             paste.(pasteColon('events', basedir), 'csv')))
}
+41 −0
Original line number Diff line number Diff line
rfpitols <- c('1e-7', '2e-7', '3e-7', '5e-7',
              '10e-7', '20e-7', '30e-7', '50e-7',
              '100e-7', '200e-7', '300e-7', '500e-7',
              '1000e-7', '2000e-7', '3000e-7', '5000e-7',
              '10000e-7', '20000e-7', '30000e-7', '50000e-7',
              '100000e-7')
numEntries <- length(rfpitols)

data <- data.frame(row.names = rfpitols,
                   tol = rep(NA, numEntries),
                   time = rep(NA, numEntries),
                   fpi = rep(NA, numEntries),
                   mg = rep(NA, numEntries))

directories <- ini::read.ini('config.ini')$directories
dir.create(directories[['output']], recursive=TRUE, showWarnings=FALSE)
for (rfpitol in rfpitols) {
  basedir <- paste('rfpitol', rfpitol, sep='=')
  dir     <- file.path(directories[['simulation']],
                       '2d-lab-fpi-tolerance', basedir)
  h5file  <- h5::h5file(file.path(dir, 'output.h5'), 'r')

  data[rfpitol,'tol'] <- as.numeric(rfpitol)

  relativeTimeProxy <- h5file['/relativeTime']
  relativeTimeLen <- relativeTimeProxy@dim
  data[rfpitol,'time'] <- relativeTimeProxy[relativeTimeProxy@dim]

  ## FIXME: why do we drop the first entry?
  fixedPointIterationsProxy <- h5file["/iterations/fixedPoint/total"]
  fixedPointIterationsLen <- fixedPointIterationsProxy@dim
  data[rfpitol,'fpi'] <- sum(fixedPointIterationsProxy[2:fixedPointIterationsLen])

  multiGridIterationsProxy <- h5file["/iterations/multiGrid/total"]
  multiGridIterationsLen <- multiGridIterationsProxy@dim
  data[rfpitol,'mg'] <- sum(multiGridIterationsProxy[2:multiGridIterationsLen])
  h5::h5close(h5file)
}

write.csv(data, file.path(directories[['output']], 'fpi-data.csv'),
          row.names = FALSE, quote = FALSE)
+58 −0
Original line number Diff line number Diff line
source('tools/support/findQuakes.R')

finalTime           <- 1000 # s
convergenceVelocity <- 5e-5 # m/s

paste.    <- function(...) paste(..., sep='.')
pasteColon<- function(...) paste(..., sep=':')

directories <- ini::read.ini('config.ini')$directories
dir.create(directories[['output']], recursive=TRUE, showWarnings=FALSE)
for (basedir in c("rfpitol=100e-7")) {
  dir          <- file.path(directories[['simulation']],
                            '2d-lab-fpi-tolerance', basedir)
  h5file       <- h5::h5file(file.path(dir, 'output.h5'), 'r')
  relativeTime <- h5file['relativeTime'][]
  realTime     <- finalTime * relativeTime

  velocityProxy<- h5file['/frictionalBoundary/velocity']

  ## We are interested in an enlarged time range around actual events here,
  ## (and no other quantities!) hence we pass a very low velocity here.
  quakes <- findQuakes(1e-6 + convergenceVelocity, velocityProxy,
                       indices = 1:dim(velocityProxy)[1], 1)
  quakes$beginning <- realTime[quakes$beginningIndex]
  quakes$ending    <- realTime[quakes$endingIndex]
  quakes$duration  <- quakes$ending - quakes$beginning
  numQuakes        <- nrow(quakes)

  relaxedTime <- extendrange(c(quakes[[numQuakes-2,'beginning']],
                               quakes[[numQuakes,  'ending']]), f=0.02)
  threeQuakeTimeMask <- (realTime > relaxedTime[[1]]) & (realTime < relaxedTime[[2]])
  plotMask   <- threeQuakeTimeMask
  plotIndices<- which(plotMask)
  plotIndices<- c(plotIndices[1]-1,plotIndices,plotIndices[length(plotIndices)]+1)

  write(relaxedTime[[1]],
        file.path(directories[['output']],
                  paste.(pasteColon('timeframe', 'min', 'threequakes',
                                    basedir), 'tex')))
  write(relaxedTime[[2]],
        file.path(directories[['output']],
                  paste.(pasteColon('timeframe', 'max', 'threequakes',
                                    basedir), 'tex')))

  timeWindow = realTime[plotIndices]

  relativeTau          <- h5file['relativeTimeIncrement'][]
  fixedPointIterations <- h5file['/iterations/fixedPoint/final'][]
  multiGridIterations  <- h5file['/iterations/multiGrid/final'][]
  write.csv(data.frame(time = timeWindow,
                       timeIncrement = finalTime * relativeTau[plotIndices],
                       fixedPointIterations = fixedPointIterations[plotIndices],
                       multiGridIterations = multiGridIterations[plotIndices]),
            file.path(directories[['output']],
                      paste.(pasteColon('2d-performance', basedir), 'csv')),
            row.names = FALSE, quote = FALSE)
  h5::h5close(h5file)
}
+76 −0
Original line number Diff line number Diff line
import ConfigParser as cp
import os
import numpy as np
import csv
import h5py

from support.find_quakes import find_quakes

NBODIES = 2
FINAL_TIME = 1000  # s
FINAL_VELOCITY = 1e-5  # m/s
THRESHOLD_VELOCITY = 0.5*FINAL_VELOCITY  # 1000e-6 + FINAL_VELOCITY

TANGENTIAL_COORDS = 1

# read config ini
config = cp.ConfigParser()
config_path = os.path.join('config.ini')
config.read(config_path)
sim_path = config.get('directories', 'simulation')
exp_path = config.get('directories', 'experiment')
out_path = config.get('directories', 'output')

# create output directory
out_dir = os.path.join(out_path)
if not os.path.exists(out_dir):
    os.mkdir(out_dir)

h5path = os.path.join(sim_path)
h5file = h5py.File(os.path.join(h5path, 'output.h5'), 'r')

# read time
relative_time = np.array(h5file['relativeTime'])
real_time = relative_time * FINAL_TIME


  velocityProxy<- h5file['/frictionalBoundary/velocity']

  ## We are interested in an enlarged time range around actual events here,
  ## (and no other quantities!) hence we pass a very low velocity here.
  quakes <- findQuakes(1e-6 + convergenceVelocity, velocityProxy,
                       indices = 1:dim(velocityProxy)[1], 1)
  quakes$beginning <- realTime[quakes$beginningIndex]
  quakes$ending    <- realTime[quakes$endingIndex]
  quakes$duration  <- quakes$ending - quakes$beginning
  numQuakes        <- nrow(quakes)

  relaxedTime <- extendrange(c(quakes[[numQuakes-2,'beginning']],
                               quakes[[numQuakes,  'ending']]), f=0.02)
  threeQuakeTimeMask <- (realTime > relaxedTime[[1]]) & (realTime < relaxedTime[[2]])
  plotMask   <- threeQuakeTimeMask
  plotIndices<- which(plotMask)
  plotIndices<- c(plotIndices[1]-1,plotIndices,plotIndices[length(plotIndices)]+1)

  write(relaxedTime[[1]],
        file.path(directories[['output']],
                  paste.(pasteColon('timeframe', 'min', 'threequakes',
                                    basedir), 'tex')))
  write(relaxedTime[[2]],
        file.path(directories[['output']],
                  paste.(pasteColon('timeframe', 'max', 'threequakes',
                                    basedir), 'tex')))

  timeWindow = realTime[plotIndices]

  relativeTau          <- h5file['relativeTimeIncrement'][]
  fixedPointIterations <- h5file['/iterations/fixedPoint/final'][]
  multiGridIterations  <- h5file['/iterations/multiGrid/final'][]
  write.csv(data.frame(time = timeWindow,
                       timeIncrement = finalTime * relativeTau[plotIndices],
                       fixedPointIterations = fixedPointIterations[plotIndices],
                       multiGridIterations = multiGridIterations[plotIndices]),
            file.path(directories[['output']],
                      paste.(pasteColon('2d-performance', basedir), 'csv')),
            row.names = FALSE, quote = FALSE)
  h5::h5close(h5file)
+95 −0
Original line number Diff line number Diff line
source('tools/support/findQuakes.R')
source('tools/support/writeContours.R')

finalTime           <- 1000 # s
convergenceVelocity <- 5e-5 # m/s

paste.    <- function(...) paste(..., sep='.')
pasteColon<- function(...) paste(..., sep=':')

directories <- ini::read.ini('config.ini')$directories
dir.create(directories[['output']], recursive=TRUE, showWarnings=FALSE)
for (basedir in c("rfpitol=100e-7")) {
  dir <- file.path(directories[['simulation']],
                   '2d-lab-fpi-tolerance', basedir)
  h5file       <- h5::h5file(file.path(dir, 'output.h5'), 'r')
  relativeTime <- h5file['relativeTime'][]
  realTime     <- finalTime * relativeTime

  velocityProxy<- h5file['/frictionalBoundary/velocity']

  basalCoordinates <- h5file['/frictionalBoundary/coordinates'][]
  basalTrenchDistance <- basalCoordinates[,1]
  perm                <- order(basalTrenchDistance)
  sortedBasalTrenchDistance <- basalTrenchDistance[perm]

  {
    ## We are interested in an enlarged time range around actual events here,
    ## (and no other quantities!) hence we pass a very low velocity here.
    quakes <- findQuakes(1e-6 + convergenceVelocity, velocityProxy,
                         indices = 1:dim(velocityProxy)[1], 1)
    quakes$beginning <- realTime[quakes$beginningIndex]
    quakes$ending    <- realTime[quakes$endingIndex]
    quakes$duration  <- quakes$ending - quakes$beginning
    numQuakes        <- nrow(quakes)

    relaxedTime <- extendrange(c(quakes[[numQuakes-2,'beginning']],
                                 quakes[[numQuakes,  'ending']]), f=0.02)
    plotMask   <- (realTime > relaxedTime[[1]]) & (realTime < relaxedTime[[2]])
    plotIndices<- which(plotMask)

    write(relaxedTime[[1]],
          file.path(directories[['output']],
                    paste.(pasteColon('timeframe', 'min', 'threequakes',
                                      basedir), 'tex')))
    write(relaxedTime[[2]],
          file.path(directories[['output']],
                    paste.(pasteColon('timeframe', 'max', 'threequakes',
                                      basedir), 'tex')))

    printlevels <- c('1000','100','10','1')
    levels      <- 1e-6 * as.numeric(printlevels) + convergenceVelocity
    ret <- contourLines(realTime[plotIndices],
                        sortedBasalTrenchDistance,
                        abs(velocityProxy[plotIndices,perm,1][,,1]),
                        levels = levels)

    for (i in seq(printlevels))
      writeContours(ret, levels[[i]],
                    file.path(directories[['output']],
                              paste.(pasteColon('2d-velocity-contours',
                                                'threequakes', basedir, 'level',
                                                printlevels[[i]]), 'tex')))
  }
  {
    ## We are interested in an enlarged time range around actual events here,
    ## (and no other quantities!) hence we pass a rather low velocity here.
    quakes <- findQuakes(300e-6 + convergenceVelocity, velocityProxy,
                         indices = 1:dim(velocityProxy)[1], 1)
    quakes$beginning <- realTime[quakes$beginningIndex]
    quakes$ending    <- realTime[quakes$endingIndex]
    quakes$duration  <- quakes$ending - quakes$beginning
    numQuakes        <- nrow(quakes)
    quake            <- quakes[numQuakes,]
    relaxedTime      <-
      c(quake[['beginning']] - 0.9*(quake[['ending']] - quake[['beginning']]),
        quake[['ending']]    + 0.1*(quake[['ending']] - quake[['beginning']]))
    plotMask <- (realTime > relaxedTime[[1]]) & (realTime < relaxedTime[[2]])
    plotIndices<- which(plotMask)

    printlevels <- c('3000','1000','300','100','30','10','3','1')
    levels      <- 1e-6 * as.numeric(printlevels) + convergenceVelocity
    ret <- contourLines(realTime[plotIndices],
                        sortedBasalTrenchDistance,
                        abs(velocityProxy[plotIndices,perm,1][,,1]),
                        levels = levels)

    for (i in seq(printlevels))
      writeContours(ret, levels[[i]],
                    file.path(directories[['output']],
                              paste.(pasteColon('2d-velocity-contours',
                                                'zoom', basedir, 'level',
                                                printlevels[[i]]), 'tex')))
  }
  h5::h5close(h5file)
}