[petsc-users] nonzero prescribed boundary condition
Tian(ICT)
rongtian at ncic.ac.cn
Wed May 11 23:35:18 CDT 2011
Thank you very much for accurate hints.
There was a mistake in computing functions, which led to wrong jacobian.
Now both function and jacobian were verfied against the other code and
they are corrent now.
Two tests were attached below:
[1]
Without any option, SNES converges never calling FormJacobian,
and the solution seems correct.
What is the reason for that the SNES solver never calls FormJacobian (mf
option was not used)?
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | STEP 0 (Newton iterations: 3)
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | Form Function ...
12:16:37 | info | STEP 1 (Newton iterations: 3)
********************************************
********************************************
********************************************
[2] Run with -pc_type none -ksp_monitor_true_residual -snes_monitor -snes_mf
********************************************
********************************************
********************************************
again, FormJacobian was never be called, the outputs are as follow.
both cases, SNES seems much slower than a hand-coded solver using the
arc-length search.
Any further hint?
atol=1e-050, rtol=1e-008, stol=1e-008, maxit=50, maxf=10000
0 SNES Function norm 7.071067811865e+001
0 KSP preconditioned resid norm 7.071067811865e+001 true resid norm
7.071067811865e+001 ||Ae||/||Ax|| 1.000000000000e+000
1 KSP preconditioned resid norm 6.198922749247e+001 true resid norm
6.198922749247e+001 ||Ae||/||Ax|| 8.766600624088e-001
2 KSP preconditioned resid norm 5.528279492085e+001 true resid norm
5.528279475119e+001 ||Ae||/||Ax|| 7.818167810303e-001
3 KSP preconditioned resid norm 5.297780256406e+001 true resid norm
5.297780279950e+001 ||Ae||/||Ax|| 7.492192722378e-001
4 KSP preconditioned resid norm 5.114021551683e+001 true resid norm
5.114021331426e+001 ||Ae||/||Ax|| 7.232318325168e-001
5 KSP preconditioned resid norm 5.083804009339e+001 true resid norm
5.083804105448e+001 ||Ae||/||Ax|| 7.189584714373e-001
6 KSP preconditioned resid norm 5.046749215177e+001 true resid norm
5.046749115857e+001 ||Ae||/||Ax|| 7.137181045540e-001
7 KSP preconditioned resid norm 5.017876322892e+001 true resid norm
5.017876245111e+001 ||Ae||/||Ax|| 7.096348640145e-001
8 KSP preconditioned resid norm 5.014607662584e+001 true resid norm
5.014607460521e+001 ||Ae||/||Ax|| 7.091725880646e-001
9 KSP preconditioned resid norm 5.013735265505e+001 true resid norm
5.013735450946e+001 ||Ae||/||Ax|| 7.090492672879e-001
10 KSP preconditioned resid norm 5.013129184370e+001 true resid norm
5.013129107602e+001 ||Ae||/||Ax|| 7.089635173898e-001
11 KSP preconditioned resid norm 5.010794870348e+001 true resid norm
5.010794800982e+001 ||Ae||/||Ax|| 7.086333965817e-001
12 KSP preconditioned resid norm 4.997965989272e+001 true resid norm
4.997967683972e+001 ||Ae||/||Ax|| 7.068193682975e-001
13 KSP preconditioned resid norm 3.925485685703e+001 true resid norm
3.925223649295e+001 ||Ae||/||Ax|| 5.551104520181e-001
14 KSP preconditioned resid norm 3.766533768027e+001 true resid norm
3.766438346984e+001 ||Ae||/||Ax|| 5.326548192147e-001
15 KSP preconditioned resid norm 1.679441681862e+001 true resid norm
1.679359300016e+001 ||Ae||/||Ax|| 2.374972698180e-001
16 KSP preconditioned resid norm 1.250214314546e-009 true resid norm
3.622974465129e-001 ||Ae||/||Ax|| 5.123659624716e-003
1 SNES Function norm 5.010346201281e+000
0 KSP preconditioned resid norm 5.010346201281e+000 true resid norm
5.010346201281e+000 ||Ae||/||Ax|| 1.000000000000e+000
1 KSP preconditioned resid norm 3.125067154800e+000 true resid norm
3.125067154800e+000 ||Ae||/||Ax|| 6.237227986364e-001
2 KSP preconditioned resid norm 1.790676902005e+000 true resid norm
1.790676998514e+000 ||Ae||/||Ax|| 3.573958617982e-001
3 KSP preconditioned resid norm 9.791340982396e-001 true resid norm
9.791340674390e-001 ||Ae||/||Ax|| 1.954224375131e-001
4 KSP preconditioned resid norm 4.169136961659e-001 true resid norm
4.169135681315e-001 ||Ae||/||Ax|| 8.321053104573e-002
5 KSP preconditioned resid norm 1.952800046013e-001 true resid norm
1.952800146848e-001 ||Ae||/||Ax|| 3.897535356635e-002
6 KSP preconditioned resid norm 1.371162184665e-001 true resid norm
1.371160776663e-001 ||Ae||/||Ax|| 2.736658748875e-002
7 KSP preconditioned resid norm 4.752749582423e-002 true resid norm
4.752714319348e-002 ||Ae||/||Ax|| 9.485800238980e-003
8 KSP preconditioned resid norm 3.679436716634e-002 true resid norm
3.679416671320e-002 ||Ae||/||Ax|| 7.343637592108e-003
9 KSP preconditioned resid norm 3.174486861332e-002 true resid norm
3.174525181575e-002 ||Ae||/||Ax|| 6.335939781494e-003
10 KSP preconditioned resid norm 2.860943594055e-002 true resid norm
2.860914164631e-002 ||Ae||/||Ax|| 5.710012940622e-003
11 KSP preconditioned resid norm 2.502632777351e-002 true resid norm
2.502627096448e-002 ||Ae||/||Ax|| 4.994918506446e-003
12 KSP preconditioned resid norm 2.479081072702e-002 true resid norm
2.479081050011e-002 ||Ae||/||Ax|| 4.947923657207e-003
13 KSP preconditioned resid norm 2.453552472271e-002 true resid norm
2.453550748659e-002 ||Ae||/||Ax|| 4.896968492978e-003
14 KSP preconditioned resid norm 2.450340222151e-002 true resid norm
2.450340723637e-002 ||Ae||/||Ax|| 4.890561700129e-003
15 KSP preconditioned resid norm 2.446841894425e-002 true resid norm
2.446842016638e-002 ||Ae||/||Ax|| 4.883578735563e-003
16 KSP preconditioned resid norm 1.185777680895e-012 true resid norm
7.269638622157e-004 ||Ae||/||Ax|| 1.450925411162e-004
2 SNES Function norm 1.285031516032e-004
0 KSP preconditioned resid norm 1.285031516032e-004 true resid norm
1.285031516032e-004 ||Ae||/||Ax|| 1.000000000000e+000
1 KSP preconditioned resid norm 7.358333039693e-005 true resid norm
7.358333039693e-005 ||Ae||/||Ax|| 5.726188772719e-001
2 KSP preconditioned resid norm 2.793571629313e-005 true resid norm
2.793571561993e-005 ||Ae||/||Ax|| 2.173932333285e-001
3 KSP preconditioned resid norm 1.098998624012e-005 true resid norm
1.098998762581e-005 ||Ae||/||Ax|| 8.552309798399e-002
4 KSP preconditioned resid norm 6.860729498044e-006 true resid norm
6.860733291260e-006 ||Ae||/||Ax|| 5.338961111588e-002
5 KSP preconditioned resid norm 3.936073017539e-006 true resid norm
3.936066932777e-006 ||Ae||/||Ax|| 3.063011983496e-002
6 KSP preconditioned resid norm 3.270321923106e-006 true resid norm
3.270323858459e-006 ||Ae||/||Ax|| 2.544936694282e-002
7 KSP preconditioned resid norm 2.872966498200e-006 true resid norm
2.872962085195e-006 ||Ae||/||Ax|| 2.235713326367e-002
8 KSP preconditioned resid norm 2.685995411641e-006 true resid norm
2.686000372103e-006 ||Ae||/||Ax|| 2.090221398146e-002
9 KSP preconditioned resid norm 2.163968160949e-006 true resid norm
2.163969192640e-006 ||Ae||/||Ax|| 1.683981416520e-002
10 KSP preconditioned resid norm 1.623010286027e-006 true resid norm
1.623006420289e-006 ||Ae||/||Ax|| 1.263009039109e-002
11 KSP preconditioned resid norm 1.296917697338e-006 true resid norm
1.296928077393e-006 ||Ae||/||Ax|| 1.009257797348e-002
12 KSP preconditioned resid norm 9.434402087990e-007 true resid norm
9.434436935582e-007 ||Ae||/||Ax|| 7.341794203393e-003
13 KSP preconditioned resid norm 3.488471072668e-007 true resid norm
3.488451352886e-007 ||Ae||/||Ax|| 2.714681554004e-003
14 KSP preconditioned resid norm 2.692414749742e-007 true resid norm
2.692386518112e-007 ||Ae||/||Ax|| 2.095191039692e-003
15 KSP preconditioned resid norm 3.070780908139e-008 true resid norm
3.070820208411e-008 ||Ae||/||Ax|| 2.389684743214e-004
16 KSP preconditioned resid norm 7.108045702394e-019 true resid norm
1.174370495958e-009 ||Ae||/||Ax|| 9.138845867256e-006
3 SNES Function norm 4.267299670732e-007
STEP 0 (Newton iterations: 3)
0 SNES Function norm 7.071067801331e+001
0 KSP preconditioned resid norm 7.071067801331e+001 true resid norm
7.071067801331e+001 ||Ae||/||Ax|| 1.000000000000e+000
1 KSP preconditioned resid norm 6.198533980359e+001 true resid norm
6.198533980359e+001 ||Ae||/||Ax|| 8.766050834913e-001
2 KSP preconditioned resid norm 5.527994274677e+001 true resid norm
5.527994343828e+001 ||Ae||/||Ax|| 7.817764585410e-001
3 KSP preconditioned resid norm 5.297611644586e+001 true resid norm
5.297611706439e+001 ||Ae||/||Ax|| 7.491954334594e-001
4 KSP preconditioned resid norm 5.113922798981e+001 true resid norm
5.113922857252e+001 ||Ae||/||Ax|| 7.232179072430e-001
5 KSP preconditioned resid norm 5.083735189265e+001 true resid norm
5.083735192008e+001 ||Ae||/||Ax|| 7.189487266762e-001
6 KSP preconditioned resid norm 5.046773176595e+001 true resid norm
5.046773017799e+001 ||Ae||/||Ax|| 7.137214858622e-001
7 KSP preconditioned resid norm 5.017895995906e+001 true resid norm
5.017896133115e+001 ||Ae||/||Ax|| 7.096376776602e-001
8 KSP preconditioned resid norm 5.014624418384e+001 true resid norm
5.014624362257e+001 ||Ae||/||Ax|| 7.091749793875e-001
9 KSP preconditioned resid norm 5.013751425980e+001 true resid norm
5.013751438456e+001 ||Ae||/||Ax|| 7.090515293195e-001
10 KSP preconditioned resid norm 5.013145929324e+001 true resid norm
5.013145910954e+001 ||Ae||/||Ax|| 7.089658947988e-001
11 KSP preconditioned resid norm 5.010818111716e+001 true resid norm
5.010818054884e+001 ||Ae||/||Ax|| 7.086366862358e-001
12 KSP preconditioned resid norm 4.998040225128e+001 true resid norm
4.998039927752e+001 ||Ae||/||Ax|| 7.068295861639e-001
13 KSP preconditioned resid norm 3.925980557222e+001 true resid norm
3.926954729376e+001 ||Ae||/||Ax|| 5.553552645382e-001
14 KSP preconditioned resid norm 3.767160996011e+001 true resid norm
3.766320856308e+001 ||Ae||/||Ax|| 5.326382043175e-001
15 KSP preconditioned resid norm 1.689041692217e+001 true resid norm
1.690596162049e+001 ||Ae||/||Ax|| 2.390864024428e-001
16 KSP preconditioned resid norm 7.494696199747e-010 true resid norm
7.321692289701e-001 ||Ae||/||Ax|| 1.035443655104e-002
1 SNES Function norm 5.065297893048e+000
0 KSP preconditioned resid norm 5.065297893048e+000 true resid norm
5.065297893048e+000 ||Ae||/||Ax|| 1.000000000000e+000
1 KSP preconditioned resid norm 3.152895394153e+000 true resid norm
3.152895394153e+000 ||Ae||/||Ax|| 6.224501422672e-001
2 KSP preconditioned resid norm 1.802574999082e+000 true resid norm
1.802575011564e+000 ||Ae||/||Ax|| 3.558675224291e-001
3 KSP preconditioned resid norm 9.797025431577e-001 true resid norm
9.797029717256e-001 ||Ae||/||Ax|| 1.934146801258e-001
4 KSP preconditioned resid norm 4.175614713454e-001 true resid norm
4.175593934986e-001 ||Ae||/||Ax|| 8.243530831064e-002
5 KSP preconditioned resid norm 1.966470605735e-001 true resid norm
1.966475028867e-001 ||Ae||/||Ax|| 3.882249515011e-002
6 KSP preconditioned resid norm 1.381279214633e-001 true resid norm
1.381273768772e-001 ||Ae||/||Ax|| 2.726934916638e-002
7 KSP preconditioned resid norm 4.766343518370e-002 true resid norm
4.766398522151e-002 ||Ae||/||Ax|| 9.409907616080e-003
8 KSP preconditioned resid norm 3.681767230431e-002 true resid norm
3.681839498297e-002 ||Ae||/||Ax|| 7.268752156414e-003
9 KSP preconditioned resid norm 3.154913051307e-002 true resid norm
3.154870156685e-002 ||Ae||/||Ax|| 6.228400033520e-003
10 KSP preconditioned resid norm 2.863814386382e-002 true resid norm
2.863836535365e-002 ||Ae||/||Ax|| 5.653836350465e-003
11 KSP preconditioned resid norm 2.516240323861e-002 true resid norm
2.516228989658e-002 ||Ae||/||Ax|| 4.967583432973e-003
12 KSP preconditioned resid norm 2.499694019590e-002 true resid norm
2.499694632312e-002 ||Ae||/||Ax|| 4.934941014512e-003
13 KSP preconditioned resid norm 2.474701691610e-002 true resid norm
2.474699653509e-002 ||Ae||/||Ax|| 4.885595488679e-003
14 KSP preconditioned resid norm 2.470500041453e-002 true resid norm
2.470500324132e-002 ||Ae||/||Ax|| 4.877305098922e-003
15 KSP preconditioned resid norm 2.466252351205e-002 true resid norm
2.466252750272e-002 ||Ae||/||Ax|| 4.868919464059e-003
16 KSP preconditioned resid norm 7.240664411016e-013 true resid norm
8.621971002033e-004 ||Ae||/||Ax|| 1.702164647388e-004
2 SNES Function norm 1.715637353858e-004
0 KSP preconditioned resid norm 1.715637353858e-004 true resid norm
1.715637353858e-004 ||Ae||/||Ax|| 1.000000000000e+000
1 KSP preconditioned resid norm 5.133805201182e-005 true resid norm
5.133805201182e-005 ||Ae||/||Ax|| 2.992360354965e-001
2 KSP preconditioned resid norm 3.105488497537e-005 true resid norm
3.105488438607e-005 ||Ae||/||Ax|| 1.810107731464e-001
3 KSP preconditioned resid norm 1.395061713608e-005 true resid norm
1.395061820355e-005 ||Ae||/||Ax|| 8.131449325334e-002
4 KSP preconditioned resid norm 7.751134073702e-006 true resid norm
7.751135728902e-006 ||Ae||/||Ax|| 4.517933648082e-002
5 KSP preconditioned resid norm 4.654853308327e-006 true resid norm
4.654854773883e-006 ||Ae||/||Ax|| 2.713192717223e-002
6 KSP preconditioned resid norm 4.251658354500e-006 true resid norm
4.251660009778e-006 ||Ae||/||Ax|| 2.478181067938e-002
7 KSP preconditioned resid norm 3.555184986154e-006 true resid norm
3.555185020946e-006 ||Ae||/||Ax|| 2.072224070519e-002
8 KSP preconditioned resid norm 3.215587707994e-006 true resid norm
3.215587246709e-006 ||Ae||/||Ax|| 1.874281438020e-002
9 KSP preconditioned resid norm 2.634842773217e-006 true resid norm
2.634843527693e-006 ||Ae||/||Ax|| 1.535781161309e-002
10 KSP preconditioned resid norm 2.036964505740e-006 true resid norm
2.036965395860e-006 ||Ae||/||Ax|| 1.187293684927e-002
11 KSP preconditioned resid norm 1.746186350035e-006 true resid norm
1.746185026306e-006 ||Ae||/||Ax|| 1.017805436784e-002
12 KSP preconditioned resid norm 1.302769828754e-006 true resid norm
1.302771152061e-006 ||Ae||/||Ax|| 7.593511234361e-003
13 KSP preconditioned resid norm 7.177208286434e-007 true resid norm
7.177260379251e-007 ||Ae||/||Ax|| 4.183436763667e-003
14 KSP preconditioned resid norm 5.550901925209e-007 true resid norm
5.550891982416e-007 ||Ae||/||Ax|| 3.235469296547e-003
15 KSP preconditioned resid norm 3.391040385332e-008 true resid norm
3.391065128579e-008 ||Ae||/||Ax|| 1.976562891309e-004
16 KSP preconditioned resid norm 3.363862755900e-018 true resid norm
9.196863532382e-010 ||Ae||/||Ax|| 5.360610452844e-006
3 SNES Function norm 2.731179168679e-007
STEP 1 (Newton iterations: 3)
----Rong
----- Original Message -----
From: "Barry Smith" <bsmith at mcs.anl.gov>
To: "PETSc users list" <petsc-users at mcs.anl.gov>
Sent: Thursday, May 12, 2011 12:15 AM
Subject: Re: [petsc-users] nonzero prescribed boundary condition
Ok,
Run with -pc_type none -ksp_monitor_true_residual -snes_monitor -snes_mf
Send the output
Barry
On May 11, 2011, at 8:44 AM, Tian(ICT) wrote:
> C:\cygwin\home\rabbit\pGFEM-test>pgfem -pc_type
> lu -ksp_monitor_true_residual -s
> nes_monitor
> atol=1e-050, rtol=1e-008, stol=1e-008, maxit=50, maxf=10000
> 0 SNES Function norm 7.071067811865e-002
> 0 KSP preconditioned resid norm 9.965778978387e-002 true resid norm
> 7.07106781
> 1865e-002 ||Ae||/||Ax|| 1.000000000000e+000
> 1 KSP preconditioned resid norm 6.823187455811e-017 true resid norm
> 8.84729888
> 5656e-011 ||Ae||/||Ax|| 1.251197007446e-009
> 1 SNES Function norm 6.401926523423e-002
> 0 KSP preconditioned resid norm 8.969200212486e-002 true resid norm
> 6.40192652
> 3423e-002 ||Ae||/||Ax|| 1.000000000000e+000
> 1 KSP preconditioned resid norm 1.106757475780e-016 true resid norm
> 6.21183006
> 7439e-011 ||Ae||/||Ax|| 9.703063671087e-010
> 2 SNES Function norm 5.849992149767e-002
> 0 KSP preconditioned resid norm 8.072279488157e-002 true resid norm
> 5.84999214
> 9767e-002 ||Ae||/||Ax|| 1.000000000000e+000
> 1 KSP preconditioned resid norm 1.268750073799e-017 true resid norm
> 3.80243103
> 6387e-011 ||Ae||/||Ax|| 6.499890835816e-010
> 3 SNES Function norm 5.376618503592e-002
> 0 KSP preconditioned resid norm 7.265050969883e-002 true resid norm
> 5.37661850
> 3592e-002 ||Ae||/||Ax|| 1.000000000000e+000
> 1 KSP preconditioned resid norm 2.677655733356e-017 true resid norm
> 8.12039778
> 8686e-011 ||Ae||/||Ax|| 1.510316899602e-009
> 4 SNES Function norm 4.956894354459e-002
> 0 KSP preconditioned resid norm 6.538545411661e-002 true resid norm
> 4.95689435
> 4459e-002 ||Ae||/||Ax|| 1.000000000000e+000
> 1 KSP preconditioned resid norm 9.557004153175e-017 true resid norm
> 2.94425080
> 2029e-011 ||Ae||/||Ax|| 5.939708598754e-010
> 5 SNES Function norm 4.575418613137e-002
> 0 KSP preconditioned resid norm 5.884690496914e-002 true resid norm
> 4.57541861
> 3137e-002 ||Ae||/||Ax|| 1.000000000000e+000
> 1 KSP preconditioned resid norm 5.470969262115e-017 true resid norm
> 3.65900316
> 6095e-011 ||Ae||/||Ax|| 7.997089393284e-010
> 6 SNES Function norm 4.223022245585e-002
> 0 KSP preconditioned resid norm 5.296221144636e-002 true resid norm
> 4.22302224
> 5585e-002 ||Ae||/||Ax|| 1.000000000000e+000
> 1 KSP preconditioned resid norm 8.255198782390e-017 true resid norm
> 1.95554565
> 8933e-011 ||Ae||/||Ax|| 4.630678090739e-010
> 7 SNES Function norm 3.894430065910e-002
> 0 KSP preconditioned resid norm 4.766598785088e-002 true resid norm
> 3.89443006
> 5910e-002 ||Ae||/||Ax|| 1.000000000000e+000
> 1 KSP preconditioned resid norm 3.322615478395e-017 true resid norm
> 3.48532814
> 8673e-011 ||Ae||/||Ax|| 8.949520442496e-010
> 8 SNES Function norm 3.586683371135e-002
> 0 KSP preconditioned resid norm 4.289938708067e-002 true resid norm
> 3.58668337
> 1135e-002 ||Ae||/||Ax|| 1.000000000000e+000
> 1 KSP preconditioned resid norm 6.181358328498e-017 true resid norm
> 3.24690281
> 8086e-011 ||Ae||/||Ax|| 9.052660862724e-010
> 9 SNES Function norm 3.298130202025e-002
> 0 KSP preconditioned resid norm 3.860944676473e-002 true resid norm
> 3.29813020
> 2025e-002 ||Ae||/||Ax|| 1.000000000000e+000
> 1 KSP preconditioned resid norm 4.635174776374e-017 true resid norm
> 1.49751684
> 2272e-011 ||Ae||/||Ax|| 4.540502498513e-010
> 10 SNES Function norm 3.027806208930e-002
> 0 KSP preconditioned resid norm 3.474850078591e-002 true resid norm
> 3.02780620
> 8930e-002 ||Ae||/||Ax|| 1.000000000000e+000
> 1 KSP preconditioned resid norm 2.389914053685e-017 true resid norm
> 6.00744088
> 8596e-011 ||Ae||/||Ax|| 1.984090286517e-009
> 11 SNES Function norm 2.749422924729e-002
> 0 KSP preconditioned resid norm 3.081350823297e-002 true resid norm
> 2.74942292
> 4729e-002 ||Ae||/||Ax|| 1.000000000000e+000
> 1 KSP preconditioned resid norm 2.640567497647e-017 true resid norm
> 1.28163829
> 5853e-011 ||Ae||/||Ax|| 4.661481085089e-010
> 12 SNES Function norm 2.437488247885e-002
> 0 KSP preconditioned resid norm 2.633007441879e-002 true resid norm
> 2.43748824
> 7885e-002 ||Ae||/||Ax|| 1.000000000000e+000
> 1 KSP preconditioned resid norm 2.772331460094e-017 true resid norm
> 1.91821249
> 6143e-011 ||Ae||/||Ax|| 7.869627670236e-010
> 13 SNES Function norm 2.079664278637e-002
> 0 KSP preconditioned resid norm 2.104738289397e-002 true resid norm
> 2.07966427
> 8637e-002 ||Ae||/||Ax|| 1.000000000000e+000
> 1 KSP preconditioned resid norm 1.650632708670e-017 true resid norm
> 2.31637196
> 7362e-011 ||Ae||/||Ax|| 1.113820144509e-009
> 14 SNES Function norm 1.657344626858e-002
> 0 KSP preconditioned resid norm 1.454141853505e-002 true resid norm
> 1.65734462
> 6858e-002 ||Ae||/||Ax|| 1.000000000000e+000
> 1 KSP preconditioned resid norm 1.129401160070e-017 true resid norm
> 7.88549932
> 7559e-012 ||Ae||/||Ax|| 4.757911661686e-010
> 15 SNES Function norm 1.484243752612e-002
> 0 KSP preconditioned resid norm 5.241948491751e-009 true resid norm
> 1.48424375
> 2612e-002 ||Ae||/||Ax|| 1.000000000000e+000
> 1 KSP preconditioned resid norm 2.729506849025e-024 true resid norm
> 6.38667785
> 1085e-018 ||Ae||/||Ax|| 4.302984492839e-016
> 16 SNES Function norm 2.828002157497e-008
> 0 KSP preconditioned resid norm 6.042518362322e-015 true resid norm
> 2.82800215
> 7497e-008 ||Ae||/||Ax|| 1.000000000000e+000
> 1 KSP preconditioned resid norm 6.272441346127e-030 true resid norm
> 1.11285769
> 8032e-023 ||Ae||/||Ax|| 3.935137372797e-016
> 17 SNES Function norm 2.960967020289e-008
> STEP 0 (Newton iterations: 17)
>
> diverged reason: -6
>
> C:\cygwin\home\rabbit\pGFEM-test>
>
>
> ==================HOWEVER=================
> -snes_type tr seems work
>
> C:\cygwin\home\rabbit\pGFEM-test>pgfem -snes_type tr
> atol=1e-050, rtol=1e-008, stol=1e-008, maxit=50, maxf=10000
> STEP 0 (Newton iterations: 12)
>
> STEP 1 (Newton iterations: 11)
>
> STEP 2 (Newton iterations: 11)
> ...
>
> STEP 70 (Newton iterations: 14)
>
> ^C
> C:\cygwin\home\rabbit\pGFEM-test>
>
> ----- Original Message ----- From: "Barry Smith" <bsmith at mcs.anl.gov>
> To: "PETSc users list" <petsc-users at mcs.anl.gov>
> Sent: Wednesday, May 11, 2011 9:02 PM
> Subject: Re: [petsc-users] nonzero prescribed boundary condition
>
>
>
>>> Testing hand-coded Jacobian, if the ratio is
>>> O(1.e-8), the hand-coded Jacobian is probably correct.
>>> Run with -snes_test_display to show difference
>>> of hand-coded and finite difference Jacobian.
>>> Norm of matrix ratio 9.05702e-008 difference 3.94971
>>> Norm of matrix ratio 3.6015e-007 difference 15.7059
>>> Norm of matrix ratio 3.73941e-007 difference 16.3073
>
> Based on this it appears the Jacobian at the initial point is correct but
>
> 0 KSP preconditioned resid norm 9.965778978387e-002 true resid norm
> 7.071067811865e-002 ||Ae||/||Ax|| 1.000000000000e+000
> 1 KSP preconditioned resid norm 9.102368266281e-009 true resid norm
> 5.414197277222e-002 ||Ae||/||Ax|| 7.656831218811e-001
>
> this indicates that the linear solver is not actually solving the linear
> system. One would expect a large drop in the "true resid norm" and one
> does not see that. This could be caused by
>
> 1) the computed Jacobian is wrong or
>
> 2) the Jacobian is singular and that is not being taken into account in
> the linear solver.
>
> Please rerun with the options -pc_type
> lu -ksp_monitor_true_residual -snes_monitor BUT NOT THE
> OPTION -snes_mf_operator and send the same output.
>
> Barry
>
>
> On May 11, 2011, at 1:46 AM, Tian(ICT) wrote:
>
>> Pls ignore my previous email.
>>
>> The followings are the test results:
>> the previous error in using -snes_mf_opertor was due to my own code.
>> After modification, i.e. using different A and B and assemble both
>> and in FormJacobian the native jacobian was assembled into B.
>> Then with -snes_mf_operator led to the results shown below.
>> The first three steps converged but with a diverged reason -6 at step 4.
>>
>>
>> With additional -snes_type test, the results were
>>
>>> "-pc_type
>>> lu -ksp_monitor_true_residual -snes_monitor -ksp_monitor -snes_type
>>> test"
>>>
>>> atol=1e-050, rtol=1e-008, stol=1e-008, maxit=50, maxf=10000
>>> Testing hand-coded Jacobian, if the ratio is
>>> O(1.e-8), the hand-coded Jacobian is probably correct.
>>> Run with -snes_test_display to show difference
>>> of hand-coded and finite difference Jacobian.
>>> Norm of matrix ratio 9.05702e-008 difference 3.94971
>>> Norm of matrix ratio 3.6015e-007 difference 15.7059
>>> Norm of matrix ratio 3.73941e-007 difference 16.3073
>>> [0]PETSC ERROR: SNESSolve() line 1871 in
>>> src/snes/interface/C:\cygwin\home\PETSC-~1.3-P\src\snes\INTERF~1\snes.c
>>> [0]PETSC ERROR: User provided function() line 572 in
>>> unknowndirectory/c:\cygwin\home\rabbit\pgfem - csrbf\domain.cpp
>>> [0]PETSC ERROR: User provided function() line 40 in
>>> unknowndirectory/c:\cygwin\home\rabbit\pgfem - csrbf\main.cpp
>>>
>>>
>>> "-pc_type
>>> lu -ksp_monitor_true_residual -snes_monitor -ksp_monitor -snes_ms_operator"
>>
>> atol=1e-050, rtol=1e-008, stol=1e-008, maxit=50, maxf=10000
>> 0 SNES Function norm 7.071067811865e-002
>> 0 KSP Residual norm 9.965778978387e-002
>> 0 KSP preconditioned resid norm 9.965778978387e-002 true resid norm
>> 7.071067811865e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 9.102368266281e-009
>> 1 KSP preconditioned resid norm 9.102368266281e-009 true resid norm
>> 5.414197277222e-002 ||Ae||/||Ax|| 7.656831218811e-001
>> 1 SNES Function norm 6.401926196865e-002
>> 0 KSP Residual norm 8.969200166800e-002
>> 0 KSP preconditioned resid norm 8.969200166800e-002 true resid norm
>> 6.401926196865e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 8.492849351675e-009
>> 1 KSP preconditioned resid norm 8.492849351675e-009 true resid norm
>> 1.400035213572e-002 ||Ae||/||Ax|| 2.186896834670e-001
>> 2 SNES Function norm 5.849991037388e-002
>> 0 KSP Residual norm 8.072279482667e-002
>> 0 KSP preconditioned resid norm 8.072279482667e-002 true resid norm
>> 5.849991037388e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 3.610510067555e-009
>> 1 KSP preconditioned resid norm 3.610510067555e-009 true resid norm
>> 4.757549946973e-003 ||Ae||/||Ax|| 8.132576471599e-002
>> 3 SNES Function norm 5.376617142827e-002
>> 0 KSP Residual norm 7.265050986128e-002
>> 0 KSP preconditioned resid norm 7.265050986128e-002 true resid norm
>> 5.376617142827e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 6.941165647221e-009
>> 1 KSP preconditioned resid norm 6.941165647221e-009 true resid norm
>> 3.935270526562e-002 ||Ae||/||Ax|| 7.319231446138e-001
>> 4 SNES Function norm 4.956888929193e-002
>> 0 KSP Residual norm 6.538545408372e-002
>> 0 KSP preconditioned resid norm 6.538545408372e-002 true resid norm
>> 4.956888929193e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 3.457970649220e-009
>> 1 KSP preconditioned resid norm 3.457970649220e-009 true resid norm
>> 2.037700110050e-002 ||Ae||/||Ax|| 4.110844804388e-001
>> 5 SNES Function norm 4.575415001780e-002
>> 0 KSP Residual norm 5.884690527647e-002
>> 0 KSP preconditioned resid norm 5.884690527647e-002 true resid norm
>> 4.575415001780e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 2.832662187541e-009
>> 1 KSP preconditioned resid norm 2.832662187541e-009 true resid norm
>> 1.662420124938e-002 ||Ae||/||Ax|| 3.633375604818e-001
>> 6 SNES Function norm 4.223018337199e-002
>> 0 KSP Residual norm 5.296221162333e-002
>> 0 KSP preconditioned resid norm 5.296221162333e-002 true resid norm
>> 4.223018337199e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 3.091667005099e-009
>> 1 KSP preconditioned resid norm 3.091667005099e-009 true resid norm
>> 2.235399010718e-002 ||Ae||/||Ax|| 5.293367994705e-001
>> 7 SNES Function norm 3.894426990170e-002
>> 0 KSP Residual norm 4.766598828506e-002
>> 0 KSP preconditioned resid norm 4.766598828506e-002 true resid norm
>> 3.894426990170e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 4.223811830585e-009
>> 1 KSP preconditioned resid norm 4.223811830585e-009 true resid norm
>> 2.831156780040e-002 ||Ae||/||Ax|| 7.269764684732e-001
>> 8 SNES Function norm 3.586679674893e-002
>> 0 KSP Residual norm 4.289938722959e-002
>> 0 KSP preconditioned resid norm 4.289938722959e-002 true resid norm
>> 3.586679674893e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 3.504535460429e-009
>> 1 KSP preconditioned resid norm 3.504535460429e-009 true resid norm
>> 2.254598873838e-002 ||Ae||/||Ax|| 6.286033541328e-001
>> 9 SNES Function norm 3.298126871313e-002
>> 0 KSP Residual norm 3.860944657267e-002
>> 0 KSP preconditioned resid norm 3.860944657267e-002 true resid norm
>> 3.298126871313e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 4.439084585574e-009
>> 1 KSP preconditioned resid norm 4.439084585574e-009 true resid norm
>> 6.936792391193e-003 ||Ae||/||Ax|| 2.103252137305e-001
>> 10 SNES Function norm 3.027806037514e-002
>> 0 KSP Residual norm 3.474850031738e-002
>> 0 KSP preconditioned resid norm 3.474850031738e-002 true resid norm
>> 3.027806037514e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 3.476854671229e-009
>> 1 KSP preconditioned resid norm 3.476854671229e-009 true resid norm
>> 1.935717696630e-002 ||Ae||/||Ax|| 6.393136391984e-001
>> 11 SNES Function norm 2.775064646763e-002
>> 0 KSP Residual norm 3.127364888698e-002
>> 0 KSP preconditioned resid norm 3.127364888698e-002 true resid norm
>> 2.775064646763e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 2.380857715198e-009
>> 1 KSP preconditioned resid norm 2.380857715198e-009 true resid norm
>> 1.646856223644e-002 ||Ae||/||Ax|| 5.934478771746e-001
>> 12 SNES Function norm 2.430399371900e-002
>> 0 KSP Residual norm 2.602654480862e-002
>> 0 KSP preconditioned resid norm 2.602654480862e-002 true resid norm
>> 2.430399371900e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 2.556142726483e-009
>> 1 KSP preconditioned resid norm 2.556142726483e-009 true resid norm
>> 1.794651743617e-002 ||Ae||/||Ax|| 7.384184526900e-001
>> 13 SNES Function norm 2.029256664631e-002
>> 0 KSP Residual norm 1.954645630691e-002
>> 0 KSP preconditioned resid norm 1.954645630691e-002 true resid norm
>> 2.029256664631e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 3.913585412092e-010
>> 1 KSP preconditioned resid norm 3.913585412092e-010 true resid norm
>> 1.903675728342e-003 ||Ae||/||Ax|| 9.381148089946e-002
>> 14 SNES Function norm 1.566638821565e-002
>> 0 KSP Residual norm 1.231404128086e-002
>> 0 KSP preconditioned resid norm 1.231404128086e-002 true resid norm
>> 1.566638821565e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 7.258598971379e-010
>> 1 KSP preconditioned resid norm 7.258598971379e-010 true resid norm
>> 1.221317129610e-003 ||Ae||/||Ax|| 7.795779810881e-002
>> 15 SNES Function norm 1.064422587384e-002
>> 0 KSP Residual norm 3.723145759360e-009
>> 0 KSP preconditioned resid norm 3.723145759360e-009 true resid norm
>> 1.064422587384e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 5.546825086207e-016
>> 1 KSP preconditioned resid norm 5.546825086207e-016 true resid norm
>> 2.984647735625e-009 ||Ae||/||Ax|| 2.804006389003e-007
>> 16 SNES Function norm 9.689226075617e-008
>> 0 KSP Residual norm 1.643080767133e-014
>> 0 KSP preconditioned resid norm 1.643080767133e-014 true resid norm
>> 9.689226075617e-008 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 7.291965935374e-022
>> 1 KSP preconditioned resid norm 7.291965935374e-022 true resid norm
>> 5.001850432973e-015 ||Ae||/||Ax|| 5.162280654758e-008
>> 17 SNES Function norm 3.747290584108e-008
>> STEP 0 (Newton iterations: 17)
>>
>> 0 SNES Function norm 7.071067811866e-002
>> 0 KSP Residual norm 9.965769844003e-002
>> 0 KSP preconditioned resid norm 9.965769844003e-002 true resid norm
>> 7.071067811866e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 4.919247724727e-009
>> 1 KSP preconditioned resid norm 4.919247724727e-009 true resid norm
>> 2.073848008334e-002 ||Ae||/||Ax|| 2.932863979685e-001
>> 1 SNES Function norm 6.402041310994e-002
>> 0 KSP Residual norm 8.969192038029e-002
>> 0 KSP preconditioned resid norm 8.969192038029e-002 true resid norm
>> 6.402041310994e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 4.072962844649e-009
>> 1 KSP preconditioned resid norm 4.072962844649e-009 true resid norm
>> 2.116458841832e-002 ||Ae||/||Ax|| 3.305912503559e-001
>> 2 SNES Function norm 5.850358277995e-002
>> 0 KSP Residual norm 8.072272129834e-002
>> 0 KSP preconditioned resid norm 8.072272129834e-002 true resid norm
>> 5.850358277995e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 1.535693836801e-009
>> 1 KSP preconditioned resid norm 1.535693836801e-009 true resid norm
>> 1.378413836547e-002 ||Ae||/||Ax|| 2.356118670085e-001
>> 3 SNES Function norm 5.377276379928e-002
>> 0 KSP Residual norm 7.265044334812e-002
>> 0 KSP preconditioned resid norm 7.265044334812e-002 true resid norm
>> 5.377276379928e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 8.196914267894e-009
>> 1 KSP preconditioned resid norm 8.196914267894e-009 true resid norm
>> 1.643681592299e-002 ||Ae||/||Ax|| 3.056717706448e-001
>> 4 SNES Function norm 4.957825627064e-002
>> 0 KSP Residual norm 6.538539498475e-002
>> 0 KSP preconditioned resid norm 6.538539498475e-002 true resid norm
>> 4.957825627064e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 1.605278143372e-009
>> 1 KSP preconditioned resid norm 1.605278143372e-009 true resid norm
>> 1.365749144340e-002 ||Ae||/||Ax|| 2.754734125550e-001
>> 5 SNES Function norm 4.576573391352e-002
>> 0 KSP Residual norm 5.884685187863e-002
>> 0 KSP preconditioned resid norm 5.884685187863e-002 true resid norm
>> 4.576573391352e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 3.917790130377e-009
>> 1 KSP preconditioned resid norm 3.917790130377e-009 true resid norm
>> 2.918137698804e-002 ||Ae||/||Ax|| 6.376250196967e-001
>> 6 SNES Function norm 4.224348383506e-002
>> 0 KSP Residual norm 5.296216341013e-002
>> 0 KSP preconditioned resid norm 5.296216341013e-002 true resid norm
>> 4.224348383506e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 1.384279752582e-009
>> 1 KSP preconditioned resid norm 1.384279752582e-009 true resid norm
>> 8.645143617596e-003 ||Ae||/||Ax|| 2.046503468168e-001
>> 7 SNES Function norm 3.895875122953e-002
>> 0 KSP Residual norm 4.766594475257e-002
>> 0 KSP preconditioned resid norm 4.766594475257e-002 true resid norm
>> 3.895875122953e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 5.442999105246e-009
>> 1 KSP preconditioned resid norm 5.442999105246e-009 true resid norm
>> 3.199366262059e-002 ||Ae||/||Ax|| 8.212188946227e-001
>> 8 SNES Function norm 3.588203219083e-002
>> 0 KSP Residual norm 4.289934859308e-002
>> 0 KSP preconditioned resid norm 4.289934859308e-002 true resid norm
>> 3.588203219083e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 5.069272581944e-009
>> 1 KSP preconditioned resid norm 5.069272581944e-009 true resid norm
>> 3.315026802067e-002 ||Ae||/||Ax|| 9.238681868510e-001
>> 9 SNES Function norm 3.299674865285e-002
>> 0 KSP Residual norm 3.860941169595e-002
>> 0 KSP preconditioned resid norm 3.860941169595e-002 true resid norm
>> 3.299674865285e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 2.314510318621e-009
>> 1 KSP preconditioned resid norm 2.314510318621e-009 true resid norm
>> 1.422355468145e-002 ||Ae||/||Ax|| 4.310592789335e-001
>> 10 SNES Function norm 3.020092421335e-002
>> 0 KSP Residual norm 3.457428537321e-002
>> 0 KSP preconditioned resid norm 3.457428537321e-002 true resid norm
>> 3.020092421335e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 3.171225245965e-009
>> 1 KSP preconditioned resid norm 3.171225245965e-009 true resid norm
>> 6.700877909403e-003 ||Ae||/||Ax|| 2.218765843742e-001
>> 11 SNES Function norm 2.761432326644e-002
>> 0 KSP Residual norm 3.100402216444e-002
>> 0 KSP preconditioned resid norm 3.100402216444e-002 true resid norm
>> 2.761432326644e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 2.317753799744e-009
>> 1 KSP preconditioned resid norm 2.317753799744e-009 true resid norm
>> 1.143024510909e-002 ||Ae||/||Ax|| 4.139245057287e-001
>> 12 SNES Function norm 2.483228477543e-002
>> 0 KSP Residual norm 2.716039584199e-002
>> 0 KSP preconditioned resid norm 2.716039584199e-002 true resid norm
>> 2.483228477543e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 1.024860175617e-009
>> 1 KSP preconditioned resid norm 1.024860175617e-009 true resid norm
>> 5.071961436716e-003 ||Ae||/||Ax|| 2.042486820115e-001
>> 13 SNES Function norm 2.155599009420e-002
>> 0 KSP Residual norm 2.247739022940e-002
>> 0 KSP preconditioned resid norm 2.247739022940e-002 true resid norm
>> 2.155599009420e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 1.231896568498e-009
>> 1 KSP preconditioned resid norm 1.231896568498e-009 true resid norm
>> 2.253717888475e-003 ||Ae||/||Ax|| 1.045518150002e-001
>> 14 SNES Function norm 1.758159262430e-002
>> 0 KSP Residual norm 1.640654408633e-002
>> 0 KSP preconditioned resid norm 1.640654408633e-002 true resid norm
>> 1.758159262430e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 1.203409491551e-009
>> 1 KSP preconditioned resid norm 1.203409491551e-009 true resid norm
>> 3.340286893989e-003 ||Ae||/||Ax|| 1.899877312236e-001
>> 15 SNES Function norm 1.275874713861e-002
>> 0 KSP Residual norm 8.737890404296e-003
>> 0 KSP preconditioned resid norm 8.737890404296e-003 true resid norm
>> 1.275874713861e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 3.862616851249e-010
>> 1 KSP preconditioned resid norm 3.862616851249e-010 true resid norm
>> 9.158071400861e-004 ||Ae||/||Ax|| 7.177876715771e-002
>> 16 SNES Function norm 5.367994969686e-003
>> 0 KSP Residual norm 1.873266786098e-009
>> 0 KSP preconditioned resid norm 1.873266786098e-009 true resid norm
>> 5.367994969686e-003 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 9.236612780542e-017
>> 1 KSP preconditioned resid norm 9.236612780542e-017 true resid norm
>> 4.487656305545e-010 ||Ae||/||Ax|| 8.360023306445e-008
>> 17 SNES Function norm 1.843858578272e-008
>> 0 KSP Residual norm 3.418191528615e-015
>> 0 KSP preconditioned resid norm 3.418191528615e-015 true resid norm
>> 1.843858578272e-008 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 2.091028447697e-022
>> 1 KSP preconditioned resid norm 2.091028447697e-022 true resid norm
>> 9.356082852780e-016 ||Ae||/||Ax|| 5.074186796662e-008
>> 18 SNES Function norm 1.582175998776e-008
>> STEP 1 (Newton iterations: 18)
>>
>> 0 SNES Function norm 7.071067811866e-002
>> 0 KSP Residual norm 9.965760716669e-002
>> 0 KSP preconditioned resid norm 9.965760716669e-002 true resid norm
>> 7.071067811866e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 4.158690871520e-009
>> 1 KSP preconditioned resid norm 4.158690871520e-009 true resid norm
>> 1.356168089543e-002 ||Ae||/||Ax|| 1.917911305090e-001
>> 1 SNES Function norm 6.402155946870e-002
>> 0 KSP Residual norm 8.969183775926e-002
>> 0 KSP preconditioned resid norm 8.969183775926e-002 true resid norm
>> 6.402155946870e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 7.922035131300e-009
>> 1 KSP preconditioned resid norm 7.922035131300e-009 true resid norm
>> 4.173737132742e-002 ||Ae||/||Ax|| 6.519268145573e-001
>> 2 SNES Function norm 5.850726192206e-002
>> 0 KSP Residual norm 8.072264774465e-002
>> 0 KSP preconditioned resid norm 8.072264774465e-002 true resid norm
>> 5.850726192206e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 4.356474211542e-009
>> 1 KSP preconditioned resid norm 4.356474211542e-009 true resid norm
>> 2.083500604436e-002 ||Ae||/||Ax|| 3.561097436437e-001
>> 3 SNES Function norm 5.377933295280e-002
>> 0 KSP Residual norm 7.265037686612e-002
>> 0 KSP preconditioned resid norm 7.265037686612e-002 true resid norm
>> 5.377933295280e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 8.772318530630e-009
>> 1 KSP preconditioned resid norm 8.772318530630e-009 true resid norm
>> 5.284958913103e-002 ||Ae||/||Ax|| 9.827118751623e-001
>> 4 SNES Function norm 4.958751191600e-002
>> 0 KSP Residual norm 6.538533386375e-002
>> 0 KSP preconditioned resid norm 6.538533386375e-002 true resid norm
>> 4.958751191600e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 1.128741903850e-009
>> 1 KSP preconditioned resid norm 1.128741903850e-009 true resid norm
>> 2.526410501148e-003 ||Ae||/||Ax|| 5.094852319729e-002
>> 5 SNES Function norm 4.577729047509e-002
>> 0 KSP Residual norm 5.884679667348e-002
>> 0 KSP preconditioned resid norm 5.884679667348e-002 true resid norm
>> 4.577729047509e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 5.763627011382e-009
>> 1 KSP preconditioned resid norm 5.763627011382e-009 true resid norm
>> 1.051243252216e-002 ||Ae||/||Ax|| 2.296429608013e-001
>> 6 SNES Function norm 4.225677503639e-002
>> 0 KSP Residual norm 5.296211439112e-002
>> 0 KSP preconditioned resid norm 5.296211439112e-002 true resid norm
>> 4.225677503639e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 1.022912340341e-009
>> 1 KSP preconditioned resid norm 1.022912340341e-009 true resid norm
>> 3.573383237647e-003 ||Ae||/||Ax|| 8.456355778617e-002
>> 7 SNES Function norm 3.897321226706e-002
>> 0 KSP Residual norm 4.766590050155e-002
>> 0 KSP preconditioned resid norm 4.766590050155e-002 true resid norm
>> 3.897321226706e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 3.528025220977e-009
>> 1 KSP preconditioned resid norm 3.528025220977e-009 true resid norm
>> 1.960313404416e-002 ||Ae||/||Ax|| 5.029899488355e-001
>> 8 SNES Function norm 3.589720610234e-002
>> 0 KSP Residual norm 4.289930864255e-002
>> 0 KSP preconditioned resid norm 4.289930864255e-002 true resid norm
>> 3.589720610234e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 4.133432759880e-009
>> 1 KSP preconditioned resid norm 4.133432759880e-009 true resid norm
>> 1.940005023620e-002 ||Ae||/||Ax|| 5.404334304149e-001
>> 9 SNES Function norm 3.301230929196e-002
>> 0 KSP Residual norm 3.860937624684e-002
>> 0 KSP preconditioned resid norm 3.860937624684e-002 true resid norm
>> 3.301230929196e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 8.211304264406e-010
>> 1 KSP preconditioned resid norm 8.211304264406e-010 true resid norm
>> 7.328958637952e-003 ||Ae||/||Ax|| 2.220068451781e-001
>> 10 SNES Function norm 3.030900587812e-002
>> 0 KSP Residual norm 3.474843739750e-002
>> 0 KSP preconditioned resid norm 3.474843739750e-002 true resid norm
>> 3.030900587812e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 3.265840938498e-009
>> 1 KSP preconditioned resid norm 3.265840938498e-009 true resid norm
>> 1.358870142093e-002 ||Ae||/||Ax|| 4.483387371916e-001
>> 11 SNES Function norm 2.718409957830e-002
>> 0 KSP Residual norm 3.013614572851e-002
>> 0 KSP preconditioned resid norm 3.013614572851e-002 true resid norm
>> 2.718409957830e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 1.652744245097e-009
>> 1 KSP preconditioned resid norm 1.652744245097e-009 true resid norm
>> 1.202105117910e-002 ||Ae||/||Ax|| 4.422089149754e-001
>> 12 SNES Function norm 2.437348813670e-002
>> 0 KSP Residual norm 2.629377332723e-002
>> 0 KSP preconditioned resid norm 2.629377332723e-002 true resid norm
>> 2.437348813670e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 3.959255153953e-009
>> 1 KSP preconditioned resid norm 3.959255153953e-009 true resid norm
>> 2.578989386428e-002 ||Ae||/||Ax|| 1.058112557367e+000
>> 13 SNES Function norm 2.199784341474e-002
>> 0 KSP Residual norm 2.328182605620e-002
>> 0 KSP preconditioned resid norm 2.328182605620e-002 true resid norm
>> 2.199784341474e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 8.915626892590e-010
>> 1 KSP preconditioned resid norm 8.915626892590e-010 true resid norm
>> 6.263373898192e-003 ||Ae||/||Ax|| 2.847267243477e-001
>> 14 SNES Function norm 1.833996742657e-002
>> 0 KSP Residual norm 1.794186796967e-002
>> 0 KSP preconditioned resid norm 1.794186796967e-002 true resid norm
>> 1.833996742657e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 1.694980794482e-009
>> 1 KSP preconditioned resid norm 1.694980794482e-009 true resid norm
>> 2.372076451714e-003 ||Ae||/||Ax|| 1.293391856453e-001
>> 15 SNES Function norm 1.384131369872e-002
>> 0 KSP Residual norm 1.074320273869e-002
>> 0 KSP preconditioned resid norm 1.074320273869e-002 true resid norm
>> 1.384131369872e-002 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 7.118408455169e-010
>> 1 KSP preconditioned resid norm 7.118408455169e-010 true resid norm
>> 4.592913592019e-003 ||Ae||/||Ax|| 3.318264213927e-001
>> 16 SNES Function norm 8.126551489387e-003
>> 0 KSP Residual norm 2.817712852237e-009
>> 0 KSP preconditioned resid norm 2.817712852237e-009 true resid norm
>> 8.126551489387e-003 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 2.239560797627e-016
>> 1 KSP preconditioned resid norm 2.239560797627e-016 true resid norm
>> 1.053395037920e-009 ||Ae||/||Ax|| 1.296238680448e-007
>> 17 SNES Function norm 4.871218193429e-008
>> 0 KSP Residual norm 1.123675925695e-014
>> 0 KSP preconditioned resid norm 1.123675925695e-014 true resid norm
>> 4.871218193429e-008 ||Ae||/||Ax|| 1.000000000000e+000
>> 1 KSP Residual norm 5.307928330547e-022
>> 1 KSP preconditioned resid norm 5.307928330547e-022 true resid norm
>> 2.893354456541e-015 ||Ae||/||Ax|| 5.939693813026e-008
>> 18 SNES Function norm 5.035279029783e-008
>> STEP 2 (Newton iterations: 18)
>>
>> diverged reason: -6
>>
>>
>> Rong
>>
>>> ----- Original Message ----- From: "Barry Smith" <bsmith at mcs.anl.gov>
>>> To: "PETSc users list" <petsc-users at mcs.anl.gov>
>>> Sent: Wednesday, May 11, 2011 11:05 AM
>>> Subject: Re: [petsc-users] nonzero prescribed boundary condition
>>>
>>>
>>>
>>> Ok, the linear solver looks like it is working ok. The likely problem is
>>> that Jacobian does not match the function evaluation.
>>>
>>> Run the same thing but with the additional option -snes_mf_operator
>>>
>>> Then run with -snes_type test (instead of -snes_mf_operator).
>>>
>>> Barry
>>>
>>> On May 10, 2011, at 8:14 PM, Tian(ICT) wrote:
>>>
>>>> Dear Barry, here is the output using -pc_type
>>>> lu -ksp_monitor_true_residual -snes_monitor -ksp_monitor
>>>> the attached is the same and for clear reference. Thanks again for
>>>> helps.
>>>>
>>>> atol=1e-050, rtol=1e-008, stol=1e-008, maxit=50, maxf=10000
>>>> 0 SNES Function norm 7.071067811865e-002
>>>> 0 KSP Residual norm 9.965778978387e-002
>>>> 0 KSP preconditioned resid norm 9.965778978387e-002 true resid norm
>>>> 7.071067811865e-002 ||Ae||/||Ax|| 1.000000000000e+000
>>>> 1 KSP Residual norm 6.823187455811e-017
>>>> 1 KSP preconditioned resid norm 6.823187455811e-017 true resid norm
>>>> 8.847298885656e-011 ||Ae||/||Ax|| 1.251197007446e-009
>>>> 1 SNES Function norm 6.401926523423e-002
>>>> 0 KSP Residual norm 8.969200212486e-002
>>>> 0 KSP preconditioned resid norm 8.969200212486e-002 true resid norm
>>>> 6.401926523423e-002 ||Ae||/||Ax|| 1.000000000000e+000
>>>> 1 KSP Residual norm 1.106757475780e-016
>>>> 1 KSP preconditioned resid norm 1.106757475780e-016 true resid norm
>>>> 6.211830067439e-011 ||Ae||/||Ax|| 9.703063671087e-010
>>>> 2 SNES Function norm 5.849992149767e-002
>>>> 0 KSP Residual norm 8.072279488157e-002
>>>> 0 KSP preconditioned resid norm 8.072279488157e-002 true resid norm
>>>> 5.849992149767e-002 ||Ae||/||Ax|| 1.000000000000e+000
>>>> 1 KSP Residual norm 1.268750073799e-017
>>>> 1 KSP preconditioned resid norm 1.268750073799e-017 true resid norm
>>>> 3.802431036387e-011 ||Ae||/||Ax|| 6.499890835816e-010
>>>> 3 SNES Function norm 5.376618503592e-002
>>>> 0 KSP Residual norm 7.265050969883e-002
>>>> 0 KSP preconditioned resid norm 7.265050969883e-002 true resid norm
>>>> 5.376618503592e-002 ||Ae||/||Ax|| 1.000000000000e+000
>>>> 1 KSP Residual norm 2.677655733356e-017
>>>> 1 KSP preconditioned resid norm 2.677655733356e-017 true resid norm
>>>> 8.120397788686e-011 ||Ae||/||Ax|| 1.510316899602e-009
>>>> 4 SNES Function norm 4.956894354459e-002
>>>> 0 KSP Residual norm 6.538545411661e-002
>>>> 0 KSP preconditioned resid norm 6.538545411661e-002 true resid norm
>>>> 4.956894354459e-002 ||Ae||/||Ax|| 1.000000000000e+000
>>>> 1 KSP Residual norm 9.557004153175e-017
>>>> 1 KSP preconditioned resid norm 9.557004153175e-017 true resid norm
>>>> 2.944250802029e-011 ||Ae||/||Ax|| 5.939708598754e-010
>>>> 5 SNES Function norm 4.575418613137e-002
>>>> 0 KSP Residual norm 5.884690496914e-002
>>>> 0 KSP preconditioned resid norm 5.884690496914e-002 true resid norm
>>>> 4.575418613137e-002 ||Ae||/||Ax|| 1.000000000000e+000
>>>> 1 KSP Residual norm 5.470969262115e-017
>>>> 1 KSP preconditioned resid norm 5.470969262115e-017 true resid norm
>>>> 3.659003166095e-011 ||Ae||/||Ax|| 7.997089393284e-010
>>>> 6 SNES Function norm 4.223022245585e-002
>>>> 0 KSP Residual norm 5.296221144636e-002
>>>> 0 KSP preconditioned resid norm 5.296221144636e-002 true resid norm
>>>> 4.223022245585e-002 ||Ae||/||Ax|| 1.000000000000e+000
>>>> 1 KSP Residual norm 8.255198782390e-017
>>>> 1 KSP preconditioned resid norm 8.255198782390e-017 true resid norm
>>>> 1.955545658933e-011 ||Ae||/||Ax|| 4.630678090739e-010
>>>> 7 SNES Function norm 3.894430065910e-002
>>>> 0 KSP Residual norm 4.766598785088e-002
>>>> 0 KSP preconditioned resid norm 4.766598785088e-002 true resid norm
>>>> 3.894430065910e-002 ||Ae||/||Ax|| 1.000000000000e+000
>>>> 1 KSP Residual norm 3.322615478395e-017
>>>> 1 KSP preconditioned resid norm 3.322615478395e-017 true resid norm
>>>> 3.485328148673e-011 ||Ae||/||Ax|| 8.949520442496e-010
>>>> 8 SNES Function norm 3.586683371135e-002
>>>> 0 KSP Residual norm 4.289938708067e-002
>>>> 0 KSP preconditioned resid norm 4.289938708067e-002 true resid norm
>>>> 3.586683371135e-002 ||Ae||/||Ax|| 1.000000000000e+000
>>>> 1 KSP Residual norm 6.181358328498e-017
>>>> 1 KSP preconditioned resid norm 6.181358328498e-017 true resid norm
>>>> 3.246902818086e-011 ||Ae||/||Ax|| 9.052660862724e-010
>>>> 9 SNES Function norm 3.298130202025e-002
>>>> 0 KSP Residual norm 3.860944676473e-002
>>>> 0 KSP preconditioned resid norm 3.860944676473e-002 true resid norm
>>>> 3.298130202025e-002 ||Ae||/||Ax|| 1.000000000000e+000
>>>> 1 KSP Residual norm 4.635174776374e-017
>>>> 1 KSP preconditioned resid norm 4.635174776374e-017 true resid norm
>>>> 1.497516842272e-011 ||Ae||/||Ax|| 4.540502498513e-010
>>>> 10 SNES Function norm 3.027806208930e-002
>>>> 0 KSP Residual norm 3.474850078591e-002
>>>> 0 KSP preconditioned resid norm 3.474850078591e-002 true resid norm
>>>> 3.027806208930e-002 ||Ae||/||Ax|| 1.000000000000e+000
>>>> 1 KSP Residual norm 2.389914053685e-017
>>>> 1 KSP preconditioned resid norm 2.389914053685e-017 true resid norm
>>>> 6.007440888596e-011 ||Ae||/||Ax|| 1.984090286517e-009
>>>> 11 SNES Function norm 2.749422924729e-002
>>>> 0 KSP Residual norm 3.081350823297e-002
>>>> 0 KSP preconditioned resid norm 3.081350823297e-002 true resid norm
>>>> 2.749422924729e-002 ||Ae||/||Ax|| 1.000000000000e+000
>>>> 1 KSP Residual norm 2.640567497647e-017
>>>> 1 KSP preconditioned resid norm 2.640567497647e-017 true resid norm
>>>> 1.281638295853e-011 ||Ae||/||Ax|| 4.661481085089e-010
>>>> 12 SNES Function norm 2.437488247885e-002
>>>> 0 KSP Residual norm 2.633007441879e-002
>>>> 0 KSP preconditioned resid norm 2.633007441879e-002 true resid norm
>>>> 2.437488247885e-002 ||Ae||/||Ax|| 1.000000000000e+000
>>>> 1 KSP Residual norm 2.772331460094e-017
>>>> 1 KSP preconditioned resid norm 2.772331460094e-017 true resid norm
>>>> 1.918212496143e-011 ||Ae||/||Ax|| 7.869627670236e-010
>>>> 13 SNES Function norm 2.079664278637e-002
>>>> 0 KSP Residual norm 2.104738289397e-002
>>>> 0 KSP preconditioned resid norm 2.104738289397e-002 true resid norm
>>>> 2.079664278637e-002 ||Ae||/||Ax|| 1.000000000000e+000
>>>> 1 KSP Residual norm 1.650632708670e-017
>>>> 1 KSP preconditioned resid norm 1.650632708670e-017 true resid norm
>>>> 2.316371967362e-011 ||Ae||/||Ax|| 1.113820144509e-009
>>>> 14 SNES Function norm 1.657344626858e-002
>>>> 0 KSP Residual norm 1.454141853505e-002
>>>> 0 KSP preconditioned resid norm 1.454141853505e-002 true resid norm
>>>> 1.657344626858e-002 ||Ae||/||Ax|| 1.000000000000e+000
>>>> 1 KSP Residual norm 1.129401160070e-017
>>>> 1 KSP preconditioned resid norm 1.129401160070e-017 true resid norm
>>>> 7.885499327559e-012 ||Ae||/||Ax|| 4.757911661686e-010
>>>> 15 SNES Function norm 1.484243752612e-002
>>>> 0 KSP Residual norm 5.241948491751e-009
>>>> 0 KSP preconditioned resid norm 5.241948491751e-009 true resid norm
>>>> 1.484243752612e-002 ||Ae||/||Ax|| 1.000000000000e+000
>>>> 1 KSP Residual norm 2.729506849025e-024
>>>> 1 KSP preconditioned resid norm 2.729506849025e-024 true resid norm
>>>> 6.386677851085e-018 ||Ae||/||Ax|| 4.302984492839e-016
>>>> 16 SNES Function norm 2.828002157497e-008
>>>> 0 KSP Residual norm 6.042518362322e-015
>>>> 0 KSP preconditioned resid norm 6.042518362322e-015 true resid norm
>>>> 2.828002157497e-008 ||Ae||/||Ax|| 1.000000000000e+000
>>>> 1 KSP Residual norm 6.272441346127e-030
>>>> 1 KSP preconditioned resid norm 6.272441346127e-030 true resid norm
>>>> 1.112857698032e-023 ||Ae||/||Ax|| 3.935137372797e-016
>>>> 17 SNES Function norm 2.960967020289e-008
>>>> STEP 0 (Newton iterations: 17)
>>>>
>>>> diverged reason: -6
>>>>
>>>>
>>>> ----- Original Message ----- From: "Barry Smith" <bsmith at mcs.anl.gov>
>>>> To: "PETSc users list" <petsc-users at mcs.anl.gov>
>>>> Sent: Wednesday, May 11, 2011 2:54 AM
>>>> Subject: Re: [petsc-users] nonzero prescribed boundary condition
>>>>
>>>>
>>>>
>>>> Use -pc_type lu -ksp_monitor_true_residual -snes_monitor -ksp_monitor
>>>> and
>>>> send the outputs
>>>>
>>>>
>>>> Barry
>>>>
>>>> On May 9, 2011, at 10:43 PM, Tian(ICT) wrote:
>>>>
>>>>> by the way, the increment size is like that
>>>>> for a 100 lengh model, the increment is set to 0.05,
>>>>> the engineering strain is around 5%% per load step.
>>>>> This is already too small increment size for a large deformation
>>>>> analysis.
>>>>> a 0.5 increment size leads to both linear search and trust region
>>>>> failed.
>>>>> linear search failed for 0.05 while trust region converges with 17
>>>>> Newton
>>>>> iterations each load step.
>>>>> Rong
>>>>>
>>>>> ----- Original Message ----- From: "Tian(ICT)" <rongtian at ncic.ac.cn>
>>>>> To: "PETSc users list" <petsc-users at mcs.anl.gov>
>>>>> Sent: Tuesday, May 10, 2011 11:37 AM
>>>>> Subject: Re: [petsc-users] nonzero prescribed boundary condition
>>>>>
>>>>>
>>>>>> First, thanks again, the issue was gone.
>>>>>>
>>>>>> I just followed up with some test results.
>>>>>> I have tested SNES using one finite element for a geometric large
>>>>>> deformation problem.
>>>>>> Those are just the very early test results so they may be not telling
>>>>>> what happened exactly.
>>>>>> For the displacement controlled load, I found that convergence is
>>>>>> much
>>>>>> slower than that of force loading.
>>>>>> Even worse, linear search is so sensitive to the displacement
>>>>>> increment
>>>>>> and diverged no matter what the increment size was used (too small
>>>>>> incremnt also led to diverged soloution (-6 reason), trust region
>>>>>> works
>>>>>> well in the sense of not sensitive to the displacement increment, but
>>>>>> during each load step, it requires around ten to several tens of
>>>>>> Newton
>>>>>> interations whereas for the force loading case and the almost same
>>>>>> amount of deformation, this is normally 3. This is against my
>>>>>> expectation. Any hint?
>>>>>>
>>>>>> Rong
>>>>>>
>>>>>> ----- Original Message ----- From: "Barry Smith" <bsmith at mcs.anl.gov>
>>>>>> To: "PETSc users list" <petsc-users at mcs.anl.gov>
>>>>>> Sent: Tuesday, May 10, 2011 10:22 AM
>>>>>> Subject: Re: [petsc-users] nonzero prescribed boundary condition
>>>>>>
>>>>>>
>>>>>>
>>>>>> On May 9, 2011, at 9:15 PM, Tian(ICT) wrote:
>>>>>>
>>>>>>> Dear Barry, Thanks a lot for quick answering.
>>>>>>> I checked the development documents and found the new version of
>>>>>>> MatZeroRows() does support the nonzero prescribed boundary
>>>>>>> conditions.
>>>>>>>
>>>>>>> I followed up with more details.
>>>>>>> I am using Petasc 2.3.3. to solve a nonlinear problem, e.g. using
>>>>>>> SNES
>>>>>>> solvers.
>>>>>>> I used a displacement-controlled load (as this type of loading works
>>>>>>> well for all cases).
>>>>>>> This is the reason the nonzero prescribed boundary came up.
>>>>>>>
>>>>>>> In FormJacobian, I modified Jacobian and residual to satisfy the
>>>>>>> nonzero prescribed boundary.
>>>>>>> In FormFunction, I modified the solution to the known solution(this
>>>>>>> should not be necessary as the modified Jacobian and rhs should give
>>>>>>> the prescribed solution also)
>>>>>>
>>>>>> You should not do it this way. See below.
>>>>>>>
>>>>>>> Now I found another issue, no matter if I prescried the solution or
>>>>>>> not
>>>>>>> in FormFunction,
>>>>>>> SNES solver always call FormFunction and never call FormJacobian.
>>>>>>
>>>>>> The only reason it would not call FormJacobian is if decided that the
>>>>>> residual norm was small enough before any Newton steps; for example
>>>>>> if
>>>>>> the FormFunction() computed exactly the zero function initially. When
>>>>>> you run with -snes_monitor -ksp_monitor what does it print for
>>>>>> residual
>>>>>> norms.
>>>>>>
>>>>>>> Of course the solver finally diverged or converged to a zero
>>>>>>> solution.
>>>>>>>
>>>>>>> So my quick follow up question is How a displacement-controled load
>>>>>>> is
>>>>>>> done corrently in Petsc 2.3.3?
>>>>>>
>>>>>> To do it in 2.3.3 simply have for those components of F() the formula
>>>>>> F_i = x_i - givenvalue_i and in your Jacobian just use MatZeroRows()
>>>>>> for
>>>>>> those rows
>>>>>>
>>>>>> We strongly urge you to upgrade to the latest PETSc before doing
>>>>>> anything further.
>>>>>>
>>>>>>
>>>>>> Barry
>>>>>>
>>>>>>>
>>>>>>> Rong
>>>>>>>
>>>>>>> ----- Original Message ----- From: "Barry Smith"
>>>>>>> <bsmith at mcs.anl.gov>
>>>>>>> To: "PETSc users list" <petsc-users at mcs.anl.gov>
>>>>>>> Sent: Tuesday, May 10, 2011 9:31 AM
>>>>>>> Subject: Re: [petsc-users] nonzero prescribed boundary condition
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> In petsc-dev
>>>>>>> http://www.mcs.anl.gov/petsc/petsc-as/developers/index.html we have
>>>>>>> modified the calling sequence for MatZeroRows() so that it can
>>>>>>> automatically adjust the appropriate right hand side values for the
>>>>>>> zeroed rows to support zero or non-zero prescribed boundary
>>>>>>> conditions
>>>>>>> easily.
>>>>>>>
>>>>>>> Barry
>>>>>>>
>>>>>>> On May 9, 2011, at 8:18 PM, Tian(ICT) wrote:
>>>>>>>
>>>>>>>> Dear all,
>>>>>>>>
>>>>>>>> I got this question long ago and searched the prior posting but did
>>>>>>>> not find the solution.
>>>>>>>> The question is about nonzero prescribed boundary condition.
>>>>>>>> My understanding is that MatZeroRows() works only for zero
>>>>>>>> prescribed
>>>>>>>> value, not non-zero value.
>>>>>>>> For the non-zero values, we have to remove the rows associated with
>>>>>>>> the boundary, but this
>>>>>>>> will lead to a zero dignal and accordingly the rows in r.h.s should
>>>>>>>> also be removed.
>>>>>>>> My question is that does MatZeroRows() also works for nonzero
>>>>>>>> prescribed boundary and if so how to do it simply?
>>>>>>>>
>>>>>>>> Rong
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>> <aa>
>>>
>>>
>>
>
>
More information about the petsc-users
mailing list