anchor.diff:      call OMP_SET_NUM_THREADS(4)
   
       ptr_jacobian => fjacobian
  -    ptr_f => f2
       !$OMP PARALLEL DO &
       !$OMP DEFAULT(SHARED) PRIVATE(nt)
       do i=1,numnodes
          nt = OMP_GET_THREAD_NUM()
          call integrate(nstroke_coordinates(i,:),node_coordinates(i,:),i,centres,weights,nt)
  -       gauss(i,6) = folding(i,dim_quad,nt)
  +       gauss(i,6) = folding(i,f2,dim_quad,nt)
       end do
       !$OMP END PARALLEL DO
       gauss(1,6) = 0.0
  
positive.code:     call OMP_SET_NUM_THREADS(4)
  
      ptr_jacobian => fjacobian2
      ptr_f => f
      !$OMP PARALLEL DO &
      !$OMP DEFAULT(SHARED) PRIVATE(nt)
      do i=1,numnodes
         nt = OMP_GET_THREAD_NUM()
         call integrate(nstroke_coordinates(i,:),node_coordinates(i,:),i,centres,weights,nt)
         intphi_under(i) = folding(i,dim_quad,nt)
      end do
      !$OMP END PARALLEL DO
    end subroutine calcomp2
  
negative.code:     return
    end subroutine integrate
  
    double precision function folding(ip,f,dim_quad,nt)
      use dbsym
      integer, intent(in) :: ip,nt, dim_quad
      interface
         function f(x,i)
           integer, intent(in) :: i
           double precision, intent(in), dimension(:) :: x
           double precision :: f
         end function f
      end interface
  
      integer Nk, iz, ik,nthread
      double precision gtmp, tmp
  