[petsc-users] difference between solns for np=1 and np>1.
(Rebecca) Xuefei YUAN
xy2102 at columbia.edu
Thu Mar 18 12:50:32 CDT 2010
Dear Jed,
I excluded the bug from CreateNullSpace(), but still have different
convergence history for np=1 and np=2, both with -pc_type none, and
-pc_type jacobi.
The convergence history for np=1, -pc_type none is
0 SNES Function norm 3.277654936380e+02
Linear solve converged due to CONVERGED_RTOL iterations 1
1 SNES Function norm 1.010694930474e+01
Linear solve converged due to CONVERGED_RTOL iterations 9
2 SNES Function norm 1.456202001578e+00
Linear solve converged due to CONVERGED_RTOL iterations 23
3 SNES Function norm 6.670544108392e-02
Linear solve converged due to CONVERGED_RTOL iterations 28
4 SNES Function norm 1.924506428876e-04
Linear solve did not converge due to DIVERGED_ITS iterations 10000
5 SNES Function norm 3.554534723246e-05
Linear solve did not converge due to DIVERGED_ITS iterations 10000
6 SNES Function norm 3.554534511905e-05
Linear solve did not converge due to DIVERGED_ITS iterations 10000
7 SNES Function norm 3.554534511895e-05
Nonlinear solve converged due to CONVERGED_PNORM_RELATIVE
And for np=2, -pc_type none is
0 SNES Function norm 3.277654936380e+02
Linear solve converged due to CONVERGED_RTOL iterations 2
1 SNES Function norm 4.297188468856e+01
Linear solve converged due to CONVERGED_RTOL iterations 11
2 SNES Function norm 3.808424726613e+01
Linear solve converged due to CONVERGED_RTOL iterations 1
3 SNES Function norm 1.970792409144e+01
Linear solve converged due to CONVERGED_RTOL iterations 1
4 SNES Function norm 1.229134159860e+01
Linear solve converged due to CONVERGED_RTOL iterations 4
5 SNES Function norm 9.585300715665e+00
Linear solve converged due to CONVERGED_RTOL iterations 4
6 SNES Function norm 9.289161375266e+00
Linear solve converged due to CONVERGED_RTOL iterations 3
7 SNES Function norm 9.289161375266e+00
Linear solve converged due to CONVERGED_RTOL iterations 3
8 SNES Function norm 9.289161375266e+00
Linear solve converged due to CONVERGED_RTOL iterations 3
9 SNES Function norm 9.289161375267e+00
Linear solve converged due to CONVERGED_RTOL iterations 3
10 SNES Function norm 9.289161375267e+00
Linear solve converged due to CONVERGED_RTOL iterations 3
11 SNES Function norm 9.289161375267e+00
Linear solve converged due to CONVERGED_RTOL iterations 3
12 SNES Function norm 9.289161375267e+00
Linear solve converged due to CONVERGED_RTOL iterations 3
13 SNES Function norm 9.289161375268e+00
Linear solve converged due to CONVERGED_RTOL iterations 3
14 SNES Function norm 9.289161375268e+00
Linear solve converged due to CONVERGED_RTOL iterations 3
15 SNES Function norm 9.289161375268e+00
Linear solve converged due to CONVERGED_RTOL iterations 3
Nonlinear solve did not converge due to DIVERGED_LS_FAILURE
I did take a look at the FAQ, but np=2 gives me quite different
(divergent) results.
Any other possible bugs? Or what would be a better way to debug this
situation?
Thanks very much!
Rebecca
Quoting "(Rebecca) Xuefei YUAN" <xy2102 at columbia.edu>:
> Dear Jed,
>
> Thanks very much!
>
> The -pc_type is none. I get a possible bug in CreateNullSpace(), the
> null vector is not right for np>1.
>
> Let me get back more later.
>
> Thanks!
>
> Rebecca
>
>
>
> Quoting Jed Brown <jed at 59A2.org>:
>
>> On Thu, 18 Mar 2010 11:53:27 -0400, "(Rebecca) Xuefei YUAN"
>> <xy2102 at columbia.edu> wrote:
>>> Dear all,
>>>
>>> I have a piece of code working right for np=1, but when I use np>1(for
>>> example, np=2), the solution is different from the one with np=1.
>>>
>>> I checked the residual function(f_np1_itsi vs f_np2_itsi) and Jacobian
>>> matrix(J_np1_itsi,J_np2_itsi), it turns out that for different initial
>>> guesses,
>>>
>>> f_np1_its0 = f_np2_its0;
>>> J_np1_its0 = J_np2_its0;
>>>
>>> although two Jacobians are the same, they have different nonzero
>>> structures.
>>
>> The format is different.
>>
>>> After 1 nonlinear iterations, the solution is not the same.
>>>
>>> I do not understand that if I have F(u^{m}) and J(u^{m}) the same, how
>>> could I get different \delta u^{m} in np=1 and np=2 situations?
>>
>> How much different? Is it much different with -pc_type jacobi or
>> -pc_type none?
>>
>> http://www.mcs.anl.gov/petsc/petsc-as/documentation/faq.html#differentiterations
>>
>> Jed
>>
>>
>
>
>
> --
> (Rebecca) Xuefei YUAN
> Department of Applied Physics and Applied Mathematics
> Columbia University
> Tel:917-399-8032
> www.columbia.edu/~xy2102
--
(Rebecca) Xuefei YUAN
Department of Applied Physics and Applied Mathematics
Columbia University
Tel:917-399-8032
www.columbia.edu/~xy2102
More information about the petsc-users
mailing list