365 class(PetscSolverType) :: this
367 character(len=128) :: ksp_str, pc_str, subpc_str, &
368 dvclose_str, rclose_str, relax_str, dtol_str
369 character(len=128) :: ksp_logfile
372 petscviewer :: ksp_viewer
374 if (this%use_ims_pc)
then
375 call kspgettype(this%ksp_petsc, ksp_str, ierr)
377 call kspgetpc(this%ksp_petsc, pc, ierr)
379 call pcgettype(pc, pc_str, ierr)
381 subpc_str = this%pc_context%ims_pc_type
383 write (dvclose_str,
'(e15.5)') this%linear_settings%dvclose
384 write (rclose_str,
'(e15.5)') this%linear_settings%rclose
385 write (relax_str,
'(e15.5)') this%linear_settings%relax
386 write (dtol_str,
'(e15.5)') this%linear_settings%droptol
388 write (iout,
'(/,1x,a)')
"PETSc linear solver settings: "
389 write (iout,
'(1x,a)') repeat(
'-', 66)
390 write (iout,
'(1x,a,a)')
"Linear acceleration method: ", trim(ksp_str)
391 write (iout,
'(1x,a,a)')
"Preconditioner type: ", trim(pc_str)
392 write (iout,
'(1x,a,a)')
"Sub-preconditioner type: ", trim(subpc_str)
393 write (iout,
'(1x,a,i0)')
"Maximum nr. of iterations: ", &
394 this%linear_settings%iter1
395 write (iout,
'(1x,a,a)') &
396 "Dep. var. closure criterion: ", trim(adjustl(dvclose_str))
397 write (iout,
'(1x,a,a)') &
398 "Residual closure criterion: ", trim(adjustl(rclose_str))
399 if (this%use_ims_cnvgopt)
then
400 write (iout,
'(1x,a,i0)') &
401 "Residual convergence option: ", this%linear_settings%icnvgopt
403 write (iout,
'(1x,a)') &
404 "Residual convergence option: PETSc L2 norm"
406 write (iout,
'(1x,a,a)') &
407 "Relaxation factor MILU(T): ", trim(adjustl(relax_str))
408 write (iout,
'(1x,a,i0)') &
409 "Fill level in factorization: ", this%linear_settings%level
410 write (iout,
'(1x,a,a,/)') &
411 "Drop tolerance level fill: ", trim(adjustl(dtol_str))
413 ksp_logfile =
"ksp_logview.txt"
414 write (iout,
'(/,1x,a)')
"PETSc linear solver settings from .petscrc: "
415 write (iout,
'(1x,a)') repeat(
'-', 66)
416 write (iout,
'(1x,2a)')
"see ", trim(ksp_logfile)
419 call petscviewerasciiopen(petsc_comm_world, ksp_logfile, ksp_viewer, ierr);
421 call petscviewerpushformat(ksp_viewer, petsc_viewer_ascii_info_detail, ierr)
423 call kspview(this%ksp_petsc, ksp_viewer, ierr)
425 call petscviewerdestroy(ksp_viewer, ierr)