[petsc-users] TS_SUNDIALS/TS_PSEUDO overshoots the final time
Gautam Bisht
gbisht at lbl.gov
Thu Oct 30 18:17:23 CDT 2014
All,
While running src/ts/examples/tutorials/ex8.c (in PETSc 3.5.1) for TSTYPE
sundials and pseudo, I noticed that the solver overshoots the final time.
./ex8 -ts_monitor -ts_type sundials -ts_final_time 0.01 -ts_view
0 TS dt 0.001 time 0
1 TS dt 0.0001 time 0.0001
2 TS dt 0.0001 time 0.0002
3 TS dt 0.0001 time 0.0003
4 TS dt 0.000199571 time 0.000499571
5 TS dt 0.000199571 time 0.000699141
6 TS dt 0.000199571 time 0.000898712
7 TS dt 0.000199571 time 0.00109828
8 TS dt 0.000404911 time 0.00150319
9 TS dt 0.000804269 time 0.00230746
10 TS dt 0.00141825 time 0.00372572
11 TS dt 0.00141825 time 0.00514397
12 TS dt 0.00141825 time 0.00656222
13 TS dt 0.00141825 time 0.00798047
14 TS dt 0.00141825 time 0.00939873
15 TS dt 0.00193698 time 0.0113357
TS Object: 1 MPI processes
type: sundials
maximum steps=1000
maximum time=0.01
total number of nonlinear solver iterations=18
total number of nonlinear solve failures=0
total number of linear solver iterations=18
total number of rejected steps=0
Sundials integrater does not use SNES!
Sundials integrater type BDF: backward differentiation formula
Sundials abs tol 1e-06 rel tol 1e-06
Sundials linear solver tolerance factor 0.05
Sundials max dimension of Krylov subspace 5
Sundials using unmodified (classical) Gram-Schmidt for orthogonalization
in GMRES
Sundials suggested factor for tolerance scaling 1
Sundials cumulative number of internal steps 15
Sundials no. of calls to rhs function 33
Sundials no. of calls to linear solver setup function 0
Sundials no. of error test failures 3
Sundials no. of nonlinear solver iterations 32
Sundials no. of nonlinear convergence failure 0
Sundials no. of linear iterations 18
Sundials no. of linear convergence failures 0
PC Object: 1 MPI processes
type: none
PC has not been set up so information may be incomplete
Sundials no. of preconditioner evaluations 0
Sundials no. of preconditioner solves 0
Sundials no. of Jacobian-vector product evaluations 18
Sundials no. of rhs calls for finite diff. Jacobian-vector evals 18
steps 15 (0 rejected, 0 SNES fails), ftime 0.0113357, nonlinits 18, linits
18
step 15 t=1.13357082e-02 h= 1.94e-03 |x|= 1.07e-01 |x_e|= 1.07e-01
|x-x_e|= 2.57e-06
./ex8 -ts_monitor -ts_type pseudo -ts_final_time 0.01
0 TS dt 0.001 time 0
1 TS dt 0.0011 time 0.0011
2 TS dt 0.00122331 time 0.00232331
3 TS dt 0.00136211 time 0.00368542
4 TS dt 0.00151873 time 0.00520415
5 TS dt 0.00169599 time 0.00690014
6 TS dt 0.00189725 time 0.00879739
7 TS dt 0.0021266 time 0.010924
TS Object: 1 MPI processes
type: pseudo
maximum steps=1000
maximum time=0.01
total number of nonlinear solver iterations=7
total number of nonlinear solve failures=0
total number of linear solver iterations=7
total number of rejected steps=0
SNES Object: 1 MPI processes
type: ksponly
maximum iterations=50, maximum function evaluations=10000
tolerances: relative=1e-08, absolute=1e-50, solution=1e-08
total number of linear solver iterations=1
total number of function evaluations=1
SNESLineSearch Object: 1 MPI processes
type: basic
maxstep=1.000000e+08, minlambda=1.000000e-12
tolerances: relative=1.000000e-08, absolute=1.000000e-15,
lambda=1.000000e-08
maximum iterations=1
KSP Object: 1 MPI processes
type: gmres
GMRES: restart=30, using Classical (unmodified) Gram-Schmidt
Orthogonalization with no iterative refinement
GMRES: happy breakdown tolerance 1e-30
maximum iterations=10000, initial guess is zero
tolerances: relative=1e-05, absolute=1e-50, divergence=10000
left preconditioning
using PRECONDITIONED norm type for convergence test
PC Object: 1 MPI processes
type: ilu
ILU: out-of-place factorization
0 levels of fill
tolerance for zero pivot 2.22045e-14
using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
matrix ordering: natural
factor fill ratio given 1, needed 1
Factored matrix follows:
Mat Object: 1 MPI processes
type: seqaij
rows=1, cols=1
package used to perform factorization: petsc
total: nonzeros=1, allocated nonzeros=1
total number of mallocs used during MatSetValues calls =0
not using I-node routines
linear system matrix = precond matrix:
Mat Object: 1 MPI processes
type: seqaij
rows=1, cols=1
total: nonzeros=1, allocated nonzeros=5
total number of mallocs used during MatSetValues calls =0
not using I-node routines
steps 7 (0 rejected, 0 SNES fails), ftime 0.010924, nonlinits 7, linits 7
step 7 t=1.09239877e-02 h= 2.13e-03 |x|= 1.03e-01 |x_e|= 1.03e-01
|x-x_e|= 7.93e-04
Is there an option to ensure that the TS doesn't overshoot the final time?
Thanks,
Gautam.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20141030/fdbb8f07/attachment.html>
More information about the petsc-users
mailing list