anchor.diff:          stop
         end if
         this%ls=C_NULL_PTR
  +    end if
  +  end subroutine
  +  
  +  !> set this NewtonKrylov to skip initial prec. setup and has low prec. setup frequency
  +  subroutine setLazyPsetNewtonKrylov(this,skip,nit)
  +    class(NewtonKrylov),intent(inout)::this !< this NewtonKrylov
  +    logical,intent(in),optional::skip !< whether to skip initial prec. setup
  +    integer,intent(in),optional::nit !< maximum number of nonlinear iterations between prec. setups
  +    integer(C_INT)::info,c_nit
  +    logical(C_BOOL)::c_skip
  +    
  +    if(present(skip))then
  +      c_skip=skip
  +    else
  +      c_skip=.true.
  +    end if
  +    if(present(nit))then
  +      c_nit=nit
  +    else
  +      c_nit=100
  +    end if
  +    info=kinsetnoinitsetup(this%work,c_skip)
  +    if(info/=0)then
  +      write(*,'(a,i3)')"[E] setLazyPsetNewtonKrylov(): KINSetNoInitSetup error code ",info
  +      stop
  +    end if
  +    info=kinsetmaxsetupcalls(this%work,c_nit)
  +    if(info/=0)then
  +      write(*,'(a,i3)')"[E] setLazyPsetNewtonKrylov(): KINSetMaxSetupCalls error code ",info
  +      stop
       end if
     end subroutine
     
  
positive.code:       integer(C_INT)::kinsetmaa !< error code
      end function
      
      !> KINSOL get number of iterations performed for the non-linear system
      function kingetnumnonlinsolviters(mem,nit) bind(c,name='KINGetNumNonlinSolvIters')
        use iso_c_binding
  
negative.code:     procedure,public::init=>initNewtonKrylov
      procedure,public::solve=>solveNewtonKrylov
      procedure,public::clear=>clearNewtonKrylov
      procedure,public::setLazyPset=>setLazyPsetNewtonKrylov
      final::purgeNewtonKrylov
    end type
    
  