<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p></p>
<div>
<p>Dear Dune enthusiasts,</p>
<p><br>
</p>
<p>out of curiosity, I tried to install Dune on my smartphone on top of my Android OS. It was surprisingly easy, because there is Termux, "<span>an Android terminal emulator and Linux environment app",
<a href="https://termux.com/" target="_blank" rel="noopener noreferrer" class="x_OWAAutoLink" id="LPlnk238136">
https://termux.com/</a>.</span></p>
<p><span><br>
</span></p>
<p><span>Concerning package management, Termux offers `apt`, `apt-cache` and so on, the recommended tool is a wrapper named `pkg`. Package names are Debian-like, so I did a</span></p>
<p><span><br>
</span></p>
<p><span>pkg install build-essential git python openmpi</span></p>
<p><span><br>
</span></p>
<p><span>which gave me, among others, clang 9, cmake 3.17, git 2.26, python 3.8, and openmpi 4.0. There's no officially distributed gcc, if it is needed urgently, there's
<a href="https://github.com/its-pointless/gcc_termux" target="_blank" rel="noopener noreferrer" class="x_OWAAutoLink" id="LPlnk821360">
https://github.com/its-pointless/gcc_termux</a>.</span></p>
<p><span><br>
</span></p>
<p><span>I wanted to use standard Android and web apps for pre- and postprocessing. For storing the sources in an accessible place, I had to run</span></p>
<p><span><br>
</span></p>
<p><span>termux-setup-storage</span></p>
<p><span><br>
</span></p>
<p><span>which gives a top-level folder `storage` and links to standard locations on the phone. In particular, `storage/shared` is the top-level internal storage of the phone. I cloned the sources via</span></p>
<p><span><br>
</span></p>
<p><span>mkdir storage/shared/Dumux</span></p>
<p><span>ln -s storage/shared/Dumux/ Dumux</span></p>
<p><span>cd Dumux</span></p>
<p><span></span></p>
<div>for MOD in common geometry grid localfunctions istl; do <br>
git clone https://gitlab.dune-project.org/core/dune-$MOD.git;<br>
done</div>
<div>git clone https://git.iws.uni-stuttgart.de/dumux-repositories/dumux.git<br>
</div>
<p><br>
</p>
<p>For editing source files, I used the Android editor DroidEdit, <a href="https://play.google.com/store/apps/details?id=com.aor.droidedit&hl=de" target="_blank" rel="noopener noreferrer" class="x_OWAAutoLink" id="LPlnk622056">
https://play.google.com/store/apps/details?id=com.aor.droidedit&hl=de</a>.<br>
</p>
<p><span><br>
</span></p>
<p><span>For security reasons, one cannot have executables on the phone storage, so I set the build folder in my Termux home folder:</span></p>
<p><span><br>
</span></p>
<p><span>bash ./dune-common/bin/dunecontrol --builddir=$HOME/build-cmake --make-opts="-j 5" --cmake-opts="-DSTDTHREAD_WORKS=1" all<br>
</span></p>
<p><span><br>
</span></p>
<p>Note the `bash` since `dunecontrol` is not executable by itself. I needed the std::thread thing and didn't take a deeper look. I could build my Dumux application now:</p>
<p><br>
</p>
<p>cd ~/build-cmake/dumux/test/porousmediumflow/2p/implicit/incompressible</p>
<p>make test_2p_incompressible_tpfa</p>
<p>./test_2p_incompressible_tpfa</p>
<p><br>
</p>
<p>This came with the annoying fact that tab-completion didn't work for make. The run produced several vtu files. In order to look at them, I had to copy them to the phone storage:</p>
<p><br>
</p>
<p>cp *vtu ~/Dumux/.</p>
<p><br>
</p>
<p>There apparently is no VTK visualization app for Android. I could use Paraview Glance at
<a href="https://kitware.github.io/paraview-glance/app/" target="_blank" rel="noopener noreferrer" class="x_OWAAutoLink" id="LPlnk675640">
https://kitware.github.io/paraview-glance/app/</a> and just open a vtu file from my phone storage. It's not convenient yet, since it doesn't support time series.</p>
<p><br>
</p>
<p>That's it. Another way would have been to set up a complete Linux system with a desktop environment. There's the AndroNix app,
<a href="https://andronix.app/de/" target="_blank" rel="noopener noreferrer" class="x_OWAAutoLink" id="LPlnk424021">
https://andronix.app/de/</a>, offering, among others, Ubuntu and XFCE. At a first try, I didn't get the desktop environment to work. But maybe that's more of an overkill for a phone and more suited for a Tablet instead.</p>
<p><br>
</p>
<p>All the best</p>
Bernd</div>
<br>
<p></p>
<p><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div><span style="font-family:"Courier New",monospace; font-size:10pt">--</span><br>
<span style="font-family:"Courier New",monospace; font-size:10pt">_________________________________________________________________</span><br>
<br>
<span style="font-family:"Courier New",monospace; font-size:10pt">Bernd Flemisch</span><br>
<span style="font-family:"Courier New",monospace; font-size:10pt">IWS, Universität Stuttgart               phone: +49 711 685 69162</span><br>
<span style="font-family:"Courier New",monospace; font-size:10pt">Pfaffenwaldring 61              email: bernd@iws.uni-stuttgart.de</span><br>
<span style="font-family:"Courier New",monospace; font-size:10pt">D-70569 Stuttgart           url:
<a href="http://www.iws.uni-stuttgart.de/en/lh2/" class="OWAAutoLink" title="http://www.iws.uni-stuttgart.de/en/lh2/ Ctrl+Klicken oder tippen Sie, um dem Link zu folgen." id="LPNoLP">
www.iws.uni-stuttgart.de/en/lh2/</a></span><br>
<span style="font-family:"Courier New",monospace; font-size:10pt">_________________________________________________________________</span></div>
</div>
</div>
</div>
</body>
</html>