[petsc-users] Output newton step

Barry Smith bsmith at mcs.anl.gov
Tue Dec 1 13:29:14 CST 2015


> On Dec 1, 2015, at 1:22 PM, Alex Lindsay <adlinds3 at ncsu.edu> wrote:
> 
> Thanks Barry that helps a lot. It looks like the defaults for me (PetSc 3.6.0 release) are stdout for -ksp_view_solution and draw for -snes_monitor_solution_update. I don't see any binary files generated with the defaults.

  You can use -ksp_view_solution binary:filename to save each in the file 

  To get anything more than the draw for -snes_monitor_solution_update you have to upgrade to master to be able save as binary

  Barry

> 
> On 11/30/2015 05:56 PM, Barry Smith wrote:
>>> On Nov 30, 2015, at 2:19 PM, Alex Lindsay <adlinds3 at ncsu.edu> wrote:
>>> 
>>> Is there an option for outputting the Newton step after my linear solve?
>>> 
>>> Alex
>>    Do you want the solution of the linear system before the line search (line search may shrink the vector) use -ksp_view_solution or the actual update selected by Newton -snes_monitor_solution_update
>> 
>>    If you use the master branch of PETSc then both of these flags take the option
>> 
>>     [ascii or binary or draw][:filename][:viewer format]
>> 
>>   allowing printing as ascii, binary or drawing the solution in a window (Drawing only works for DMDA 1d or 2d).
>> 
>>    Barry
>> 
>>   For the release version of PETSc it saves the vectors in a binary file called binaryoutput
>> 
>> 
>> 
>> 
>> 
> 



More information about the petsc-users mailing list