← Back to team overview

dolfin team mailing list archive

Re: Applying Dirichlet boundary conditions

 

On ma., 2008-07-07 at 09:38 +0100, Garth N. Wells wrote:
> I've had a look at the code for applying Dirichlet boundary conditions 
> by eliminating constrained dofs, and I think that we need to do it 
> differently. A constrained dof should be indicated by a negative index 
> in the DofMap, and then eliminated during the main assembly loop. We 
> then need to do something for DiscreteFunction so that it can pick up 
> the boundary values, which should be pretty easy.

Can you describe this in more detail. 

> 
> The current code will be very slow and isn't suitable for parallel 
> assembly, so I would suggest removing it and waiting until we redesign 
> DofMap, after which it will be possible to implement it reasonably 
> efficiently.


I agree that the current code will be slow, in particular because of the
need to call get. There is only one way (I think) to avoid this call and
it is to compute everything associated to a cell at once. 

The rest of the code is as I understand it just the things one has to 
do to ensure symmetry. 

I'll not remove the code just yet because I need it. 

Kent



References