[petsc-users] residual norm with TSPSEUDO
Praveen C
cpraveen at gmail.com
Wed Jun 13 10:54:05 CDT 2018
Hello Barry
I am working in Fortran :-(
I can see the residual if I use -info but it prints too much information. Is it possible to reduce the amount of log messages printed to screen, some sort of log-level ???
Thanks
praveen
> On 13-Jun-2018, at 8:29 PM, Smith, Barry F. <bsmith at mcs.anl.gov> wrote:
>
> Take a look at TSPseudoMonitorDefault() in src/ts/impls/pseudo/posindep.c
>
> The problem is that you need to expose
>
> typedef struct {
> Vec update; /* work vector where new solution is formed */
> Vec func; /* work vector where F(t[i],u[i]) is stored */
> Vec xdot; /* work vector for time derivative of state */
>
> /* information used for Pseudo-timestepping */
>
> PetscErrorCode (*dt)(TS,PetscReal*,void*); /* compute next timestep, and related context */
> void *dtctx;
> PetscErrorCode (*verify)(TS,Vec,void*,PetscReal*,PetscBool*); /* verify previous timestep and related context */
> void *verifyctx;
>
> PetscReal fnorm_initial,fnorm; /* original and current norm of F(u) */
> PetscReal fnorm_previous;
>
> PetscReal dt_initial; /* initial time-step */
> PetscReal dt_increment; /* scaling that dt is incremented each time-step */
> PetscReal dt_max; /* maximum time step */
> PetscBool increment_dt_from_initial_dt;
> PetscReal fatol,frtol;
> } TS_Pseudo;
>
> inside your application code (that is make a copy of this struct definition and put it in your code so you can access the fields).
>
> Barry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180613/e39d1f7a/attachment-0001.html>
More information about the petsc-users
mailing list