From: li pan <li76pan@ya...>  20061004 08:26:01

hi, there are too many elements need to set. It's too expensive. So what's the advantage to do it in comparison with penalty method in libmesh? regards pan  HaeWon Choi <haewon@...> wrote: > Hi, actually John clarify what I exactly want. Thank > you John, > For PetSc, MatZeroRows set 1 for all diagonal > entities > of all Dirichlet boundary rows (other entities will > be zero) as I > mentioned last time. > In fact you can find examples using this approach > from PetSc since I > have learned > this from PetSc. > What you have to do is modify RHS as John's example > shows. > I have used this method for my other codes using > PetSc (but not for > libMesh yet). > This approach gives same results as reduced matrix > method. > > HaeWon > > On Sep 29, 2006, at 5:45 AM, John Peterson wrote: > > > Just as an addendum to Tim's note, you can > maintain any > > symmetry originally present in the problem by > "subtracting" > > the column entries multiplied by the Dirichlet > value from > > the right hand side vector. > > > > If Au=b, where > > > > [a_11 a_12 a_13] [u1] = [b1] > > [a_21 a_22 a_23] [u2] = [b2] > > [a_31 a_32 a_33] [u3] = [b3] > > > > and u1 = g1, a nonhomogeneous BC val, we can > modify Au=b as: > > > > [ 1 0 0 ] [u1] = [g1] > > [ 0 a_22 a_23] [u2] = [b2  g1*a21] > > [ 0 a_32 a_33] [u3] = [b3  g1*a31] > > > > > > This imposes u1=g1, and maintains any original > symmetry of A. > > > > > > John > > > > > > > > Tim Kröger writes: > >> Dear all, > >> > >> On Fri, 29 Sep 2006, li pan wrote: > >> > >>> I'm also thinking about this. Are you sure that > you > >>> only need to zero all the enties of rows? I read > >>> somewhere that columes should also be zeroed. > Could > >>> somebody confirm this? > >> > >> If you zero only the row entries, the matrix will > no longer be > >> symmetric. This is often considered as a > drawback (provided that the > >> matrix was symmetric before) because certain > solvers (e.g. CG) cannot > >> be used then any more. > >> > >> On the other hand, if the column entries are also > zeroed, the > >> solution > >> of the system will be wrong  except for the > case of *homogeneous* > >> Dirichlet conditions. For this reason, some > people transform their > >> problems to homogeneous boundary conditions, i.e. > they do in practice > >> the same thing that is usually done theoretically > anyway, i.e. they > >> subtract a function that fulfills all Dirichlet > boundary conditions > >> but not the PDE. Note that in the discrete case, > such a function is > >> trivial to find. > >> > >> Because I find this all quite unsatisfactory, I > was glad to see that > >> libMesh uses the penalty method (which I did not > know before) because > >> it is easy to implement, works in all cases, and > does not destroy > >> symmetry or positivity of the matrix. > >> > >> Best Regards, > >> > >> Tim > > > > >  > > >  > > Take Surveys. Earn Cash. Influence the Future of > IT > > Join SourceForge.net's Techsay panel and you'll > get the chance to > > share your > > opinions on IT & business topics through brief > surveys  and earn > > cash > > http://www.techsay.com/default.php? > > > page=join.php&p=sourceforge&CID=DEVDEV________________________________ > > > _______________ > > Libmeshusers mailing list > > Libmeshusers@... > > > https://lists.sourceforge.net/lists/listinfo/libmeshusers > > >  > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get > the chance to share your > opinions on IT & business topics through brief > surveys  and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Libmeshusers mailing list > Libmeshusers@... > https://lists.sourceforge.net/lists/listinfo/libmeshusers > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com 