← Back to team overview

dolfin team mailing list archive

Re: elasticity demo timings

 



Anders Logg wrote:
On Tue, Apr 24, 2007 at 04:37:13PM +0200, Garth N. Wells wrote:
I've done some rough timings for assembly of the elasticity demo with the mesh refined once. For assembly, things are much faster (almost a factor 3), but the application of Dirichlet boundary conditions has become very expensive. Both the creation of sub-domains and the application of the boundary conditions appears to be quite costly. Of the time required for mesh initialisation, refinement, assembly and application of boundary conditions, more the 50% of the runtime involves the application of the boundary conditions. In version 0.64, the application of boundary conditions involves almost zero overhead.

Garth

Strange... There are are a few differences in how the bcs are handled
compared to 0.6.4 but I didn't think these would introduce any
overhead. Here are the major differences:

1. We loop over the whole domain, not just the boundary

This means we can set Dirichlet conditions in the interior as well as
on the boundary. The overhead should be small, since before we always
created a BoundaryMesh before iterating over the boundary and that
creation involves an iteration over the entire mesh, as well as
creating the new data for the boundary mesh.
2. We create the mesh functions for the sub domains

This is only done when a mesh function has not been supplied. If you
have a mesh function that specifies the sub domains, then this step is
not needed. Perhaps we could do some optimization in the
BoundaryCondition constructor.


Creating the sub-domains is very expensive: 11.1 / 24 s. Application of the boundary conditions (bc.apply(. . .)) requires 3.41 / 24 s, which still seems like quite a lot.

Garth

3. We don't need a geometric test to find the boundary dofs

Before, we tested geometrically whether or not a dof was on the
boundary. We don't need that anymore since FFC generates
tabulate_dofs() that knows which dofs are on the boundary. This should
work in favor of the new boundary condition application.

/Anders
_______________________________________________
DOLFIN-dev mailing list
DOLFIN-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/dolfin-dev





Follow ups

References