[petsc-users] Get Stuck in SNES
Matthew Knepley
knepley at gmail.com
Thu Nov 24 05:54:43 CST 2011
On Thu, Nov 24, 2011 at 5:37 AM, behzad baghapour <
behzad.baghapour at gmail.com> wrote:
> I meant that to do just one or two step in line search correction and let
> the solution goes on even if the error reduction may not reach the desired
> tolerance. It may help to reduce the computational cost especially in first
> iteration or in almost ill-conditioned situation where the Newton iteration
> may not holds the stability or does not lead to correct solution and a
> change in preconditioning is needed to overcome the situation.
>
http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/SNES/SNESSetMaxNonlinearStepFailures.html
Matt
> On Thu, Nov 24, 2011 at 2:39 PM, Matthew Knepley <knepley at gmail.com>wrote:
>
>> On Thu, Nov 24, 2011 at 5:00 AM, behzad baghapour <
>> behzad.baghapour at gmail.com> wrote:
>>
>>>
>>>
>>> On Wed, Nov 23, 2011 at 4:33 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
>>>
>>>> On Wed, Nov 23, 2011 at 01:06, behzad baghapour <
>>>> behzad.baghapour at gmail.com> wrote:
>>>>
>>>>> for( c=0; c<ne; c++ ) for( p=0; p<tot; p++ )
>>>>> FC->e[c].Q[p] = xx[c*(noe*num)+p];
>>>>>
>>>>
>>>> You haven't told me about "noe" or "num". Do you mean for this to read
>>>> xx[c*tot+p]?
>>>>
>>>
>>> noe is the number of equations (equal to number of flow states) and num
>>> is the number of shape functions in element (according to the order of
>>> accuracy)
>>>
>>>>
>>>>
>>>>>
>>>>> ierr = VecRestoreArray( x, &xx ); CHKERRQ( ierr );
>>>>>
>>>>> interiorFlux( FC->flw, FC->e );
>>>>> faceFlux ( FC->flw, FC->f, FC->e );
>>>>>
>>>>
>>>> The first of these should set FC->e (if you are adding into it, then
>>>> you need to zero it first) and the second should add into it.
>>>>
>>>
>>> I found that my mistake is that I forgot to set upwind effect in my
>>> defined field context. The problem was not stable, it is not related to
>>> SNES setup.
>>>
>>> However, I can't find out the difference between "basic" and
>>> "basicnonorms" in line search method.
>>>
>>
>> Basic takes the full Newton step, but checks for decrease. nonorms just
>> takes it and moves on.
>>
>>
>>> In addition, Is it possible to set the number of line-search corrections
>>> or is just decided by the solver?
>>>
>>
>> You can set a custom line search. I am not sure what you mean by this
>> "number of line search correctons"
>>
>> Matt
>>
>>
>>> Thanks a lot,
>>> BehZad
>>>
>>>
>>>
>>
>>
>> --
>> 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
>>
>
>
--
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111124/ff3afca1/attachment.htm>
More information about the petsc-users
mailing list