anchor.diff:                  deallocate(phinew(i)%p)
                   allocate(phinew(i)%p(ry(i)*ry(i)*ra(i)*2))
                end if
  -             call dphi_right(ry(i), n(i), ry(i+1), ry(i), n(i), ry(i+1), ra(i), ra(i+1), phinew(i+1)%p, crA(pa(i)), crnew(i)%p, crnew(i)%p, phinew(i)%p)
  +             call dphi_right(ry(i), n(i), ry(i+1), ry(i), n(i), ry(i+1), ra(i), &
  +             ra(i+1), phinew(i+1)%p, crA(pa(i)), crnew(i)%p, crnew(i)%p, phinew(i)%p)
             end if
          end if
          if ( dir > 0 ) then
  
positive.code:           if ( i < d ) then
               call dqr(ry(i)*n(i),ry(i+1),crnew(i)%p,R)
               !The size of the updated s would be ry(i+1) -> 
               call dphi_left(ry(i), n(i), ry(i+1), ry(i), n(i), ry(i+1), ra(i), ra(i+1), phinew(i)%p, crA(pa(i)), crnew(i)%p, crnew(i)%p, phitmp)
               call dinit_sfun(ry(i+1), ry(i+1), ra(i+1), ry(i+1), ry(i+1), phitmp, phinew(i+1)%p)
               anorm = normest(ry(i+1)*ry(i+1),4,dsfun_matvec,dsfun_matvec_transp)
               call exp_mv(ry(i+1)*ry(i+1), 30, -tau/2, R, Stmp, eps, anorm, dsfun_matvec)
  
negative.code:                 deallocate(phinew(i+1)%p)
                  allocate(phinew(i+1)%p(ry(i+1)*ry(i+1)*ra(i+1)*2))
               end if
               call dphi_left(ry(i), n(i), ry(i+1), ry(i), n(i), ry(i+1), ra(i), &
               ra(i+1), phinew(i)%p, crA(pa(i)), crnew(i)%p, crnew(i)%p, phinew(i+1)%p)
            end if
         end if
  
  