Wednesday 6 October 2010

Metaprogramming and finite elements

The idea of metaprogramming is great; you write code that writes code that writes code... If I am not wrong the first language that introduced this concept was LISP (at the moment I am learning the Scheme dialect) So, the idea behind metaprogramming is to write a program in a high level language which will then create source code in a lower language (or even the same) in order to automate some procedure. From Lisp many languages have been influenced, such as Ruby and python, that also incorporate metaprogramming aspects.

One day someone said why don't we apply this concept to finite element code as well. Finite element code can be really annoying (as every code is) so by writing some code that writes finite element code would make our calculations easier. The result of this idea is the FEnics project. Thank you for the great job guys!!! Finite elements are usually used to solve partial differential equations. So find a PDE you like and just solve it.

The program can be easily installed in Ubuntu by writing
sudo apt-get install fenics
Of course there are many other packages for many distributions. Have fun!

No comments:

Post a Comment