The characteristics of FreeFem++ are:
First open the following web page
And choose your platform: Linux, Windows, MacOS X, or go to the end of the page to get the full list of downloads.
Remark: Binaries are available for Microsoft Windows and Apple Mac OS X and Linux.
Only for those who need to recompile FreeFem++ or install it from the source code:
To compile the documentation and the application under MS-Windows we have used the LATEX and the cygwin environment from
and under MacOS X we have used the apple Developer Tools Xcode, LATEX from http://www.ctan.org/system/mac/texmac.
FreeFem++ must be compiled and installed from the source archive. This archive is available from:
To extract files from the compressed archive freefem++-(VERSION).tar.gz to a directory called
freefem++-(VERSION)
enter the following commands in a shell window :
To compile and install FreeFem++ , just follow the INSTALL and README files. The following programs are produced, depending on the system you are running (Linux, Windows, MacOS) :
After installation, The list of application ( depending of the system and the compiling option ) can be :
Remark, in most cases you can set the level of output (verbosity) to value nn by adding the parameters -v nn on the command line.
As an installation test, under unix: go into the directory examples++-tutorial and run FreeFem++ on the example script LaplaceP1.edp with the command :
If you are using nedit as your text editor, do one time nedit -import edp.nedit to have coloring syntax for your .edp files.
The syntax of tools FreeFem++,FreeFem++-nw on the command-line are
where the part in [] is optional.
First download the windows installation file, then execute the download file to install FreeFem++. In Select Additional Task windows, check once the ”Add application directory to your system path your system path ..” boxes, because the screen on-the-fly plot is done with programm ffglut.exe and it can be not found.
After that you have two new icons on your desktop:
where (VERSION) is the version of the files (for example 2.3-0-P4).
By default, the installed files are in
C:\Programs Files\FreeFem++
In this directory, you have all the .dll files and and other applications: FreeFem++-nw.exe,ffglut.exe, ... the FreeFem++ application without graphic windows.
The syntax of tools on the command-line are same
this is a multipurpose text editor with advanced features such as syntax coloring; a macro is available on www.freefem.org to localize winedt to FreeFem++ without disturbing the winedt functional mode for LateX, TeX, C, etc. However winedt is not free after the trial period.
It is also an editor for TeX/LaTeX. It has a ”‘tool”’ menu which can be configured to launch FreeFem++ programs as in:
nedit -import edp.nedit
Download the MacOS X binary version file, extract all the files with a double click on the icon of the file, go the the directory and put the FreeFem+.app application in the /Applications directory. If you want a terminal access to FreeFem++ just copy the file FreeFem++ in a directory of your $PATH shell environment variable.
If you want to automatically launch the FreeFem++.app, double click on a .edp file icon. Under the finder pick a .edp in directory examples++-tutorial for example, select menu File -> Get Info an change Open with: (choose FreeFem++.app) and click on button change All....
Under MacOS X with Graphic Interfaces For testing or running an .edp file, just drag and drop the file icon on the MacOS application FreeFem++.app icon. You can also use the menu: File → Open after launching the application.
One of the best ways on MacOS is to use the text editor mi.app
and to use the edp mode stored in mode-mi-edp.zip. After downloading and installing the mi editor, unzip mode-mi-edp.zip and put the created folder in the folder opened with the mi.app menu Option->Open Mode Folder menu and set mi as the default application for all the .edp files.
Under terminal First choose the type of application from FreeFem++, FreeFem++-nw, FreeFem++-mpi, …depending on your pleasure, system, etc…. Next you enter, for example
FreeFem++ reads a user’s init file named freefem++.pref to initialize global variables: verbosity, includepath, loadpath.
Remark: the variable verbosity changes the level of internal printing (0, nothing (except mistake), 1 few, 10 lots, etc. ...), the default value is 2. The include files are searched from the includepath list and the load files are searched from loadpath list.
The syntax of the file is:
The possible paths for this file are
We can also use shell environment variable to change verbosity and the search rule before the init files.
Remark: the separator between directories must be ”;” and not ”:” because ”:” is used under Windows.
Remark, to show the list of init of freefem++, do
The project has evolved from MacFem, PCfem, written in Pascal. The first C version lead to freefem
3.4; it offered mesh adaptativity on a single mesh only.
A thorough rewriting in C++ led to freefem+ (freefem+ 1.2.10 was its last release), which
included interpolation over multiple meshes (functions defined on one mesh can be used on
any other mesh); this software is no longer maintained but still in use because it handles a
problem description using the strong form of the PDEs. Implementing the interpolation from
one unstructured mesh to another was not easy because it had to be fast and non-diffusive;
for each point, one had to find the containing triangle. This is one of the basic problems of
computational geometry (see Preparata & Shamos[18] for example). Doing it in a minimum number
of operations was the challenge. Our implementation is O(nlog n) and based on a quadtree.
This version also grew out of hand because of the evolution of the template syntax in C++.
We have been working for a few years now on FreeFem++ , entirely re-written again in C++ with a
thorough usage of template and generic programming for coupled systems of unknown size at compile
time. Like all versions of freefem it has a high level user friendly input language which is not too far
from the mathematical writing of the problems.
The freefem language allows for a quick specification of any partial differential system of equations. The language syntax of FreeFem++ is the result of a new design which makes use of the STL [26], templates and bison for its implementation; more detail can be found in [12]. The outcome is a versatile software in which any new finite element can be included in a few hours; but a recompilation is then necessary. Therefore the library of finite elements available in FreeFem++ will grow with the version number and with the number of users who program more new elements. So far we have discontinuous P0 elements,linear P1 and quadratic P2 Lagrangian elements, discontinuous P1 and Raviart-Thomas elements and a few others like bubble elements.