← Back to team overview

dolfin team mailing list archive

Re: Assembly + Dirichlet bcs

 



kent-and@xxxxxxxxx wrote:

kent-and@xxxxxxxxx wrote:
Anders Logg wrote:
On Wed, Aug 20, 2008 at 04:17:11PM +0200, kent-and@xxxxxxxxx wrote:
kent-and@xxxxxxxxx wrote:
Can Assembler::assemble_system be easily generalised to an Array
of
DirichletBC,

   Array<DirichletBC*> bcs

so that vector equations can be handled?

Garth

Good point, I'll have a look.

OK, I'm taking a look at the moment with a view to generalising
Assembler::assemble_system for nonlinear problems (Newton solve).

Garth
OK, in the present implementation, the matrix does not have 1 on the
diagonal
associated with bcs. It will be 1 times the number of elements (or
faces)
associated
with it.

This weighting can be stored but it is not presently done.

Kent
I amazed you even managed to implement that code. It's huge. We should
try to break it up so we can reuse as much as possible between that
and the standard assemble() function.

I was impressed :).

Now that what's needed is clear, it can be broken up. It looks to me
like a number of the existing functions can be extended slightly and
then re-used. The actual code for applying the bcs is not very long.

Garth

It is a mess,  way to large and should be broken up.
It is also a bit "difficult" to break up. For instance, the
coefficents may or may not need to be computed depending
on whether it has been computed earlier ie. after computing coefficients
for a macro element it should not be needed when computing the cell
integral.
The same applies to dof_maps.
Is there so much overhead involved in this? We're probably recomputing
these things in the other assembly functions. Perhaps there is
noticeable overhead, and that's why assemble_system is faster?

The other functions recompute. And there are some recomputations
in assemble_systems also. I guess avoiding these recomputations
and fewer matrix insertions is the reason for speed up. I don' know
which matter most.


Let's keep the mega-function and add a broken up version along side so that we can compare performance before removing it.

Hence it is hard to group everything associated
with eg a cell integral together in a function. Or maybe it can be done
with a set
of bools that contains the state of the various structures.

I'm testing now whether an Array of boundary condition can be applied as
simply as I think. If that works, assemble_system should be fully
functional and we can try breaking it up.

Great!


Seems like Arrays of bcs was really easy. I've pushed the changes.

Garth


Kent





References