Difference between revisions of "Onelab/Mobile"

From ONELAB
Jump to: navigation, search
Line 40: Line 40:
 
= iOS =
 
= iOS =
  
You need a Mac with Xcode >= 4 and the iOS SDK >= 7.0 to compile the Onelab/Mobile application. The app depends on several external frameworks (Gmsh, GetDP, PETSc) ; scripts in the Gmsh SVN repository show the steps required to build these frameworks for the [https://geuz.org/trac/gmsh/browser/trunk/contrib/mobile/utils/onelab_iossimulator_build.sh simulator] and the  
+
You need a Mac with Xcode >= 4 and the iOS SDK >= 7.0 to compile the Onelab/Mobile application. The app depends on several external frameworks (Gmsh, GetDP, PETSc, BLAS, LAPACK) ; scripts in the Gmsh SVN repository show the steps required to build these frameworks and the app for the [https://geuz.org/trac/gmsh/browser/trunk/contrib/mobile/utils/onelab_iossimulator_build.sh simulator] and the  
 
[https://geuz.org/trac/gmsh/browser/trunk/contrib/mobile/utils/onelab_ios_build.sh actual device] (login=gmsh, passwd=gmsh).
 
[https://geuz.org/trac/gmsh/browser/trunk/contrib/mobile/utils/onelab_ios_build.sh actual device] (login=gmsh, passwd=gmsh).
  
 
= Android =
 
= Android =
  
You need the Android SDK with level >= 14, as well as the Android NDK to compile the libraries that Onelab/Mobile depends on. Scripts will be made available in the near future.
+
You need the Android SDK with level >= 14, as well as the Android NDK to compile the libraries that Onelab/Mobile depends on. The app depends on several external frameworks (Gmsh, GetDP, PETSc, BLAS, LAPACK) ; a script in the Gmsh SVN repository shows the steps required to  [https://geuz.org/trac/gmsh/browser/trunk/contrib/mobile/utils/onelab_android.sh build these frameworks and the app] (login=gmsh, passwd=gmsh).
 
 
<!--
 
 
 
''This procedure has been tested only on a Linux distribution''
 
<br />
 
Requirement:
 
*
 
== Compile the libraries ==
 
Most of the Android powered device run on an ARMv7 architecture. <br />
 
Here is the way to compile Gmsh library for this architecture. <br />
 
To do this, you need a toolchain (e.g [http://code.google.com/p/android-cmake/ android-cmake])<br />
 
<source lang="bash">
 
mkdir buildAndroid
 
cd buildAndroid
 
cmake -DCMAKE_TOOLCHAIN_FILE=/path/to/android.toolchain.cmake -DDEFAULT=0 -DENABLE_LIB=1 -DENABLE_BLAS_LAPACK=1 -DENABLE_MESH=1 -DENABLE_ONELAB=1 -DENABLE_POST=1 ../
 
make androidGmsh
 
</source>
 
 
 
== Create the project ==
 
The project need multiples libraries:
 
* Gmsh
 
* GetDP
 
* ONELAB (see below)
 
* PETSc
 
* BLAS & LAPACK
 
 
 
The ONELAB library is a small library to interface the application (Java) with Gmsh (Native library).
 
You can build it from gmsh-svn (it's in /contrib/mobile/)
 
 
 
To use the automated cmake procedure you have to create a directory (e.g. Gmsh) with:
 
* The library with directory name and without any extension (e.g. Gmsh)
 
* The headers (they can be obtain with "''make getHeaders''")
 
The final directory for Gmsh looks like<br />
 
<code>
 
 
 
  Gmsh/
 
    Gmsh
 
    Headers/
 
        *.h
 
</code>
 
 
 
Then you can create the project:
 
<source lang="bash">
 
make androidProject
 
</source>
 
Then you can open the project with [https://developer.android.com/sdk/installing/bundle.html Eclipse] or with [https://developer.android.com/sdk/installing/studio.html Android Studio]
 
You can also compile using the command line:
 
<source lang="bash">
 
android update project --name Onelab --path . --target targetID
 
ant release
 
</source>
 
 
 
-->
 

Revision as of 12:24, 29 March 2014

Please report bugs and suggestions for Onelab/Mobile to mobile @ onelab . info (without spaces).

User's guide

Onelab/Mobile is available for iOS 7 (iPhone and iPad) and Android 4. It currently contains Gmsh and GetDP and runs all computations locally on your mobile device. Future versions will add support for remote calculations in the cloud.

Running a pre-packaged model

A list of available models appears when you launch Onelab/Mobile. Selecting a model will load it. You can then select Run to launch a simulation with the default set of parameters. To change parameters, select Parameters.

Installing new models on iOS

In order to install a new model on iOS, you need to bundle it inside a directory with extension .onelab. The directory should contain a file named info.xml containing the model information (see e.g. the Inductor example). You can then use file sharing in iTunes to install the model on your device.

Installing new models on Android

On Android, you can simply open .geo or .pro files from a file explorer.

Installing unpublished/beta versions of Onelab/Mobile

Follow the instructions below if you want to install a version of Onelab/Mobile that is not published officially on the App Store (for iOS) or the Google Play store (for Android).

iOS

  1. Download Onelab.ipa
  2. Send us your device ID by email at mobile @ onelab . info ; we will add your device to the list of the devices allowed for Onelab/Mobile beta development.
  3. Install the Onelab/Mobile application through iTunes by double-cliking on Onelab.ipa.

Android

  1. Allow the installation of non-Market apps on your Android device (> Settings > Security > Unknown sources)
  2. Install the application:
    1. either download Onelab.apk, upload it on your SD card and use a file explorer to open it
    2. or use the Android SDK tool adb and install the file:
      adb install Onelab.apk
    3. or use your web browser and directly download Onelab.apk on your device and install it

Compiling Onelab/Mobile

iOS

You need a Mac with Xcode >= 4 and the iOS SDK >= 7.0 to compile the Onelab/Mobile application. The app depends on several external frameworks (Gmsh, GetDP, PETSc, BLAS, LAPACK) ; scripts in the Gmsh SVN repository show the steps required to build these frameworks and the app for the simulator and the actual device (login=gmsh, passwd=gmsh).

Android

You need the Android SDK with level >= 14, as well as the Android NDK to compile the libraries that Onelab/Mobile depends on. The app depends on several external frameworks (Gmsh, GetDP, PETSc, BLAS, LAPACK) ; a script in the Gmsh SVN repository shows the steps required to build these frameworks and the app (login=gmsh, passwd=gmsh).