anchor.diff:           write (stream,*) 'Not a Cartesian Mesh!!!'
            M=Mesh_New()
            M%ngf=A%nrows
  +         M%ninner=M%ngf
            M%nlf=A%nrows
          else
            call Mesh_BuildSquare(M,n)
  +         M%ninner=M%ngf
          endif
        else ! numprocs>1
          M=Mesh_New()
  
positive.code:  !endif
    write(stream,*) 'CHECK: The norm of the error is ', &
           sqrt(Vect_dot_product(r,r)/Vect_dot_product(xchk,xchk))
    deallocate(xchk)
    deallocate(r)
  
    if (numprocs>1) then
      ! Assemble result on master
  
negative.code:   case default
       call DOUG_abort('[DOUG main] : Unrecognised input type.', -1)
    end select
    if (numprocs==1.or.sctls%levels>1) then !todo remove
      ! Testing aggregation: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
      if (sctls%strong1>0) then
        strong_conn1=sctls%strong1
      else
        strong_conn1=0.67_rk
      endif
      call SpMtx_find_strong(A,strong_conn1)
      if (sctls%radius1>0) then
        aggr_radius1=sctls%radius1
      else
        aggr_radius1=2
      endif
      if (sctls%minasize1>0) then
        min_asize1=sctls%minasize1
      else
         ! Changes R. Scheichl 21/06/05
        ! min_asize1=2*aggr_radius1+1
         min_asize1=0.5_rk*(2*aggr_radius1+1)**2
      endif
      if (sctls%maxasize1>0) then
        max_asize1=sctls%maxasize1
      else
        max_asize1=(2*aggr_radius1+1)**2
      endif
      call SpMtx_aggregate(A,aggr_radius1, &
             minaggrsize=min_asize1,       &
             maxaggrsize=max_asize1,       &
             alpha=strong_conn1)
      
      call SpMtx_unscale(A)
      ! todo: to be rewritten with aggr%starts and aggr%nodes...:
      
      call Mesh_printInfo(M)
      write (stream,*) sctls%plotting, M%nell
      
      if (numprocs==1.and.sctls%plotting==2.and.M%nell>0) then
        call Mesh_pl2D_plotAggregate(A%aggr,M,&
                        A%strong_rowstart,A%strong_colnrs,&
                        mctls%assembled_mtx_file, &
                                   INIT_CONT_END=D_PLPLOT_INIT)
                                   !D_PLPLOT_END)
      endif
      
      ! .. Testing aggregationAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
      
      ! Testing coarse matrix and aggregation through it:
      call IntRestBuild(A,Restrict)
      call CoarseMtxBuild(A,AC,Restrict)
     
      !write(stream,*)'A coarse (local) is:=================='
      !call SpMtx_printRaw(A=AC)
      !call MPI_BARRIER(MPI_COMM_WORLD,i)
      !call DOUG_abort('testing parallel AC',0)
      
      if (numprocs==1) then
        if (sctls%strong2>0) then
          strong_conn2=sctls%strong2
        else
          strong_conn2=strong_conn1/2.0_rk
        endif
        call SpMtx_find_strong(AC,strong_conn2)
      
        if (sctls%radius2>0) then
          aggr_radius2=sctls%radius2
        else
           aggr_radius2=nint(3*sqrt(dble(n))/(2*aggr_radius1+1)-1)
           write (stream,*) 'Coarse aggregation radius aggr_radius2 =',aggr_radius2
        endif
        if (sctls%minasize2>0) then
          min_asize2=sctls%minasize2
        elseif (sctls%radius2>0) then
          min_asize2=2*sctls%radius2+1
        else
          min_asize2=0.5_rk*(2*aggr_radius2+1)**2
        endif
        if (sctls%maxasize2>0) then
          max_asize2=sctls%maxasize2
        else
          !max_asize2=max_asize1
          max_asize2=(2*aggr_radius2+1)**2
        endif
        call SpMtx_aggregate(AC,aggr_radius2, &
             minaggrsize=min_asize2,          &
             maxaggrsize=max_asize2,          &
             alpha=strong_conn2,              &
             Afine=A)
      
        call SpMtx_unscale(AC)
        if (sctls%plotting==2.and.M%nell>0) then
          !print *,'press Key<Enter>'
          !read *,str
          call Mesh_pl2D_plotAggregate(A%aggr,M,&
                          A%strong_rowstart,A%strong_colnrs,&
                          mctls%assembled_mtx_file, &
                          caggrnum=AC%aggr%num, &
                        INIT_CONT_END=D_PLPLOT_END)!, &
                        !INIT_CONT_END=D_PLPLOT_CONT)!, &
                                    ! D_PLPLOT_END)
        endif
        write(stream,*)'# coarse aggregates:',AC%aggr%nagr
      endif 
    endif
    ! Testing UMFPACK:
    allocate(sol(A%nrows))
    allocate(rhs(A%ncols))
  