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.