anchor.diff:        real*8  xs(4),ys(4),zs(3)  
         real*8  dx(3),dy(3),dz(2)  
         integer xn(3),yn(3),zn(2) 
  -      integer xnn,ynn,znn
  +      integer xnn,ynn,znn 
  +      
  +      integer meshf
  +      logical ex
   
         real*8, allocatable :: x(:),y(:),z(:)
   
  
positive.code:       zs(2)=0.161d0
        zs(3)=1.0d0
  
        dx(:) = 0.15d0
        dy(:) = 0.15d0
        dz(:) = 0.15d0
  
        write(*,*) "Get Refinement"
        call getrefine(xs,dx,xsn,xn)
  
negative.code:          else
             NNODZ2 = NNODZ2+1           
             xg2(NNODZ2,:) = xg(i,:)
             o2n(i)=NNODZ2-1
           endif    
    
        end do
  
        NEL2 = 0
        do i = 1, NEL
          if ( (o2n(IEN(i,1)+1).ge.0).and.(o2n(IEN(i,2)+1).ge.0).and.
       &       (o2n(IEN(i,3)+1).ge.0).and.(o2n(IEN(i,4)+1).ge.0).and.
       &       (o2n(IEN(i,5)+1).ge.0).and.(o2n(IEN(i,6)+1).ge.0).and.
       &       (o2n(IEN(i,7)+1).ge.0).and.(o2n(IEN(i,8)+1).ge.0)) then
            xn = (xg(IEN(i,1)+1,:) + xg(IEN(i,2)+1,:)
       &       +  xg(IEN(i,3)+1,:) + xg(IEN(i,4)+1,:)   
       &       +  xg(IEN(i,5)+1,:) + xg(IEN(i,6)+1,:) 
       &       +  xg(IEN(i,7)+1,:) + xg(IEN(i,8)+1,:))/8d0   
           
            if ((xn(1).gt.x0).and.(xn(1).lt.x1).and.
       &        (xn(2).gt.y0).and.(xn(2).lt.y1).and.
  