Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Rightclick on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: Karen Lee <kylkaren@gm...>  20100219 22:40:44

Dear Libmesh users, I'm wondering how we can impose boundary conditions. I'm looking at example 3, and it says that it handles the Dirichlet BC by a penalty function. I wanted to check that: const Real value = exact_solution(xf, yf); is the line that gives the value, so if I wanted to impose that the values at the boundary are 0, I just put 0 instead right? The other thing is, I'm not sure whether BoundaryMesh can just locate the boundary. I use tetgen .node and .ele files, and it doesn't seem that the .face files are read by libmesh, and so I'm wondering how it's able to locate the boundary... Or do I add some tags and say that certain nodes and elements are on the boundary? Thank you so much, Karen 
From: John Peterson <peterson@cf...>  20100219 23:05:40

On Fri, Feb 19, 2010 at 4:40 PM, Karen Lee <kylkaren@...> wrote: > Dear Libmesh users, > > I'm wondering how we can impose boundary conditions. I'm looking at example > 3, and it says that it handles the Dirichlet BC by a penalty function. I > wanted to check that: > > const Real value = exact_solution(xf, yf); > > is the line that gives the value, so if I wanted to impose that the > values at the boundary are 0, I just put 0 instead right? That's right. > The other thing is, I'm not sure whether BoundaryMesh can just locate > the boundary. I use tetgen .node and .ele files, and it > doesn't seem that the .face files are read by libmesh, and so I'm > wondering how it's able to locate the boundary... Or do I add > some tags and say that certain nodes and elements are on the boundary? Libmesh determines elements which are on the boundary automatically. After the Mesh::find_neighbors routine, which is usually called from the Mesh::prepare_for_use function, elements with NULL neighbors are boundary elements. We do not maintain a separate list of such elements, though, as far as I know.  John 
From: Roy Stogner <roystgnr@ic...>  20100219 23:06:02

On Fri, 19 Feb 2010, Karen Lee wrote: > const Real value = exact_solution(xf, yf); > > is the line that gives the value, so if I wanted to impose that the > values at the boundary are 0, I just put 0 instead right? Right. In fact, in a linear system like ex3 the whole residual drops out in this case, and homogeneous Dirichlet boundaries only end up affecting your matrix. For nonlinear systems things are trickier depending on your solver; see ex18 for an example. > The other thing is, I'm not sure whether BoundaryMesh can just locate > the boundary. I use tetgen .node and .ele files, and it > doesn't seem that the .face files are read by libmesh, and so I'm > wondering how it's able to locate the boundary... Or do I add > some tags and say that certain nodes and elements are on the boundary? The boundary is currently implicitly defined: if an element doesn't have a neighbor on one side, that side is a boundary side. If a node is on a boundary side, that node is a boundary node. That works fine for most domains, which are the interior of their own closure. If you've got something more complicated, let us know, but don't be too optimistic. We currently break when refining domains with infinitely thin slits, for one embarrassing example.  Roy 
From: Karen Lee <kylkaren@gm...>  20100220 05:07:36

Thanks for your response! On Fri, Feb 19, 2010 at 6:01 PM, Roy Stogner <roystgnr@...>wrote: > > On Fri, 19 Feb 2010, Karen Lee wrote: > > const Real value = exact_solution(xf, yf); >> >> is the line that gives the value, so if I wanted to impose that the >> values at the boundary are 0, I just put 0 instead right? >> > > Right. In fact, in a linear system like ex3 the whole residual drops > out in this case, and homogeneous Dirichlet boundaries only end up > affecting your matrix. For nonlinear systems things are trickier > depending on your solver; see ex18 for an example. > > > My system is linear, so I'll just set things to 0. > The other thing is, I'm not sure whether BoundaryMesh can just locate >> the boundary. I use tetgen .node and .ele files, and it >> doesn't seem that the .face files are read by libmesh, and so I'm >> wondering how it's able to locate the boundary... Or do I add >> some tags and say that certain nodes and elements are on the boundary? >> > > The boundary is currently implicitly defined: if an element doesn't > have a neighbor on one side, that side is a boundary side. If a node > is on a boundary side, that node is a boundary node. > > That works fine for most domains, which are the interior of their own > closure. If you've got something more complicated, let us know, but > don't be too optimistic. We currently break when refining domains > with infinitely thin slits, for one embarrassing example. > My domain has no holes. Should be ok I guess =) Thanks, Karen 
Sign up for the SourceForge newsletter:
No, thanks