From: Michael Schindler <mschindler@us...>  20050107 15:05:06

Hello Ben, On 07.01.05, KIRK, BENJAMIN (JSCEG) (NASA) wrote: > For example, consider Laplace's problem in 2D: > >  div(grad(u)) = 0 > > with u=g on some part of the boundary, du/dn=h on the remainder. > > In the weak statement you perform integrationbyparts, and the term du/dn > appears in a boundary integral and you can use this to impose a Neumann BC > in the RHS of the system. See, for example, > http://cfdlab.ae.utexas.edu/~benkirk/seminar/talk.pdf, Especially page 4. Do you mean just to replace du/dn in the boundary integral by h in order to "enforce" du/dn = h ?? This would be the FEM standard procedure, I guess. Exactly at this point I have some doubts. Consider a different setup, where I add the equation du/dn = h weighted with some penalty, to the linear system to be solved. This works quite well. The first prodecure is equivalent to this penaltyprocedure, if one sets the penalty to 1 which is not a really good value for a penalty. > It's not clear that you need to use the constraint matrix for this case... Therefore, I wanted to look for an alternative approach to enforce the boundary condition  and came across the constraint matrices. > For implementation, you simply need to define a finite element object that > lives on the boundary and can be used to integrate along the edge to provide > the required term. Clear? Yes, clear. For an element I would get a constraining equation (again for the case dn/du = h) h = \sum_i w_i u_i where u_i are the degrees of freedom and w_i are some weights determined by the geometry of the element. Now comes the next difficulty. I have an idea how the method DofMap::constrain_matrix_and_vector works. It creates a matrix C from the constraints and uses these constraints while inserting the correct values into the big system matrix. I would expect this _only_ to work for h = 0. Do I miss something here? > Unfortunately, none of the examples show this. If you have any more > questions let me know, it would be straightforward to modify ex14 to show > this procedure since it has the exact solution's derivative available. > Regardless, we should probably do that since it seems silly to have 14 > examples, all with Dirichlet BCs! This would be great! Thanks, Michael.  "A mathematician is a device for turning coffee into theorems" Paul Erdös. 