Thanks to David and Vikram, your explanation helps me a lot. I'll do further exploration from your points. My current work is just to repeat what adaptivity_ex2.C does, with aim of showing we can solve PDEs with another programming model.
--Junchao Zhang On Tue, Jan 12, 2016 at 3:06 PM, Vikram Garg <vikram.v.g...@gmail.com> wrote: > Junchao, > Like David mentioned, the practical difficulty that the > penalty method poses is in matrix-conditioning, but this problem has been > largely alleviated by pre-conditioners/solvers today. Another problem is > that the penalty method can have a disproportionate impact on the > evaluations of certain functionals (quantities of interest) of the > solution, such as the boundary flux. But this can also be overcome. > > The penalty method can be viewed in many ways. One of the simplest way is > to think of a penalty method, is to think of solving a constrained > optimization problem. So. instead of solving, > Lu = f in the interior, > u = g on the boundary. > > One can think of solving the optimization problem, > Find u which minimizes: J(u) = 1/2 * ||Lu - f|_{interior}| + penalty * ||u > - g||_{boundary} > > Such formulations are very common in optimization. > > Another interpretation is to think of applying a Robin/Mixed boundary > condition instead of a Dirichlet one, so we solve: > Lu = f in the interior, > u = g + (1\penalty) * grad_n(u) on the boundary. > > I believe by smoothing function, you are either implying using a Lagrange > multiplier or the Nietsche method. Perhaps you need to do this because your > Dirichlet boundary data (g) is not smooth ? The Lagrange multiplier should > be possible to do in libMesh, not sure about Nietsche. But I would start > with penalty even in this case. > > If your boundary data is smooth enough, you can just use the Dirichlet > enforcement as the others have pointed out. > > Thanks. > > On Tue, Jan 12, 2016 at 2: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. >> >> --Junchao Zhang >> >> 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 >> > > > > -- > Vikram Garg > Postdoctoral Associate > Predictive Engineering and Computational Science (PECOS) > The University of Texas at Austin > http://web.mit.edu/vikramvg/www/ > > http://vikramvgarg.wordpress.com/ > http://www.runforindia.org/runners/vikramg > ------------------------------------------------------------------------------ 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