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