← Back to team overview

dolfin team mailing list archive

Re: Evaluating dolfin for use

 

On Fri, Oct 22, 2004 at 08:51:41AM -0700, Hugo Duncan wrote:

> On Fri, 22 Oct 2004 Anders Logg wrote:
> 
> > However, we are definitely moving in the direction of using some
> > existing linear algebra package, either if someone is willing to
> > maintain a linear algebra package as a FEniCS project, or if we just
> > create a wrapper in DOLFIN for some existing package. Two things need
> > to happen for this to become a reality:
> >
> > 1. We find a linear algebra package that we like. (Should be actively
> > maintained and at least close to becoming a standard.)
> 
> Well, I would recommend at least looking at uBLAS,
> 
> http://www.boost.org/libs/numeric/ublas/doc/index.htm,
> 
> although it does not have the distributed/parallel aspects of PETSc
> or POOMA.
> 
> One nice thing about ublas is that it can use different storage
> implementations for its vectors and matrices.

I've looked at ublas before. It's certainly one of the
alternatives. Another option we have looked at is MTL, see

    http://www.osl.iu.edu/research/mtl/

but it seems to be out of development.

Is ublas actively maintained? When we decide on a linear algebra
package, it needs to satisfy one of two conditions:

1. The package needs to pass the simple test

    apt-cache search package

i.e. the package should be available in Debian.

2. The package should be another FEniCS project.

> > Just create a subclass of the Matrix
> > class and overload the operators that you need.
> 
> I am very wary of any matrix library that depends on a virtual interface.

I understand your concerns.

> > 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.
> 
> Excellent!  It should be possible to achieve a domain specific language
> without leaving the c++ world.  Operator overloading can achieve much in  
> terms
> of arriving at a language that can be implemented as valid c++ syntax.
> Look forward to seeing your test example.

If you want to see fancy operator overloading in C++ you might be
(temporarily) disappointed with the new approach. DOLFIN currently
uses operator overloading in C++ to create a language for variational
forms. The problem with this approach is that the form is
"interpreted" run-time (creating objects) which makes the assembly
slower than optimal. The new form compiler is written in Python and
currently only accepts input in Python, but a C++ interface within
DOLFIN will also be available.

/Anders



References