anchor.diff:      call hecmw_sainv_make_u_nn(hecMAT)
   
     end subroutine hecmw_precond_nn_SAINV_setup
  -
  -  subroutine hecmw_sainv_lu_nn()
  -    implicit none
  -    integer(kind=kint) :: i,j,js,je,in
  -    real(kind=kreal) :: X1, X2, X3, X(NDOF)
  -
  -    do i=1, N
  -      write(*,*)NDOF
  -      SAINVD(9*i-5) = SAINVD(9*i-5)*SAINVD(9*i-4)
  -      SAINVD(9*i-2) = SAINVD(9*i-2)*SAINVD(9*i  )
  -      SAINVD(9*i-1) = SAINVD(9*i-1)*SAINVD(9*i  )
  -    enddo
  -
  -    do i=1, N
  -      js = inumFI1L(i-1)+1
  -      je = inumFI1L(i)
  -      do j= js,je
  -        in= FI1L(j)
  -        X1= SAINVD(9*i-8)
  -        X2= SAINVD(9*i-4)
  -        X3= SAINVD(9*i  )
  -        SAINVL(9*j-8) = SAINVL(9*j-8)*X1
  -        SAINVL(9*j-7) = SAINVL(9*j-7)*X1
  -        SAINVL(9*j-6) = SAINVL(9*j-6)*X1
  -        SAINVL(9*j-5) = SAINVL(9*j-5)*X2
  -        SAINVL(9*j-4) = SAINVL(9*j-4)*X2
  -        SAINVL(9*j-3) = SAINVL(9*j-3)*X2
  -        SAINVL(9*j-2) = SAINVL(9*j-2)*X3
  -        SAINVL(9*j-1) = SAINVL(9*j-1)*X3
  -        SAINVL(9*j  ) = SAINVL(9*j  )*X3
  -      enddo
  -    enddo
  -
  -  end subroutine hecmw_sainv_lu_nn
   
     subroutine hecmw_precond_nn_SAINV_apply(R, ZP)
       implicit none
       real(kind=kreal), intent(inout)  :: ZP(:)
       real(kind=kreal), intent(in)  :: R(:)
  -    integer(kind=kint) :: in, i, j, isL, ieL, isU, ieU, k, iold, rcm
  -    real(kind=kreal) :: SW1, SW2, SW3, X1, X2, X3
  -
  -!$OMP PARALLEL DEFAULT(NONE) &
  -!$OMP&PRIVATE(i,X1,X2,X3,SW1,SW2,SW3,j,in,isL,ieL,isU,ieU) &
  -!$OMP&SHARED(N,SAINVD,SAINVL,SAINVU,inumFI1U,FI1U,inumFI1L,FI1L,R,T,ZP)
  -!$OMP DO
  -      !C-- FORWARD
  -      do i= 1, N
  -        SW1= 0.0d0
  -        SW2= 0.0d0
  -        SW3= 0.0d0
  -
  -        isL= inumFI1L(i-1)+1
  -        ieL= inumFI1L(i)
  -        do j= isL, ieL
  -          in= FI1L(j)
  -          X1= R(3*in-2)
  -          X2= R(3*in-1)
  -          X3= R(3*in  )
  -          SW1= SW1 + SAINVL(9*j-8)*X1 + SAINVL(9*j-7)*X2 + SAINVL(9*j-6)*X3
  -          SW2= SW2 + SAINVL(9*j-5)*X1 + SAINVL(9*j-4)*X2 + SAINVL(9*j-3)*X3
  -          SW3= SW3 + SAINVL(9*j-2)*X1 + SAINVL(9*j-1)*X2 + SAINVL(9*j  )*X3
  -        enddo
  -
  -        X1= R(3*i-2)
  -        X2= R(3*i-1)
  -        X3= R(3*i  )
  -
  -        T(3*i-2)= (X1 + SW1)*SAINVD(9*i-8)
  -        T(3*i-1)= (X2 + SAINVD(9*i-7)*X1 + SW2)*SAINVD(9*i-4)
  -        T(3*i  )= (X3 + SAINVD(9*i-6)*X1 + SAINVD(9*i-3)*X2 + SW3)*SAINVD(9*i  )
  -      enddo
  -!$OMP END DO
  -!$OMP DO
  -      !C-- BACKWARD
  -      do i= 1, N
  -        SW1= 0.0d0
  -        SW2= 0.0d0
  -        SW3= 0.0d0
  -
  -        isU= inumFI1U(i-1) + 1
  -        ieU= inumFI1U(i)
  -        do j= isU, ieU
  -          in= FI1U(j)
  -          X1= T(3*in-2)
  -          X2= T(3*in-1)
  -          X3= T(3*in  )
  -          SW1= SW1 + SAINVU(9*j-8)*X1 + SAINVU(9*j-7)*X2 + SAINVU(9*j-6)*X3
  -          SW2= SW2 + SAINVU(9*j-5)*X1 + SAINVU(9*j-4)*X2 + SAINVU(9*j-3)*X3
  -          SW3= SW3 + SAINVU(9*j-2)*X1 + SAINVU(9*j-1)*X2 + SAINVU(9*j  )*X3
  -        enddo
  -
  -        X1= T(3*i-2)
  -        X2= T(3*i-1)
  -        X3= T(3*i  )
  -
  -        ZP(3*i-2)= X1 + SW1 + SAINVD(9*i-7)*X2 + SAINVD(9*i-6)*X3
  -        ZP(3*i-1)= X2 + SW2 + SAINVD(9*i-3)*X3
  -        ZP(3*i  )= X3 + SW3
  -      enddo
  -!$OMP END DO
  -!$OMP END PARALLEL
  +    integer(kind=kint) :: in, i, j, isL, ieL, isU, ieU, k, iold, rcm,idof,jdof
  +    real(kind=kreal) :: SW(NDOF),X(NDOF)
  +
  +    !C-- FORWARD
  +    do i= 1, N
  +      do idof = 1, NDOF
  +        SW(idof) = 0.0d0
  +      end do 
  +      isL= inumFI1L(i-1)+1
  +      ieL= inumFI1L(i)
  +      do j= isL, ieL
  +        in= FI1L(j)
  +        do idof = 1, NDOF
  +          X(idof) = R(NDOF*(in-1)+idof)
  +        end do 
  +        do idof = 1, NDOF
  +          do jdof = 1, NDOF
  +            SW(idof) = SW(idof) + SAINVL(NDOF2*(j-1)+NDOF*(idof-1)+jdof)*X(jdof)
  +          end do 
  +        end do 
  +      enddo
  +      do idof = 1, NDOF
  +        X(idof) = R(NDOF*(i-1)+idof)
  +        T(NDOF*(i-1)+idof)=X(idof)+SW(idof)
  +      end do 
  +      do idof = 1, NDOF     
  +        do jdof = 1, idof-1
  +          T(NDOF*(i-1)+idof)=T(NDOF*(i-1)+idof)+SAINVD(NDOF2*(i-1)+NDOF*(jdof-1)+idof)*X(jdof)
  +        end do 
  +        T(NDOF*(i-1)+idof)=T(NDOF*(i-1)+idof)*SAINVD(NDOF2*(i-1)+NDOF*(idof-1)+idof)
  +      end do 
  +    enddo
  +
  +    !C-- BACKWARD
  +    do i= 1, N
  +      do idof = 1, NDOF
  +        SW(idof) = 0.0d0
  +      end do 
  +
  +      isU= inumFI1U(i-1) + 1
  +      ieU= inumFI1U(i)
  +      do j= isU, ieU
  +        in= FI1U(j)
  +        do idof = 1, NDOF
  +          X(idof) = T(NDOF*(in-1)+idof)
  +        end do 
  +        do idof = 1, NDOF
  +          do jdof = 1, NDOF
  +            SW(idof) = SW(idof) + SAINVU(NDOF2*(j-1)+NDOF*(idof-1)+jdof)*X(jdof)
  +          end do 
  +        end do 
  +      enddo
  +      
  +      do idof = 1, NDOF
  +        X(idof) = T(NDOF*(i-1)+idof)
  +      end do 
  +      do idof = 1, NDOF
  +        ZP(NDOF*(i-1)+idof) = X(idof) + SW(idof)
  +        do jdof = NDOF, idof+1, -1
  +          ZP(NDOF*(i-1)+idof) = ZP(NDOF*(i-1)+idof)+SAINVD(NDOF2*(i-1)+NDOF*(idof-1)+jdof)*X(jdof)
  +        end do 
  +      end do 
  +    enddo
   
     end subroutine hecmw_precond_nn_SAINV_apply
   
  
positive.code:   use m_hecmw_comm_f
    use hecmw_matrix_contact
    use hecmw_matrix_misc
    !$ use omp_lib
  
    private
  
  
negative.code:           if (o == i)then
              do idof = 1, NDOF
                do jdof = 1, NDOF
                  SAINVU(NDOF2*(n-1)+NDOF*(jdof-1)+idof)=SAINVL(NDOF2*(j-1)+NDOF*(idof-1)+jdof)
                end do 
              end do 
              n = n + 1
              cycle flag1
            endif
  