← Back to team overview

ufl team mailing list archive

Re: UFL and new release

 

Quoting "Garth N. Wells" <gnw20@xxxxxxxxx>:

>
>
> Anders Logg wrote:
> > FFC is now fully functional w.r.t. compilation of UFL forms, at least
> > judging by the demos in FFC which now all produce correct results.
> >
> > The Poisson demo in DOLFIN has also been moved to UFL.
> >
> > I therefore suggest we make new releases of FFC, UFL and DOLFIN:
> >
> >   DOLFIN 0.9.2
> >   FFC 0.6.2
> >   UFL 0.1.0 ?
> >   SyFi/SFC?
> >
> > This batch of releases will support both the old .form format and the
> > new .ufl format. After the release, we can get started on cleaning up
> > and removing the .form format.
> >
> > In it's simplest form, the UFL form language looks very much like the
> > FFC form language. Here's a comparison for the Poisson demo:
> >
> > FFC
> > ---
> >
> >   element = FiniteElement("Lagrange", "triangle", 1)
> >
> >   v = TestFunction(element)
> >   u = TrialFunction(element)
> >   f = Function(element)
> >
> >   a = dot(grad(v), grad(u))*dx
> >   L = v*f*dx
> >
> > UFL
> > ---
> >
> >   element = FiniteElement("Lagrange", triangle, 1)
> >
> >   v = TestFunction(element)
> >   u = TrialFunction(element)
> >   f = Function(element)
> >
> >   a = inner(grad(v), grad(u))*dx # dot also works
> >   L = v*f*dx
> >
> > However, UFL does much more, like treatment of tensor expressions,
> > nonlinear operators like sin, cos, exp, sqrt, differentiation of forms
> > w.r.t. variables etc. For more information, look at Martin's summary:
> >
> >   http://www.fenics.org/wiki/UFL
> >
> > UFL includes a script form2ufl that can be used to convert from the
> > old FFC form language to the new UFL form language. The script is not
> > foolproof but it may help in converting to the new format.
> >
> > So, let's make a new release now (after getting the buildbot green
> > again for DOLFIN) and then make the full transition after the release.
> >
> > It's also time to promote UFL from a development project (/dev) to a
> > proper project (/hg) since now FFC, SFC and DOLFIN will depend on it.
> > Any objections?
> >
>
> It would be worth checking with Kristian how far away the quadrature
> optimisations are for FFC + UFL. If it's only a few days, it would be
> good to wait on the FFC release since the new quadrature code is quite a
> bit slower than the old code (around a factor of 5 in some of my tests).

It's already there, just uncomment the optimise_options lines at the top of the
uflquadraturegenerator.py file.
However, there might still be bugs in the generated code and it compiles slower
(I've seen a factor of around 6-7 in some cases)

Some benchmark tests:

PressureEquation       FFC comp.    num. ops  assemble 2.5e6 times
Old FFC (*.form),+opt: 45.0s         26679          28.2s
New FFC (*.ufl), -opt:  0.9s        166086         110.0s
New FFC (*.ufl), +opt:  3.4s         15771          21.8s

DGElastoDynamics  FFC comp. | ops. a, dx | ops. a, dS | ops. L, dx | ops. L, dS
(*.form), +opt:     16m20s        791        2098         1571         4305
(*.ufl),  -opt:         7s      25776       93600        10008        23280
(*.ufl),  -opt:        45s       1217        2529         1375         2923

For the elasto-dynmics case, running 10 time steps on a 9000 element mesh takes
roughly 14.5s for both of the two optimised versions. The new FFC without
optimisation runs 1 second slower (15.6s).

Kristian

> Garth
>
>
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > UFL-dev mailing list
> > UFL-dev@xxxxxxxxxx
> > http://fenics.org/mailman/listinfo/ufl-dev
>
>
> _______________________________________________
> UFL-dev mailing list
> UFL-dev@xxxxxxxxxx
> http://fenics.org/mailman/listinfo/ufl-dev
>




References