[petsc-users] What is the difference between these two approaches?

(Rebecca) Xuefei YUAN xy2102 at columbia.edu
Tue Feb 9 12:29:57 CST 2010


Dear Barry,

Yes, I checked the convergence reason by -snes_converged_reason in the  
option file, however, the residual's behavior looks it starts to  
decrease, and at some point, it stops to decrease for some case, it  
starts to increase for some other case. If I set -snes_rtol to be a  
bigger number, it convergences due to this rtol.

For example, -snes_rtol 1e-4, then

   0 SNES Function norm 1.489006328086e+00
   1 SNES Function norm 1.044141602147e-01
   2 SNES Function norm 2.662563646189e-02
   3 SNES Function norm 5.764005178654e-03
   4 SNES Function norm 2.493444656346e-03
   5 SNES Function norm 5.180475798178e-04
   6 SNES Function norm 4.166251801170e-04
   7 SNES Function norm 3.066582000814e-04
   8 SNES Function norm 2.189666367666e-04
   9 SNES Function norm 1.354684191244e-04
Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE

However, if increase -snes_rtol 1e-5, then

   0 SNES Function norm 1.489006328086e+00
   1 SNES Function norm 1.044141602147e-01
   2 SNES Function norm 2.662563646189e-02
   3 SNES Function norm 5.764005178654e-03
   4 SNES Function norm 2.493444656346e-03
   5 SNES Function norm 5.180475798178e-04
   6 SNES Function norm 4.166251801170e-04
   7 SNES Function norm 3.066582000814e-04
   8 SNES Function norm 2.189666367666e-04
   9 SNES Function norm 1.354684191244e-04
  10 SNES Function norm 1.287520392923e-04
  11 SNES Function norm 1.286080621054e-04
  12 SNES Function norm 1.285437650356e-04
  13 SNES Function norm 1.284168806812e-04
  14 SNES Function norm 1.283833115348e-04
  15 SNES Function norm 1.283700090330e-04
  16 SNES Function norm 1.283691578788e-04
  17 SNES Function norm 1.283486627334e-04
  18 SNES Function norm 1.283349991927e-04
  19 SNES Function norm 1.283332060308e-04
  20 SNES Function norm 1.283026682165e-04
  21 SNES Function norm 1.282981662835e-04
  22 SNES Function norm 1.282944044720e-04
  23 SNES Function norm 1.282831861627e-04
  24 SNES Function norm 1.282754274487e-04
  25 SNES Function norm 1.282754274487e-04
  26 SNES Function norm 1.282754274487e-04
  27 SNES Function norm 1.282754274487e-04
  28 SNES Function norm 1.282754274487e-04
  29 SNES Function norm 1.282754274487e-04
  30 SNES Function norm 1.282754274487e-04
  31 SNES Function norm 1.282754274487e-04
  32 SNES Function norm 1.282754274487e-04
  33 SNES Function norm 1.282754274487e-04
  34 SNES Function norm 1.282754274487e-04
  35 SNES Function norm 1.282754274487e-04
  36 SNES Function norm 1.282754274487e-04
  37 SNES Function norm 1.282754274487e-04
  38 SNES Function norm 1.282754274487e-04
  39 SNES Function norm 1.282754274487e-04
  40 SNES Function norm 1.282754274487e-04
  41 SNES Function norm 1.282754274487e-04
  42 SNES Function norm 1.282754274487e-04
  43 SNES Function norm 1.282754274487e-04
  44 SNES Function norm 1.282754274487e-04
  45 SNES Function norm 1.282754274487e-04
  46 SNES Function norm 1.282754274487e-04
  47 SNES Function norm 1.282754274487e-04
  48 SNES Function norm 1.282754274487e-04
  49 SNES Function norm 1.282754274487e-04
  50 SNES Function norm 1.282754274487e-04
Nonlinear solve did not converge due to DIVERGED_MAX_IT

The other set of code (the latter approach of updating parameter c  
after each Newton iteration) convergences according to the function  
norm, i.e., I set the function norm less then 1e-9 to be the stop  
condition for the iteration, the residual history looks like:(with  
-snes_max_it 1 and -ksp_max_it 1):

0 SNES Function norm 7.717021407156e-02
   1 SNES Function norm 6.111417737487e-02
   0 SNES Function norm 3.733238293683e-02
   1 SNES Function norm 8.377847092603e-03
   0 SNES Function norm 8.296990448940e-03
   1 SNES Function norm 5.550720142243e-03
   0 SNES Function norm 5.548075287497e-03
   1 SNES Function norm 4.362188843062e-03
   0 SNES Function norm 4.432680688316e-03
   1 SNES Function norm 3.690367229854e-03
   0 SNES Function norm 3.744073313319e-03
   1 SNES Function norm 3.172374307619e-03
   0 SNES Function norm 3.228692603156e-03
   1 SNES Function norm 2.768491914917e-03
   0 SNES Function norm 2.805475765372e-03
   1 SNES Function norm 2.443058872604e-03
   0 SNES Function norm 2.478166623393e-03
   1 SNES Function norm 2.177390149448e-03
   0 SNES Function norm 2.202793639982e-03
   1 SNES Function norm 1.945388110780e-03
   0 SNES Function norm 1.967623718733e-03
   1 SNES Function norm 1.768354048299e-03
   0 SNES Function norm 1.785161018750e-03
   1 SNES Function norm 1.589282214337e-03
   0 SNES Function norm 1.604233657428e-03
   1 SNES Function norm 1.463109964867e-03
   0 SNES Function norm 1.473621854115e-03
   1 SNES Function norm 1.317683163196e-03
   0 SNES Function norm 1.328244229217e-03
   1 SNES Function norm 1.215003775725e-03
   0 SNES Function norm 1.221493864986e-03
   1 SNES Function norm 1.096103543280e-03
   0 SNES Function norm 1.103290905401e-03
   1 SNES Function norm 1.005123217409e-03
   0 SNES Function norm 1.009213742284e-03
   1 SNES Function norm 9.155541951786e-04
   0 SNES Function norm 9.201532654579e-04
   1 SNES Function norm 8.375621763232e-04
   0 SNES Function norm 8.403223094472e-04
   1 SNES Function norm 7.740512468428e-04
   0 SNES Function norm 7.770309975336e-04
   1 SNES Function norm 7.108767243888e-04
   0 SNES Function norm 7.129961739179e-04
   1 SNES Function norm 6.627822760985e-04
   0 SNES Function norm 6.647704113358e-04
   1 SNES Function norm 6.102764040974e-04
   0 SNES Function norm 6.120878163655e-04
   1 SNES Function norm 5.699965969158e-04
   0 SNES Function norm 5.713568735112e-04
   1 SNES Function norm 5.238319694499e-04
   0 SNES Function norm 5.254267350528e-04
   1 SNES Function norm 4.876335564413e-04
   0 SNES Function norm 4.885813237453e-04
   1 SNES Function norm 4.455349473812e-04
   0 SNES Function norm 4.469016403610e-04
   1 SNES Function norm 4.120292273962e-04
   0 SNES Function norm 4.126963740317e-04
   1 SNES Function norm 3.730935892417e-04
   0 SNES Function norm 3.742035921654e-04
   1 SNES Function norm 3.420872251073e-04
   0 SNES Function norm 3.425616644714e-04
   1 SNES Function norm 3.059197813915e-04
   0 SNES Function norm 3.067544839203e-04
   1 SNES Function norm 2.774938815805e-04
   0 SNES Function norm 2.778376919811e-04
   1 SNES Function norm 2.442552475791e-04
   0 SNES Function norm 2.448004016612e-04
   1 SNES Function norm 2.184761633902e-04
   0 SNES Function norm 2.187330876710e-04
   1 SNES Function norm 1.900832109865e-04
   0 SNES Function norm 1.903976431705e-04
   1 SNES Function norm 1.677037933375e-04
   0 SNES Function norm 1.679017264216e-04
   1 SNES Function norm 1.467922092287e-04
   0 SNES Function norm 1.470523475274e-04
   1 SNES Function norm 1.292017110780e-04
   0 SNES Function norm 1.293538618528e-04
   1 SNES Function norm 1.156400554749e-04
   0 SNES Function norm 1.158835481497e-04
   1 SNES Function norm 1.032479618658e-04
   0 SNES Function norm 1.033618371681e-04
   1 SNES Function norm 9.462170461214e-05
   0 SNES Function norm 9.481016246011e-05
   1 SNES Function norm 8.604985727215e-05
   0 SNES Function norm 8.614114308797e-05
   1 SNES Function norm 7.993983293367e-05
   0 SNES Function norm 8.008092682120e-05
   1 SNES Function norm 7.342117051587e-05
   0 SNES Function norm 7.350619633433e-05
   1 SNES Function norm 6.862434880733e-05
   0 SNES Function norm 6.873247656567e-05
   1 SNES Function norm 6.319354549414e-05
   0 SNES Function norm 6.328188603651e-05
   1 SNES Function norm 5.903764019463e-05
   0 SNES Function norm 5.912157652582e-05
   1 SNES Function norm 5.416427286073e-05
   0 SNES Function norm 5.425641264091e-05
   1 SNES Function norm 5.029527375088e-05
   0 SNES Function norm 5.035948681832e-05
   1 SNES Function norm 4.581169399883e-05
   0 SNES Function norm 4.589868067016e-05
   1 SNES Function norm 4.214311333883e-05
   0 SNES Function norm 4.219046237102e-05
   1 SNES Function norm 3.815294777386e-05
   0 SNES Function norm 3.822539926375e-05
   1 SNES Function norm 3.480343288836e-05
   0 SNES Function norm 3.483833519265e-05
   1 SNES Function norm 3.142421956990e-05
   0 SNES Function norm 3.148153758297e-05
   1 SNES Function norm 2.853812371563e-05
   0 SNES Function norm 2.856622223078e-05
   1 SNES Function norm 2.580597673185e-05
   0 SNES Function norm 2.585080224147e-05
   1 SNES Function norm 2.343181094997e-05
   0 SNES Function norm 2.345661769786e-05
   1 SNES Function norm 2.129192093527e-05
   0 SNES Function norm 2.132678741107e-05
   1 SNES Function norm 1.936620692664e-05
   0 SNES Function norm 1.938876254006e-05
   1 SNES Function norm 1.774407873346e-05
   0 SNES Function norm 1.777159702038e-05
   1 SNES Function norm 1.619616581487e-05
   0 SNES Function norm 1.621660773371e-05
   1 SNES Function norm 1.500307362210e-05
   0 SNES Function norm 1.502516240372e-05
   1 SNES Function norm 1.377015977907e-05
   0 SNES Function norm 1.378907926176e-05
   1 SNES Function norm 1.286144826667e-05
   0 SNES Function norm 1.287902603249e-05
   1 SNES Function norm 1.184092829687e-05
   0 SNES Function norm 1.185929534223e-05
   1 SNES Function norm 1.108533648387e-05
   0 SNES Function norm 1.109921082013e-05
   1 SNES Function norm 1.017627166789e-05
   0 SNES Function norm 1.019464063203e-05
   1 SNES Function norm 9.483105761759e-06
   0 SNES Function norm 9.494189662930e-06
   1 SNES Function norm 8.620574747139e-06
   0 SNES Function norm 8.638437484416e-06
   1 SNES Function norm 7.938611071339e-06
   0 SNES Function norm 7.947641807035e-06
   1 SNES Function norm 7.119414178340e-06
   0 SNES Function norm 7.134948452805e-06
   1 SNES Function norm 6.448591686742e-06
   0 SNES Function norm 6.455968088393e-06
   1 SNES Function norm 5.740879455308e-06
   0 SNES Function norm 5.752400340404e-06
   1 SNES Function norm 5.139183976720e-06
   0 SNES Function norm 5.145019054494e-06
   1 SNES Function norm 4.603796908518e-06
   0 SNES Function norm 4.611764520665e-06
   1 SNES Function norm 4.127148087825e-06
   0 SNES Function norm 4.131642100973e-06
   1 SNES Function norm 3.748254813472e-06
   0 SNES Function norm 3.754172511054e-06
   1 SNES Function norm 3.393357883197e-06
   0 SNES Function norm 3.397020453407e-06
   1 SNES Function norm 3.122863568921e-06
   0 SNES Function norm 3.127643288444e-06
   1 SNES Function norm 2.856268473436e-06
   0 SNES Function norm 2.859601467528e-06
   1 SNES Function norm 2.652256663270e-06
   0 SNES Function norm 2.656159693713e-06
   1 SNES Function norm 2.441913463343e-06
   0 SNES Function norm 2.445150284738e-06
   1 SNES Function norm 2.278344482242e-06
   0 SNES Function norm 2.281486712130e-06
   1 SNES Function norm 2.103029318045e-06
   0 SNES Function norm 2.106211386567e-06
   1 SNES Function norm 1.964331371156e-06
   0 SNES Function norm 1.966849759503e-06
   1 SNES Function norm 1.810696243204e-06
   0 SNES Function norm 1.813785966515e-06
   1 SNES Function norm 1.687354052170e-06
   0 SNES Function norm 1.689386040768e-06
   1 SNES Function norm 1.547482290888e-06
   0 SNES Function norm 1.550386298970e-06
   1 SNES Function norm 1.433822659267e-06
   0 SNES Function norm 1.435480702989e-06
   1 SNES Function norm 1.304555798094e-06
   0 SNES Function norm 1.307111860772e-06
   1 SNES Function norm 1.198046210916e-06
   0 SNES Function norm 1.199411732087e-06
   1 SNES Function norm 1.081422595634e-06
   0 SNES Function norm 1.083449028051e-06
   1 SNES Function norm 9.830968831830e-07
   0 SNES Function norm 9.842234251113e-07
   1 SNES Function norm 8.855086519428e-07
   0 SNES Function norm 8.869842518810e-07
   1 SNES Function norm 7.998731801674e-07
   0 SNES Function norm 8.007990235925e-07
   1 SNES Function norm 7.261195998741e-07
   0 SNES Function norm 7.272386389219e-07
   1 SNES Function norm 6.574742981359e-07
   0 SNES Function norm 6.582469160706e-07
   1 SNES Function norm 6.046480447427e-07
   0 SNES Function norm 6.055573171444e-07
   1 SNES Function norm 5.521066971361e-07
   0 SNES Function norm 5.527888427820e-07
   1 SNES Function norm 5.131591511130e-07
   0 SNES Function norm 5.138950161970e-07
   1 SNES Function norm 4.719916657893e-07
   0 SNES Function norm 4.726374514023e-07
   1 SNES Function norm 4.410501843165e-07
   0 SNES Function norm 4.416397978779e-07
   1 SNES Function norm 4.066796284857e-07
   0 SNES Function norm 4.073201314750e-07
   1 SNES Function norm 3.800588432508e-07
   0 SNES Function norm 3.805341734658e-07
   1 SNES Function norm 3.494803569141e-07
   0 SNES Function norm 3.501194890697e-07
   1 SNES Function norm 3.250809122116e-07
   0 SNES Function norm 3.254677908094e-07
   1 SNES Function norm 2.968453459532e-07
   0 SNES Function norm 2.974534491508e-07
   1 SNES Function norm 2.737284114974e-07
   0 SNES Function norm 2.740438823187e-07
   1 SNES Function norm 2.478456871489e-07
   0 SNES Function norm 2.483645693917e-07
   1 SNES Function norm 2.261452863210e-07
   0 SNES Function norm 2.264003858477e-07
   1 SNES Function norm 2.037375639177e-07
   0 SNES Function norm 2.041250205393e-07
   1 SNES Function norm 1.844336993973e-07
   0 SNES Function norm 1.846388464984e-07
   1 SNES Function norm 1.665561229407e-07
   0 SNES Function norm 1.668317015767e-07
   1 SNES Function norm 1.506074213941e-07
   0 SNES Function norm 1.507759225050e-07
   1 SNES Function norm 1.371509852846e-07
   0 SNES Function norm 1.373607632193e-07
   1 SNES Function norm 1.246350412183e-07
   0 SNES Function norm 1.247799653796e-07
   1 SNES Function norm 1.146317945607e-07
   0 SNES Function norm 1.148014097677e-07
   1 SNES Function norm 1.048970461324e-07
   0 SNES Function norm 1.050273062955e-07
   1 SNES Function norm 9.728994148805e-08
   0 SNES Function norm 9.742878188548e-08
   1 SNES Function norm 8.953149842139e-08
   0 SNES Function norm 8.965265435783e-08
   1 SNES Function norm 8.349355443445e-08
   0 SNES Function norm 8.360692993720e-08
   1 SNES Function norm 7.704171483543e-08
   0 SNES Function norm 7.715744371062e-08
   1 SNES Function norm 7.198648220355e-08
   0 SNES Function norm 7.207905483442e-08
   1 SNES Function norm 6.635311896719e-08
   0 SNES Function norm 6.646499679894e-08
   1 SNES Function norm 6.187810314215e-08
   0 SNES Function norm 6.195398983492e-08
   1 SNES Function norm 5.674875032243e-08
   0 SNES Function norm 5.685486601093e-08
   1 SNES Function norm 5.259944647671e-08
   0 SNES Function norm 5.266190700744e-08
   1 SNES Function norm 4.785449692104e-08
   0 SNES Function norm 4.794837111572e-08
   1 SNES Function norm 4.393045881356e-08
   0 SNES Function norm 4.398179420191e-08
   1 SNES Function norm 3.968091389600e-08
   0 SNES Function norm 3.975482816426e-08
   1 SNES Function norm 3.606342738908e-08
   0 SNES Function norm 3.610526397501e-08
   1 SNES Function norm 3.255782266572e-08
   0 SNES Function norm 3.261156160535e-08
   1 SNES Function norm 2.945105435165e-08
   0 SNES Function norm 2.948506400165e-08
   1 SNES Function norm 2.679623999374e-08
   0 SNES Function norm 2.683697251398e-08
   1 SNES Function norm 2.432172702302e-08
   0 SNES Function norm 2.435014022093e-08
   1 SNES Function norm 2.237476284926e-08
   0 SNES Function norm 2.240761160898e-08
   1 SNES Function norm 2.046076378161e-08
   0 SNES Function norm 2.048590336946e-08
   1 SNES Function norm 1.899524939086e-08
   0 SNES Function norm 1.902205828524e-08
   1 SNES Function norm 1.748029937398e-08
   0 SNES Function norm 1.750388519879e-08
   1 SNES Function norm 1.631350242595e-08
   0 SNES Function norm 1.633531042890e-08
   1 SNES Function norm 1.505288235008e-08
   0 SNES Function norm 1.507584733947e-08
   1 SNES Function norm 1.406371795784e-08
   0 SNES Function norm 1.408147204135e-08
   1 SNES Function norm 1.295795371266e-08
   0 SNES Function norm 1.298044339805e-08
   1 SNES Function norm 1.207172419139e-08
   0 SNES Function norm 1.208623562537e-08
   1 SNES Function norm 1.106461098693e-08
   0 SNES Function norm 1.108589395563e-08
   1 SNES Function norm 1.024093176467e-08
   0 SNES Function norm 1.025282405427e-08
   1 SNES Function norm 9.317154310806e-09
   0 SNES Function norm 9.335705617465e-09
   1 SNES Function norm 8.546378037366e-09
   0 SNES Function norm 8.556114445692e-09
   1 SNES Function norm 7.727731739813e-09
   0 SNES Function norm 7.742145917713e-09
   1 SNES Function norm 7.028362105076e-09
   0 SNES Function norm 7.036321531561e-09
   1 SNES Function norm 6.351075907560e-09
   0 SNES Function norm 6.361474639652e-09
   1 SNES Function norm 5.753600250314e-09
   0 SNES Function norm 5.760151521862e-09
   1 SNES Function norm 5.230710679558e-09
   0 SNES Function norm 5.238484540351e-09
   1 SNES Function norm 4.749699735905e-09
   0 SNES Function norm 4.755217760576e-09
   1 SNES Function norm 4.359624605577e-09
   0 SNES Function norm 4.365869441452e-09
   1 SNES Function norm 3.983041709191e-09
   0 SNES Function norm 3.987871881819e-09
   1 SNES Function norm 3.689365356157e-09
   0 SNES Function norm 3.694508917556e-09
   1 SNES Function norm 3.391304202711e-09
   0 SNES Function norm 3.395725403389e-09
   1 SNES Function norm 3.160907020838e-09
   0 SNES Function norm 3.165126817268e-09
   1 SNES Function norm 2.915632749525e-09
   0 SNES Function norm 2.919833945934e-09
   1 SNES Function norm 2.724266923173e-09
   0 SNES Function norm 2.727713954716e-09
   1 SNES Function norm 2.512048579425e-09
   0 SNES Function norm 2.516107605158e-09
   1 SNES Function norm 2.343538962473e-09
   0 SNES Function norm 2.346358391243e-09
   1 SNES Function norm 2.151715111446e-09
   0 SNES Function norm 2.155564435535e-09
   1 SNES Function norm 1.996270578628e-09
   0 SNES Function norm 1.998582174740e-09
   1 SNES Function norm 1.819648863872e-09
   0 SNES Function norm 1.823054306503e-09
   1 SNES Function norm 1.673366366984e-09
   0 SNES Function norm 1.675257113041e-09
   1 SNES Function norm 1.514690811552e-09
   0 SNES Function norm 1.517365667098e-09
   1 SNES Function norm 1.379822600175e-09
   0 SNES Function norm 1.381356081290e-09
   1 SNES Function norm 1.246754128122e-09
   0 SNES Function norm 1.248653847053e-09
   1 SNES Function norm 1.129672110055e-09
   0 SNES Function norm 1.130910768553e-09
   1 SNES Function norm 1.026516150323e-09
   0 SNES Function norm 1.027895524425e-09
   1 SNES Function norm 9.316425819832e-10
   0 SNES Function norm 9.326629072544e-10
   1 SNES Function norm 8.549121471438e-10

The initial residual is different in first approach and second  
approach because the first approach has another scalar residual  
function F2 besides F1, and the second approach only have one residual  
function F1.

What could be wrong with the first approach history?

Thanks a lot!

Rebecca




Quoting Barry Smith <bsmith at mcs.anl.gov>:

>
>    If both on converging then there is something wrong with your
> function evaluation code for one or both of the two approaches. Or
> perhaps Newton is not actually converging and so you are getting an
> unconverged (wrong) solution. Make sure you always call
> SNESGetConvergedReason() to insure the nonlinear equations are actually
> be solved.
>
>
>    Barry
>
> On Feb 8, 2010, at 3:24 PM, (Rebecca) Xuefei YUAN wrote:
>
>> That is also confusing me when running this bad example. The good   
>> examples have matched solutions, but this bad one does not. I do   
>> not know what is wrong and where is the difference coming from?
>>
>>
>>
>>
>> Quoting Matthew Knepley <knepley at gmail.com>:
>>
>>> I am confused by b). If they both converge, how can the answers be
>>> different?
>>>
>>> Matt
>>>
>>> On Mon, Feb 8, 2010 at 3:13 PM, (Rebecca) Xuefei YUAN
>>> <xy2102 at columbia.edu>wrote:
>>>
>>>> Dear all,
>>>>
>>>> I do have an PDE-constrained optimization problem:
>>>>
>>>> F1(phi(x,y),c) = L(phi(x,y)) + rho(s1(x,y),s2(x,y)) = 0 (1)
>>>> F2(phi(x,y),c) = int_{domain}(c*rho(s1(x,y),s2(x,y)) - 1.0)dxdy = 0 (2)
>>>>
>>>> where phi(x,y) is defined at each grid point and c is a scalar parameter
>>>> that satisfying the equation (2).
>>>>
>>>> I have two pieces of codes to solve them by different approaches.
>>>>
>>>> The first approach is to use DMComposite() to manage unknowns and solve
>>>> F1&F2 at the same time, and it calls DMMGSolve() once.
>>>>
>>>> The second approach is to solve F1 with a guess c for some number(i.e. 1)
>>>> times of nonlinear and linear iteration, and then update c from   
>>>> F2. Solve F1
>>>> again with updated c till some conditions satisfied, for example,
>>>>
>>>> if (cres<1e-10){CONTINUE=PETSC_FALSE;} // update on c
>>>> if (functionNorm<1e-10){CONTINUE=PETSC_FALSE;}//residual function norm
>>>> if (reason>0){CONTINUE=PETSC_FALSE;}//snes_converged_reason
>>>> if (totalNumberOfNonlinearIterations>50){CONTINUE=PETSC_FALSE;}
>>>>
>>>> In this approach, DMMGSolve() was called more than once.
>>>>
>>>> Although these two approaches convergence, the results are quite   
>>>> different.
>>>>
>>>> My understanding is that
>>>> a) approach one updates c in each linear iteration, but approach two
>>>> updates c
>>>> only after several (i.e. 1) nonlinear iterations.
>>>>
>>>> ierr = DMMGSolve(dmmg);CHKERRQ(ierr);
>>>> parameters->c = parameters->integration/area;
>>>>
>>>> b) the results from two approaches should be the same or very   
>>>> close to each
>>>> other but due to some reasons, they are not.
>>>>
>>>> c) three different examples are tested by these two approaches, two are
>>>> good, but one is bad. The bad one is different from the other two because
>>>> the solution has large gradient at some points.
>>>>
>>>> d) the shortcoming of approach one is PETSc has not ready for assemble a
>>>> Jacobian for object DMComposite, so the second approach is able   
>>>> to write an
>>>> analytic Jacobian.
>>>>
>>>> Any thoughts about how to debug or compare these two approaches is
>>>> appreciate!~
>>>>
>>>>
>>>> Thanks a ton!
>>>>
>>>> Rebecca
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> (Rebecca) Xuefei YUAN
>>>> Department of Applied Physics and Applied Mathematics
>>>> Columbia University
>>>> Tel:917-399-8032
>>>> www.columbia.edu/~xy2102 <http://www.columbia.edu/%7Exy2102>
>>>>
>>>>
>>>
>>>
>>> --
>>> What most experimenters take for granted before they begin their   
>>> experiments
>>> is infinitely more interesting than any results to which their experiments
>>> lead.
>>> -- Norbert Wiener
>>>
>>
>>
>>
>> -- 
>> (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