Rahul,

What type of boundary condition (Dirichlet or Neumann)?  Are you  
planning on enforcing Dirichlet conditions using a penalty (as all of  
the libMesh examples do)?

In general in libMesh we don't operate on _nodes_ for boundary  
conditions.... we operate on sides.  The reason for this is that we  
integrate the boundary condition over the side.  Also... working with  
nodes is precarious with adaptivity.... because new nodes are always  
getting generated so the book-keeping is a pain.  As you can see in  
the examples (like ex3) one way to achieve this is to look for NULL  
neighbors... then you know you're on a boundary side so you can  
integrate your boundary condition over that side.

Now... if you want to do something more sophisticated than looking for  
NULL neighbors you need to interact with the BoundaryInfo object for  
the mesh (mesh->boundary_info).  With this object you can associate  
sides (and their associated elements) with an id.  Then you can get  
back a list of elements, sides and ids by calling "build_side_list".   
You can then loop over this list to integrate your boundary conditions.

Another option other than using "build_side_list" is to go ahead and  
check for NULL neighbors... and when you find one ask the  
boundary_info object for teh boundary_id() associated with that  
element and side.  Then key off of that to know which boundary  
condition to apply.

Finally... some mesh formats will automatically add side set info to  
the boundary_info object when the mesh is read from a file.  I know  
for a fact that the Exodus reader does this... and there was some  
discussion on this capability for GMSH earlier this week (although I  
don't know if it works yet).  Another option is to have a preprocessor  
built using libMesh that reads the format of your choice... adds sides  
to the boundary info object and then writes out an xda/xdr mesh file  
that will contain the boundary info.  One other thing: the internal  
mesh generators inside libMesh usually try to assign boundary info to  
the sides.  For instance the build_square() routine will assign  
boundaries 0,1,2,3 to the different flat sides of the square.

Hope that helps,
Derek

On Oct 30, 2009, at 7:35 AM, Rahul Sampath wrote:

> Hi:
>
> I would like to know how to tag nodes with different boundary ids for
> possibly different sets of boundary conditions and loop over the
> subset of elements that contain nodes of a particular boundary id. I
> would also be able to do this in parallel. Could someone kindly tell
> me how to do this?
>
> Thank you very much.
>
> Regards,
>
> Rahul
>
> ------------------------------------------------------------------------------
> 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