Wolfgang, You are right. My system has a non zero RHS after imposing the Dirichlet BC. That was my bad.
CG still works, just slow though. Edith > On Oct 10, 2016, at 10:58 AM, Wolfgang Bangerth <[email protected]> > wrote: > > On 10/10/2016 09:52 AM, Edith Sotelo wrote: >> It works with a direct solver. >> It is working with the CG solver as well I just increased the number of >> iterations (1000-> 2000) and decreased the tolerance (10^ -12 -> 10 ^ -10) >> >> Note about the system I am solving: >> In my PDE my RHS =0 (homogenous Helmholtz Eq. with Dirichlet BC) , >> Basically >> I am solving a system Ax=0 >> If there is a better way to solve this I would like to try. > > I think it's not quite clear to me what you do. If you solve the equation > operator * u = 0 > but with nonzero Dirichlet boundary condition, then this leads to a linear > system > A x = b > where b is not the zero vector. That's because the boundary values appear in > the rhs vector. You need to solve this like any other linear system. > > However, if you have the Helmholtz equation with the "bad" sign in front of > the mass term, then the matrix may be indefinite, and CG can not solve it. > > Best > W. > > > -- > ------------------------------------------------------------------------ > Wolfgang Bangerth email: [email protected] > www: http://www.math.colostate.edu/~bangerth/ > > -- > The deal.II project is located at http://www.dealii.org/ > For mailing list/forum options, see > https://groups.google.com/d/forum/dealii?hl=en > --- You received this message because you are subscribed to a topic in the > Google Groups "deal.II User Group" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/dealii/F6_iqj1mJnA/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > For more options, visit https://groups.google.com/d/optout. -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
