Many, many ages ago we did Lagrange BCs ('cus there weren't any other types
of elements yet!) strongly.  The trick is to do it at the element
matrix/vector level before inserting into the global matrix.

There is actually a member function in DenseMatrix to do this:

Ke.condense(i,j,val,Fe);

is what you want.  This will impose val strongly by doing the right thing at
the element level.  Of course you can add these and instead of getting

val=foo

at the linear system level you get

N*val = N*foo


There is another, important issue though that John learned via suboptimal
convergence on triangular meshes...  Usually we only concern ourselves with
BCs on elements whose sides intersect the boundary, e.g. NULL neighbors...
If you are going to impose the value strongly through the element matrix
approach you have to do it for all elements which touch the DOF.


Finally, you can effectively accomplish the same thing with penalty using
add() instead of set(), just add 1e30 to the global matrix diagonal and
1e30*value to the RHS, all the other entries will "go away" in floating
point.

-Ben



On 6/12/08 3:12 PM, "Derek Gaston" <[EMAIL PROTECTED]> wrote:

> It's kind of hard to see how to go from dofs_on_side back to the
> mapping to Re()... you have to know what "node number" those dofs map
> to for the current element.  Or am I missing something?
> 
> Derek
> 
> On Thu, Jun 12, 2008 at 2:08 PM, Roy Stogner <[EMAIL PROTECTED]> wrote:
>> 
>> On Thu, 12 Jun 2008, Derek Gaston wrote:
>> 
>>> Of course putting all my thoughts together in an email made me realize
>>> what I needed to do... all I need to do is use the usual side
>>> assembly... and call elem->is_node_on_side(i,side)... and if it is
>>> then that dof is on the side... then I can just set
>>> Re(i)=soln(dof_indices[i])-bc_value like I want to... overriding
>>> whatever values were assembled into Re before I ever add it into the
>>> residual...
>> 
>> This looks good, but you might find it easier in the long run to use
>> FE::dofs_on_side() rather than Elem::is_node_on_side; the latter might
>> make it too easy to write code that only works on isoparametric
>> Lagrange elements.
>> ---
>> Roy
>> 
> 
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Libmesh-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/libmesh-users


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to