I am scaling my systems when dealing with small (microscopic) scales in SI dimensions. This is because otherwise I have very small (near epsilon) entries in the matrix and the solution fails or takes significantly longer to converge. I used to do it by hand so far, if there is a way to do it in Petsc - especially automatically detecting the optimal scale - I am all ears.
Dominik On Fri, Dec 23, 2011 at 11:11 AM, Alexander Grayver <agrayver at gfz-potsdam.de> wrote: > Hi, > > Sorry for small offtopic. > I would also be interested more to know how it scales system? I mean what is > idea behind this scaling. > > Regards, > Alexander > > > On 23.12.2011 03:50, Mohamad M. Nasr-Azadani wrote: > > Hi guys, > > Three questions: > 1) As mentioned on the web when we use > -ksp_diagonal_scale_fix:?scale the matrix back AFTER the solve > > with -ksp_diagonal_scale does it also scale back the RHS vector associated > with the KSP solver? > > 2) Also, as mentioned on the web for -ksp_diagonal_scale > "Tells?KSP?to symmetrically diagonally scale the system before solving.?" > > When I used this option to solve for the Pressure (Poisson equation with > Neumann B.C., descritized via structured fisytenite-difference method), the > number of iterations for convergence was trippled, e.g. without this option, > it converges in 18 iteration, but with this option it goes up to 50-60 > iterations. > (GMRES + BoomerAMG as the preconditioner). > Is this something you would expect? > > 3) How could the linear system resulting from the Poisson equation for > pressure (incompressible flow) can be more diagonally scaled? To elaborate > more, for the uniform grid case and let's say a second order central scheme > finite difference discretization, the sum of the off-diagonal coefficients > are equal to the diagonal coefficient. > > Thanks, > Best, > Mohamad > >
