[petsc-users] Change SNES/TS setting from inside context

behzad baghapour behzad.baghapour at gmail.com
Thu Oct 27 09:18:15 CDT 2011


So, I should define a monitor context "mon" and a function like "Monitor"
which I want to change whatever I wand during each SNES iteration then pass
it to the function
SNESMonitorSet<http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/SNES/SNESMonitorSet.html#SNESMonitorSet>(
snes, Monitor, &mon, 0 );

So is it correct?




On Thu, Oct 27, 2011 at 5:16 PM, Matthew Knepley <knepley at gmail.com> wrote:

> On Thu, Oct 27, 2011 at 12:44 PM, behzad baghapour <
> behzad.baghapour at gmail.com> wrote:
>
>> Dear All,
>>
>> 1- Is there any way to change the setting of SNES within its iteration
>> process? ( for example, changing PC type or fill level due to some reasons )
>>
>>
>
> Yes,
>
>   SNESGetKSP()
>   KSPGetPC()
>   PC***()
>
> I would probably put this code in a SNES monitor.
>
>    Matt
>
> 2- page 120 of PETSc manual (TS): "For location-dependent
>> pseudo-timestepping, the interface function has not yet been created."
>> Is there any way to control time-step locally? (This is due to variable
>> time updating usually needed in PDE solution)
>>
>> Thanks a lot,
>> B. B.
>>
>> --
>> ==================================
>> Behzad Baghapour
>> Ph.D. Candidate, Mechecanical Engineering
>> University of Tehran, Tehran, Iran
>> https://sites.google.com/site/behzadbaghapour
>> Fax: 0098-21-88020741
>> ==================================
>>
>>
>
>
> --
> 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
>



-- 
==================================
Behzad Baghapour
Ph.D. Candidate, Mechecanical Engineering
University of Tehran, Tehran, Iran
https://sites.google.com/site/behzadbaghapour
Fax: 0098-21-88020741
==================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111027/4d01233f/attachment.htm>


More information about the petsc-users mailing list