[petsc-users] large number of iteration.
Josh L
ysjosh.lo at gmail.com
Thu Aug 16 11:20:48 CDT 2018
2018-08-16 10:39 GMT-05:00 Mark Adams <mfadams at lbl.gov>:
Hi Mark,
The problem I am running is simply 2-D linear elasticity, and I use petsc's
ex49 of KSP to do benchmark.
I have solved the error by using MatZeroRowsColumns(diagonal =1.0) to apply
BC instead of MatZeroRows.
(My code is actually using newton's method to solve nonlinear problem(Now,
use it to run a linear elasticity problem), and the rhs entries for
Dirichlet BC is just zero, so either zerorowscolumns or zerorows gives the
same solution).
With GMRES and gamg, the 120K degrees of freedoms linear elasticity problem
converges in 7 iterations.
But with " -ksp_type chebyshev -ksp_chebyshev_esteig_noisy" I still get
NAN residual that comes out of nowhere (it is not diverging. all of a
sudden NAN shows up)
* Is your matrix symmetric?
>
Yes, If I do matzerorowscolumns
>
> * I see you said: "> Then I use CG for KSP and algebraic multigrid for
> precondiitoner. For a 150K dofs problem, the linear solver converges with
> 200s iteration(still too much I think)"
>
> Is this with fracture? A simple cube elasticity test would be the best
> place to start. Can we get back to this?
>
>
>
>> Does '-ksp_type cg -pc_type jacobi' work?
>>>
>>
>> Yes. and the ksp monitor shows the same output if I ran the same
>> problem with petsc's example.
>>
>>>
>>> Does '-ksp_type chebyshev -ksp_chebyshev_esteig_noisy and -pc_type
>>> jacobi' work?
>>>
>>
>> No. I get a NAN residual after 1000s iteration.
>>
>
> Well this is strange. I think that "noisy" must give you a lower eigen
> estimate. If your eigen estimate is too low Cheby is not stable. Does this
> 1000 iterations diverge or does the Nan come out of nowhere?
>
> You can check the eigen estimate with '-ksp_chebyshev_esteig_ksp_view' (I
> think). This will print out solver info including these eigen estimate.
> Set '-ksp_chebyshev_esteig_ksp_max_it 10' to get the solve to complete
> and get the ksp_view printout. You can read this. I have to think that this
> estimate is lower with "noisy".
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180816/cfad7642/attachment.html>
More information about the petsc-users
mailing list