FreeFem++ & Javascript 17.1

Antoine Le Hyaric 1,2

FreeFem++ is a partial differential equation solver. Its primary users are mathematicians. As for many other software, some computing knowledge is required to install it on the many different computer systems that mathematicians use. But mathematical researchers, teachers or students should not be required to have this level of computing knowledge. The Javascript version of FreeFem++ works straight out of an HTML page, on any recent internet browser, both online or offline, on any operating system where such a browser is available. Creating a FreeFem++ program means editing a standard HTML page, which can become a complete literate program with math equations, editable portions and graphics. FreeFem++-js users can exchange their programs as HTML files with modifiable and fixed parts. This document itself is a FreeFem++ script. The current version of FreeFem++-js is 17.1.


Run FreeFem++ scripts online.
A Mathematical Model for Electrostatics as a Literate FreeFem++ Program
From chapter 9.1.2 of the FreeFem++ documentation.
Working Template
Contains everything necessary to create a new FreeFem++-js document.


Here is how to include a runnable FreeFem++ script into any HTML page. A working template is also available.


What is the required computer configuration?
FreeFem++-js works on any computer or smartphone. It runs in the internet browser. No download or install is required.
Where are the numerical computations done?
There is no computational server. FreeFem++-js runs on the machine where a browser is opened. Scripts saved locally as HTML pages with their Javascript dependencies will still work as they do not depend on any online facility.
Is there a risk of virus infection?
FreeFem++-js runs inside the Javascript virtual machine, which is built to stop viruses.
How to run FreeFem++-js scripts when disconnected from the internet?
Saving an HTML page containing FreeFem++-js to a local disk is enough to make it available offline. Saving a page can be also useful to keep a record of a modified script or to save on slow or data-capped internet connections.
Will any FreeFem++ script run?
At the moment, scripts will work if they do not contain the following features (not compiled into Javascript yet) : 3d graphs, include files, external tools (UMPPACK, ARPACK, etc), dynamic libraries.
With many thanks to the projects which where used in the making of FreeFem++-js
Debian Linux, Emscripten, JQuery, Bootstrap, MathJax