Re: [petsc-users] Question on PetscViewerFileSetMode

2022-08-30 Thread Barry Smith
You should only use PetscViewerFileSetMode to APPEND when you first create the viewer. You would only set it to APPEND if you destroy and recreate the viewer for each time-step. The append tells the viewer that when it opens the file it should move its pointer to the end of the file

[petsc-users] Question on PetscViewerFileSetMode

2022-08-30 Thread Yuyun Yang
Hello team, I recently updated by PETSc version and this error emerged: "Cannot change mode to APPEND after setup" I used to use PetscViewerFileSetMode to set the mode as WRITE when I first initiate the file, and for following time steps I set it to APPEND to open the existing file and append