← Back to team overview

dolfin team mailing list archive

Re: Functions for applying boundary conditions to the RHS vector only now accept the solution vector x. Where Dirichlet boundary conditions are applied, b = x - bc.The is useful for applying boundary conditions within Newton iterations. [...]

 

On Fri, Dec 02, 2005 at 07:14:32PM +0100, Garth N. Wells wrote:

> >Or in your case, you
> > want to supply a very special boundary condition which is obtained
> > from a combination of a vector and an expression.
> 
> I wouldn't call the boundary conditions I'm using very special. They are
> standard when using Newton solution methods ;-). In many codes they are more the
> rule than the exception.

Yes, you're probably right.

> > > > Then you would be able to have one applyBC() function but in your case
> > > > you give it a special boundary condition that returns the residual.
> 
> This could be the way to go. As a quick start, I could associate the approximate
> solution function with the BoundaryCondition object, and return bc - u. This
> won't work for inhomogeneous Neumann boundary conditions though. These will have
> to be dealt with somehow in applyBC(). In this case we need return the
> difference between the "internal force vector"and the "external force vector".

I'm not sure how we want to deal with Neumann boundary conditions. In
the simplest case, we don't have to deal with them at all, if they are
a part of the variational form.

> It would be nice to keep a simple BoundaryCondition class which doesn't require
> the user to think about the details of the iterative solution procedure.

I agree.

I have not looked so closely at the new nonlinear solver yet, so I
don't have any further suggestions at this point. I'll know more when
I get to it.

/Anders



Follow ups

References