Let me take a whack at this...

Yujie.... there is no error involved.... the statements in example 3  
will work for any type of element.

The trick is that example 3 is using a penalty equation to enforce a  
Dirichlet BC.  It does NOT enforce the Dirichlet BC in the traditional  
way of modifying values at nodes.  Instead... we are _integrating_ a  
penalty condition over the boundary such that when that penalty is  
taken into account the solution values on that boundary have no choice  
other than to take on the values you are trying to enforce.

It's the fact that we are _integrating_ this condition that allows us  
to not care about element type.  For every element type we know how to  
integrate something over the boundary...

As Roy mentioned... for most shape functions (including Lagrange)  
_phi_face corresponding to an interior degree of freedom will be  
zero.  This means that those shape functions don't have any support on  
the boundary and therefore their associated degrees of freedom aren't  
involved in the selection of values corresponding to the boundary  
condition.... which means their equations aren't modified by the  
penalty integration (again because _phi_face is _zero_ for those shape  
functions).

Hope that helps,
Derek

On Oct 25, 2009, at 7:56 PM, Yujie wrote:

> Dear Roy,
>
> "
> Simple:  we don't guarantee that i is a boundary vertex.  In fact,
> that would be an easy source of error when integrating Neumann or
> Robin type boundary conditions, where the interior vertices affect the
> gradients being integrated and you can't leave them out."
>
> Whether is the error avoided? If it is, how to do it? Thanks a lot.
>
> Regards,
> Yujie
>
> On Sun, Oct 25, 2009 at 7:35 PM, Roy Stogner  
> <[email protected]>wrote:
>
>>
>> On Sun, 25 Oct 2009, Yujie wrote:
>>
>> for each element, we have
>>> "
>>>        for (unsigned int i=0; i<phi.size(); i++)
>>>          Fe(i) += JxW[qp]*fxy*phi[i][qp];
>>> "
>>> for each boundary side, we have correspondingly
>>> "
>>>          for (unsigned int i=0; i<phi_face.size(); i++)
>>>            Fe(i) += JxW_face[qp]*penalty*value*phi_face[i][qp];
>>> "
>>> Assuming that we use tetrahedral element and linear Lagrange shape
>>> function,
>>> in this case, for an element, there are 4 vertices, that is i=0,  
>>> 1, 2, 3.
>>> for a boundary side, how to guarantee the vertices (i=0, 1, 2) on  
>>> the
>>> boundary? Thanks a lot.
>>>
>>
>> Simple:  we don't guarantee that i is a boundary vertex.  In fact,
>> that would be an easy source of error when integrating Neumann or
>> Robin type boundary conditions, where the interior vertices affect  
>> the
>> gradients being integrated and you can't leave them out.
>>
>> But for Dirichlet conditions, the terms where i is an interior vertex
>> don't matter, because phi_face is evaluated on boundary sides and
>> we have phi_face[i_interior][qp] = 0.
>> ---
>> Roy
>>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart  
> your
> developing skills, take BlackBerry mobile applications to market and  
> stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Libmesh-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/libmesh-users


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to