Hello,

to compute / approximate the condition number of a MATSBAIJ, I put

-ksp_view

# Conditon number estimate
-pc_type none
-ksp_type gmres
-ksp_monitor_singular_value
-ksp_gmres_restart 1000

in my .petscrc

Output is like:

[...]
566 KSP Residual norm 1.241765807317e-07 % max 7.020130499234e+02 min 
6.429054752025e-04 max/min 1.091938203983e+06
567 KSP Residual norm 1.219340847328e-07 % max 7.020130499278e+02 min 
6.423976501709e-04 max/min 1.092801397609e+06
568 KSP Residual norm 1.198886059519e-07 % max 7.020130499320e+02 min 
6.419283878172e-04 max/min 1.093600257062e+06
569 KSP Residual norm 1.178377018879e-07 % max 7.020130499362e+02 min 
6.414517591235e-04 max/min 1.094412853268e+06
KSP Object: 8 MPI processes
  type: gmres
    GMRES: restart=1000, using Classical (unmodified) Gram-Schmidt 
Orthogonalization with no iterative refinement
    GMRES: happy breakdown tolerance 1e-30
  maximum iterations=10000
  tolerances:  relative=1e-09, absolute=1e-50, divergence=10000.
  left preconditioning
  using nonzero initial guess
  using PRECONDITIONED norm type for convergence test
PC Object: 8 MPI processes
  type: none
  linear system matrix = precond matrix:
  Mat Object:  C   8 MPI processes
    type: mpisbaij
    rows=14404, cols=14404
    total: nonzeros=1059188, allocated nonzeros=1244312
    total number of mallocs used during MatSetValues calls =75272
        block size is 1
(0) 13:30:20 [precice::impl::SolverInterfaceImpl]:380 in initialize: it 1 of 1 
| dt# 1 | t 0 of 1 | dt 1 | max dt 1 |
ongoing yes | dt complete no |
(0) 13:30:20 [precice::mapping::PetRadialBasisFctMapping]:519 in map: Mapping 
Data consistent from MeshA (ID 0) to MeshB
(ID 1)
  0 KSP Residual norm 1.178378120697e-07 % max 1.000000000000e+00 min 
1.000000000000e+00 max/min 1.000000000000e+00
KSP Object: 8 MPI processes
  type: gmres
    GMRES: restart=1000, using Classical (unmodified) Gram-Schmidt 
Orthogonalization with no iterative refinement
    GMRES: happy breakdown tolerance 1e-30
  maximum iterations=10000
  tolerances:  relative=1e-09, absolute=1e-50, divergence=10000.
  left preconditioning
  using nonzero initial guess
  using PRECONDITIONED norm type for convergence test
PC Object: 8 MPI processes
  type: none
  linear system matrix = precond matrix:
  Mat Object:  C   8 MPI processes
    type: mpisbaij
    rows=14404, cols=14404
    total: nonzeros=1059188, allocated nonzeros=1244312
    total number of mallocs used during MatSetValues calls =75272
        block size is 1


The approximate condition number is the max/min value, 1.094412853268e+06 here?

Just make sure my mathematical illerateracy does not spoil my report...


Best thanks,
Florian

Reply via email to