[petsc-users] non linear solver options
Dharmendar Reddy
dharmareddy84 at gmail.com
Sat Jan 18 17:35:41 CST 2014
On Sat, Jan 18, 2014 at 3:20 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>
> Does Newton’s method with SNESSetVariableBounds() fail to converge? Can you send the output of running with -ksp_monitor_true_residual -snes_monitor -snes_linesearch_monitor?
>
> I’m guessing you are trying to impose the additional conditions because Newton’s method "gets stuck”? Or why else do you want those additional constraints?
There is no issue with the convergence when i set the bounds. To
illustrate, i have Solved the problem with noBounds, wide range of
bounds and a narrow range of bounds (here it the solver should fail)
Please see the attache logs.
noBounds: resNoBounds.log
wideRange : resLargeRange.log
Narrow Range : resNarrowRange.log
At this point i solve only the non linear Poisson equation (F3). I am
working on implementing other equations. Based on my experience using
commercial tools for such problems and literature, i find that these
coupled equation may require some kind of adaptive damping to
stabilize. So i was trying to get some idea on how i should design the
code. I have my own user options preprocessor, so i may need to
provide interface for appropriate snes options.
I have also attached the screen shot of the solution. Left side is the
correct solution obtained using nobounds. With large bounds also looks
similar. Right side is the solution with narrow bounds.
Thanks
Reddy
>
> Barry
>
> On Jan 18, 2014, at 2:52 PM, Dharmendar Reddy <dharmareddy84 at gmail.com> wrote:
>
>> Hello,
>> I am solving a set of equations with SNES
>> F1 (x1,x2,x3) = 0
>> F2 (x1,x2,x3) = 0
>> F3 (x1,x2,x3) = 0
>>
>> The system of equations is shown on page 1 of pdf here
>> http://dunham.ee.washington.edu/ee531/notes/SemiRev.pdf
>>
>> F1 = equation 1
>> F2 = equation 2
>> F3 = equation 5
>>
>> x1 = n, X2=p and X3 = psi,
>> X1 and X2 have an exponential dependance on X1
>> after i scale the variables, X3 typically varies between say +/- 100
>> where as X1 and X2 vary between 0 to 2. norm(X) then may usually
>> dominated by solution values of X3.
>>
>> Can you suggest me the snes options that i need to use to achieve the following:
>>
>> 1. X1 > 0 and X2 > 0 (as per previous emails, i can use SNESSetVariableBounds)
>> 2. I want the updates to solution to have an adaptive stepping based
>> on norm of (F) or norm(X). If norm(F) is decreasing as the iteration
>> progresss, larger stepping others wise reduce the step size..
>> Similarly for Norm of X.
>>
>> Can i get the work done with existing petsc routines/ options ?
>>
>> Do i need to impliment the update method via SNESPOSTCheck ?
>>
>>
>> Thanks
>> Reddy
>
--
-----------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: resLargeRange.log
Type: application/octet-stream
Size: 15719 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140118/905d46d6/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: resNarrowRange.log
Type: application/octet-stream
Size: 2508 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140118/905d46d6/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: resNoBounds.log
Type: application/octet-stream
Size: 15719 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140118/905d46d6/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Solution.png
Type: image/png
Size: 69787 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140118/905d46d6/attachment-0001.png>
More information about the petsc-users
mailing list