Difference between revisions of "Onelab/Mobile"

From ONELAB
Jump to: navigation, search
(Running a pre-packaged model)
 
(43 intermediate revisions by 2 users not shown)
Line 1: Line 1:
  
= User's guide =
+
Onelab/Mobile is available for iOS (iPhone and iPad) and Android:
 
+
* [https://itunes.apple.com/us/app/onelab/id845930897 Download Onelab/Mobile for iPhone and iPad on the App Store]
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.
+
* [https://play.google.com/store/apps/details?id=org.geuz.onelab Download Onelab/Mobile for Android devices on Google Play]
 
+
Onelab/Mobile contains [[Gmsh]] and [[GetDP]] and runs all computations locally on your mobile device.
Please report bugs and suggestions for Onelab/Mobile to mobile @ onelab . info.
 
  
 
== Running a pre-packaged model ==
 
== 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'''.
+
The list of available models appears when you launch the app. Selecting a model will load it. You can then press '''Run''' to launch a simulation with the default set of parameters. When available, additional information about a model can be obtained by long-pressing on the model description and selecting '''Visit model website'''.
  
<gallery widths=240px perrow=3>
+
<gallery widths=133px heights=200px perrow=3>
Image:iPhone_1.png|List of models on iPhone.
+
Image:iPhone_1.png|List of models on iPhone; select a model to open it.
Image:iPhone_2.png|Select a model to open it; Press '''Run''' to launch a computation.
+
Image:iPhone_2.png|Press '''Run''' to launch a computation with the default set of parameters.
Image:iPhone_3.png|Press '''Parameters''' to edit model parameters
+
Image:iPhone_3.png|Press '''Parameters''' to see and/or modify the parameters.
 
</gallery>
 
</gallery>
  
== Installing new models on iOS ==
+
== Modifying a model ==
 
 
In order to install a new model on iOS, you need to bundle it inside a directory with extension '''.bundle'''. The directory should contain a file named '''infos.xml''' containing the model information (see e.g. the [http://onelab.info/files/inductor Inductor] example). You can then use [http://support.apple.com/kb/HT4094 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 [https://play.google.com/store/search?q=file%20explorer&c=apps 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).
+
To run a model with different parameters, press '''Parameters''' and modify any of the presets. Then press '''Run''' again: all the simulation steps will be performed with the new parameter values. To restore the preset parameters values, press '''Reset'''.  
  
== iOS ==
+
Advanced users can also directly edit the model input files: long-press on the model description and select '''Edit model files'''. To free up space, temporary model files (meshes, solution files) can be removed by long-pressing on the model description and selecting '''Clear results'''. To completey remove a model, long-press on the model description and select '''Remove'''.
  
# Download '''Onelab.ipa'''
+
== Sharing a model ==
# Send us your [https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingProfiles/MaintainingProfiles.html##//apple_ref/doc/uid/TP40012582-CH30-SW46 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.
 
# Install the Onelab/Mobile application through iTunes by [https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/TestingYouriOSApp/TestingYouriOSApp.html#//apple_ref/doc/uid/TP40012582-CH8-SW6 double-cliking on '''Onelab.ipa'''].
 
  
== Android ==
+
To share a model by email, long-press on the model description and select '''Email model files'''.
  
# [https://developer.android.com/tools/publishing/publishing_overview.html#unknown-sources Allow the installation of non-Market apps] on your Android device (> Settings > Security > Unknown sources)
+
== Installing a new model ==
# Install the application:
 
## either download '''Onelab.apk''', upload it on your SD card and use a [https://play.google.com/store/search?q=file%20explorer&c=apps file explorer] to open it
 
## or use the Android SDK tool '''adb''' and install the file: <source lang="bash">adb install Onelab.apk</source>
 
## or use your web browser and directly download '''Onelab.apk''' on your device and install it
 
  
= Compiling Onelab/Mobile =
+
To install a new model:
 +
<ol>
 +
<li>Put all the model files (.pro, .geo) in a directory, which should also contain a file named '''infos.xml''' with the model information:
 +
<source lang="xml">
 +
<?xml version="1.0" encoding="utf-8"?>
 +
<models>
 +
  <model>
 +
    <title>Your model title</title>
 +
    <summary>Your model summary</summary>
 +
    <file type="pro">your_main_pro_file.pro</file>
 +
    <preview type="png">your_128x128_pixel_screenshot.png</preview>
 +
    <url>http://your_model_website.com</url>
 +
  </model>
 +
</models>
 +
</source>
 +
(See e.g. [http://onelab.info/files/inductor Inductor] or [http://onelab.info/files/waveguides Waveguides].)
 +
<li>[https://en.wikipedia.org/wiki/Zip_%28file_format%29 Zip] the directory.
 +
<li>Open the .zip file on your device (e.g. through iCloud, Dropbox or Google Drive; or by emailing it to yourself and opening the attachment; or by putting it on a web server and downloading the file on the device with Safari or Chrome).
 +
</ol>
 +
The new models will be extracted alongside the app's built-in models.
  
== iOS ==
+
== Installing beta versions of Onelab/Mobile ==
  
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
+
Please send an email to mobile@onelab.info if you want to become a Onelab/Mobile beta-tester.
[https://geuz.org/trac/gmsh/browser/trunk/contrib/mobile/utils/onelab_ios_build.sh actual device] (login=gmsh, passwd=gmsh).
 
  
== Android ==
+
== Compiling Onelab/Mobile ==
  
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).
+
The Onelab/Mobile source code is available in the [http://gitlab.onelab.info/gmsh/gmsh/tree/master/contrib/mobile/ contrib/mobile directory of the Gmsh source code repository]. Build scripts are provided for [http://gitlab.onelab.info/gmsh/gmsh/tree/master/contrib/mobile/utils/ios_build.sh iOS] (requires a Mac with Xcode >= 6) and [http://gitlab.onelab.info/gmsh/gmsh/tree/master/contrib/mobile/utils/android_build.sh Android] (requires Android SDK >= 14 and the Android NDK).

Latest revision as of 14:55, 13 April 2017

Onelab/Mobile is available for iOS (iPhone and iPad) and Android:

Onelab/Mobile contains Gmsh and GetDP and runs all computations locally on your mobile device.

Running a pre-packaged model

The list of available models appears when you launch the app. Selecting a model will load it. You can then press Run to launch a simulation with the default set of parameters. When available, additional information about a model can be obtained by long-pressing on the model description and selecting Visit model website.

Modifying a model

To run a model with different parameters, press Parameters and modify any of the presets. Then press Run again: all the simulation steps will be performed with the new parameter values. To restore the preset parameters values, press Reset.

Advanced users can also directly edit the model input files: long-press on the model description and select Edit model files. To free up space, temporary model files (meshes, solution files) can be removed by long-pressing on the model description and selecting Clear results. To completey remove a model, long-press on the model description and select Remove.

Sharing a model

To share a model by email, long-press on the model description and select Email model files.

Installing a new model

To install a new model:

  1. Put all the model files (.pro, .geo) in a directory, which should also contain a file named infos.xml with the model information:
    <?xml version="1.0" encoding="utf-8"?>
    <models>
      <model>
        <title>Your model title</title>
        <summary>Your model summary</summary>
        <file type="pro">your_main_pro_file.pro</file>
        <preview type="png">your_128x128_pixel_screenshot.png</preview>
        <url>http://your_model_website.com</url>
      </model>
    </models>
    

    (See e.g. Inductor or Waveguides.)

  2. Zip the directory.
  3. Open the .zip file on your device (e.g. through iCloud, Dropbox or Google Drive; or by emailing it to yourself and opening the attachment; or by putting it on a web server and downloading the file on the device with Safari or Chrome).

The new models will be extracted alongside the app's built-in models.

Installing beta versions of Onelab/Mobile

Please send an email to mobile@onelab.info if you want to become a Onelab/Mobile beta-tester.

Compiling Onelab/Mobile

The Onelab/Mobile source code is available in the contrib/mobile directory of the Gmsh source code repository. Build scripts are provided for iOS (requires a Mac with Xcode >= 6) and Android (requires Android SDK >= 14 and the Android NDK).