← Back to team overview

dolfin team mailing list archive

Re: DOLFIN-dev Digest, Vol 5, Issue 7

 

> One area where we're taking the approach of developing a domain
> specific language is for the evaluation of variational forms. I'm
> currently working on a new project called the FEniCS Form Compiler
> (FFC), which is about creating a language for variational forms and
> generating code (C or C++) for the evaluation of the forms. This will
> be integrated with DOLFIN (in fact, I will add a test example later
> today) and make the assembly in DOLFIN extremely fast, just as fast as
> if you do all the precomputations and optimizations by hand.

Dear developers,
Currently I am writing expression-templates code which I am going to publish ,
that allow for evaluation of variational forms. You do not need any any external
language for that. Expression templates result to code that runs as 
fast as hand-optimizing code. In fact I know 2 other ways to do the same thing.
One is only applicable to tetrahedra(3D)-triangles(2D) and the other is more
general. I expect them though to be slower than expression templates.
How much slower? I will find out in the next few days! The good thing is
that either way, one is finally able to write a variational formulation like:

Variable<Simplex, P2, _3D> u,v;
f = u*v + k*grad(u)*grad(v); //where k is constant.

In order for it to be more general though, one should be able to use,
elements of arbitrary order. Then I have a problem with integration in
triangle-tetrahedra, because the integration points-weights that are available,
as far as I know, are 7th order for triangles and 5th order for
tetrahedra. Do you know any generic routine which generates points-weights
for quadrature in triangles-tetrahedra for arbitrary order? 


Would it be feasable to "plug in" ublas instead of dolfin's own
 >      matrix/vector classes (ie. do dolfin matrix and vector classes
 >      have a well defined interface or concept?)
 

As it concerns the Matrix-Vector Library it depends on the goal of the whole
project. If you aim at parallel stuff, then you also have to decide which kind 
of parallel stuff you want to support. Then one has the following 2 options:
1:) For SMPs the best way, at my opinion,to go through is to create your own
expression-template library with support for OpenMP directives. 
2:) For distributed parallel stuff, since dolfin's is a FEM oriented software
and FEM use sparse  kernels, the is no point developing or wrapping existing 
(dense)Matrix-Vector parallel(MPI) libraries. On the other hand distributed
parallel FEM codes should implement Domain-Decomposition rather than parallel 
sparse linear solvers. 

Anders let me ask you something! When solving non-linear problems, or when using
an iterative solver(GMRES, BiCGSTAB ...) we are computing a lot of times
the residual (A*x-b) where A is a sparse matrix. The matrix vector
multiplication routine is a very slow one and its performance is also bounded 
by bandwidth. Do you have any idea of an alternative way? Some people say, that
first a renumbering should be performed to minimize the sparse-matrix bandwidth
and then use optimized(Goto, Atlas BLAS) kernels to perform the multiplication
blocks by blocks! This can be applied of course if your matrix has dense
sub-blocks. Others convert the CSR format to BSR(block compressed sparse row)
format. What do you think about that? Do you have something in mind?

Thanks in advance!
Drosos.





Follow ups