Hello everybody,


I found Amuthan 's blog a while back, but only about two weeks ago I found 
the time to look seriously at Julia. What I found was very encouraging.


For a variety of teaching and research purposes I maintain a Matlab FEA 
toolkit called FinEALE. It is about 80,000 lines of code with all the 
examples and tutorials. In the past week I rewrote the bits and pieces that 
allow me to run a comparison with Amuthan 's code. Here are the results:


For 1000 x 1000 grid (2 million triangles):


Amuthan's code: 29 seconds


J FinEALE: 86 seconds


FinEALE: 810 seconds


Mind you, we are not doing the same thing in these codes. FinEALE and J 
FinEALE implement code to solve the heat conduction problem with 
arbitrarily anisotropic materials. The calculation of the FE space is also 
not vectorized as in Amuthan's code. The code is written to be legible and 
general: the same code that calculates the matrices and vectors for a 
triangle mesh would also work for quadrilaterals, linear and quadratic, 
both in the pure 2-D and the axially symmetric set up, and tetrahedral and 
hexahedral elements in 3-D. There is obviously a price to pay for all this 
generality.


Concerning Amuthan 's comparison with the two compiled FEA codes: it really 
depends how the problem is set up for those codes. I believe that Fenics 
has a form compiler which can spit out an optimized code that in this case 
would be entirely equivalent to the simplified calculation (isotropic 
material with conductivity equal to 1.0), and linear triangles. I'm not 
sure about freefem++, but since it has a domain-specific language, it can 
also presumably optimize its operations. So in my opinion it is rather 
impressive that Amuthan 's code in Julia can do so well.


Petr
 

Reply via email to