← Back to team overview

dolfin team mailing list archive

Re: SystemAssembler

 

On 10/04/11 18:35, Anders Logg wrote:
On Tue, Oct 04, 2011 at 04:17:01PM +0100, Garth N. Wells wrote:
On 4 October 2011 12:24, Anders Logg<logg@xxxxxxxxx>  wrote:
SystemAssembler does not support subdomains. It is even silently
ignoring all other integrals than number 0.

This is one of the remaining bugs for 1.0-beta2. I can try to fix it
but would like some input on what shape the SystemAssembler is
currently in. I haven't touched it that much before since it looks
like a bit of code duplication to me. In particular, is it necessary
to keep both functions cell_wise_assembly and facet_wise_assembly?

It would require some performance testing to decide. I expect that,
for performance reasons, both are required.
I'm not getting the Launchpad mails but Marie is telling me it works
fine for her. Perhaps I broke something when I fixed a couple of bugs
today.

Here's the test script I'm running:


from dolfin import *

mesh = UnitCube(32, 32, 32)
V = FunctionSpace(mesh, "Lagrange", 1)
u = TrialFunction(V)
v = TestFunction(V)
a = dot(grad(u), grad(v))*dx
L = v*dx

tic()
assemble(a)
assemble(L)
toc()
print "Regular assembler:", toc()

tic()
assemble_system(a, L)
toc()
print "System assembler:", toc()

I get similar results:

meg@meg-laptop:~$ python test.py
Regular assembler: 0.593057870865
System assembler: 8.84729909897

However, if I add the line

bc = DirichletBC(V, 0.0, "on_boundary")

before the first tic(), I get

meg@meg-laptop:~$ python test.py
Regular assembler: 0.585546970367
System assembler: 0.587481021881

Is there some initialization that happens in the SystemAssembler if not already initialized?

--
Marie






References