[Dune] Dune on Android

Flemisch, Bernd bernd.flemisch at iws.uni-stuttgart.de
Fri May 1 16:50:05 CEST 2020


Dear Dune enthusiasts,


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, "an Android terminal emulator and Linux environment app", https://termux.com/.


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


pkg install build-essential git python openmpi


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 https://github.com/its-pointless/gcc_termux.


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


termux-setup-storage


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


mkdir storage/shared/Dumux

ln -s storage/shared/Dumux/ Dumux

cd Dumux

for MOD in common geometry grid localfunctions istl; do
git clone https://gitlab.dune-project.org/core/dune-$MOD.git;
done
git clone https://git.iws.uni-stuttgart.de/dumux-repositories/dumux.git


For editing source files, I used the Android editor DroidEdit, https://play.google.com/store/apps/details?id=com.aor.droidedit&hl=de.


For security reasons, one cannot have executables on the phone storage, so I set the build folder in my Termux home folder:


bash ./dune-common/bin/dunecontrol --builddir=$HOME/build-cmake --make-opts="-j 5" --cmake-opts="-DSTDTHREAD_WORKS=1" all


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:


cd ~/build-cmake/dumux/test/porousmediumflow/2p/implicit/incompressible

make test_2p_incompressible_tpfa

./test_2p_incompressible_tpfa


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:


cp *vtu ~/Dumux/.


There apparently is no VTK visualization app for Android. I could use Paraview Glance at https://kitware.github.io/paraview-glance/app/ and just open a vtu file from my phone storage. It's not convenient yet, since it doesn't support time series.


That's it. Another way would have been to set up a complete Linux system with a desktop environment. There's the AndroNix app, https://andronix.app/de/, 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.


All the best

Bernd



--
_________________________________________________________________

Bernd Flemisch
IWS, Universität Stuttgart               phone: +49 711 685 69162
Pfaffenwaldring 61              email: bernd at iws.uni-stuttgart.de
D-70569 Stuttgart           url: www.iws.uni-stuttgart.de/en/lh2/<http://www.iws.uni-stuttgart.de/en/lh2/>
_________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20200501/8868ecd2/attachment.htm>


More information about the Dune mailing list