← Back to team overview

dolfin team mailing list archive

Re: [noreply@xxxxxxxxxxxxx: [Branch ~dolfin-core/dolfin/main] Rev 4575: Speedup assembly over exterior facets by not using BoundaryMesh]

 

On Sat, Feb 27, 2010 at 07:16:46PM +0000, Garth N. Wells wrote:
> On Sat, 2010-02-27 at 18:24 +0100, Anders Logg wrote:
> > On Sat, Feb 27, 2010 at 04:32:34PM +0000, Garth N. Wells wrote:
> > > On Fri, 2010-02-26 at 14:07 +0100, Anders Logg wrote:
> > > > I've added some timings in the sandbox repository with the following results:
> > > >
> > > >   Direct iteration: 7.23
> > > >   Create boundary: 34.27
> > > >   Iteration over boundary: 0.03
> > > >
> > > > This means direct iteration over facets (and skipping interior facets)
> > > > is faster than boundary extraction + iteration over boundary.
> > > >
> > >
> > > I'm not happy that this breaks parallel assembly. The change should be
> > > reverted until it works in parallel.
> > >
> > > Garth
> >
> > Should be fixed now.
> >
>
> I've rolled Assembler.cpp back to how it was a few days ago because the
> fix broke serial assembly. I suggest the we figure out how to handle
> interior facets in parallel, which should take care of the assembly over
> all facets.

Unrolled. It was just a small check that was missing.

> On the reported speed up, what about for repeated assembly? Is the
> BoundaryMesh created and destroyed every time?

Yes. The boundary mesh is (was) not cached so it was created again and
again. I saw this when debugging a code that segfaulted when the mesh
went out of scoped and I noticed quite a few calls to the constructor
and destructor of the Mesh class (every time we assembled over
exterior facets).

I haven't timed the assembly, but the creation of the boundary mesh
is quite high compared to just iterating over all facets.

--
Anders

Attachment: signature.asc
Description: Digital signature


References