On Tue, Jan 12, 2016 at 3:36 PM, Junchao Zhang <junchao.zh...@gmail.com>
wrote:

> I took some notes when my boss told me the smoothing function months ago.
> He thought we should treat interior points equally with boundary points and
> thus penalty method is garbage in his words:). For a domain [0, 1] x [0,
> 1], we can multiply unknown u with a function such as x(1-x)y(1-y), making
> the boundary all zeros.
>
> I am a guy from computer science. Understanding FE is hard for me.  Hope I
> can get some hints here.
> Thank you.
>


"Garbage" is a strong word. The penalty method works just fine in practice.
In my experience, the primary drawback of it from a practical point of view
is that it increases the matrix condition number.

But anyway, you don't have to use the penalty method. As Geordie pointed
out, several of the examples demonstrate how to impose Dirichlet boundary
conditions directly using the DirichletBoundary object, which is presumably
what you're looking for (e.g. see introduction_ex4). The DirichletBoundary
constraints impose the desired boundary condition by zeroing the matrix row
(and column too, if you use symmetric constraints), setting the diagonal to
1, and setting the rhs to whatever value you want (as per the function
passed to the DirichletBoundary).

David




> On Mon, Jan 11, 2016 at 5:46 PM, Geordie McBain <gdmcb...@freeshell.org>
> wrote:
>
> > 2016-01-12 8:44 GMT+11:00 Junchao Zhang <junchao.zh...@gmail.com>:
> > > Hello,
> > >    I am learning FEM by reading the Libmesh example adaptivity_ex2.C
> and
> > > have two questions.
> >
> > >    2) The code uses the penalty method to impose boundary conditions. I
> > was
> > > told the penalty method is bad and a smoothing function with zero on
> > > boundary is preferred. Could someone point me to literatures or
> examples
> > on
> > > smoothing?
> >
> > Hello.  I'm not sure that 'the penalty method is bad'.  There can be
> > some technical issues with it in specialized problems, but if you're
> > only just learning FEM, I wouldn't worry about them for the moment.  A
> > good introductory reference for the penalty method is the section
> > 'Essential boundary conditions' on pp. 121-122 of
> >
> >    Becker, E. B., G. F. Carey, & J. T. Oden (1981). Finite Elements,
> > An Introduction,
> >    Volume 1 of The Texas Finite Element Series. Englewood Cliffs, New
> > Jersey: Prentice-Hall
> >
> > which includes: 'The penalty method is not only easy to implement and
> > mathematically sound but it is also easy to motivate by physical
> > arguments.'
> >
> > I haven't heard of the 'smoothing function' idea, but if you do need
> > or would prefer to avoid the penalty method, libMesh does have the
> > DirichletBoundary, as in introduction_ex4.C.
> >
>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
> _______________________________________________
> Libmesh-users mailing list
> Libmesh-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libmesh-users
>
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to