Hi, due to round-off errors it is essentially impossible to ensure 'true zeros' in general. If you know a-priori that some entries have to be zero, you might simply overwrite your solution vector after the solver run accordingly. Instead, you may also decide not to assemble the respective equations for these 'known unknowns' at all.
Best regards, Karli On 11/01/2012 11:49 AM, NAN ZHAO wrote: > Dear all, > > I am using PETSC to solve a fairly large linear system, petsc sometimes > give me a answer of 10E-8 (but it should be 0). I do some research and > found if I scale some parts of the linear system to a very small scale (for > example I scale the third equation I solve to 1e-6), and PETSC give me the > right answer (I got zero at the place it should be zero). Is any one have > some hint of how to set some parameter in PETSC to archieve this as the > user is not able to set the scale easily. > > Thanks, > Nan >
