anchor.diff:            enddo !nd
             
          endif !num_seeds_from_elem
  +!       write(*,'('' '',i6,'','')', advance = "no") num_seeds_from_elem(ne_min)
       enddo !N
       
       do N=1,num_next_parents
  
positive.code:     deallocate(map_seed_to_space)
      deallocate(num_seeds_from_elem)
  
  !    write(*,*) 'before smooth'
  !    write(*,*) 'node 73: ',node_xyz(1:3,73)
  !    write(*,*) 'node 79: ',node_xyz(1:3,79)
  !    call smooth_1d_tree(ne_start,length_limit)
      
  !    write(*,*) 'after smooth'
  !    write(*,*) 'node 73: ',node_xyz(1:3,73)
  !    write(*,*) 'node 79: ',node_xyz(1:3,79)
      
      call enter_exit(sub_name,2)
      
  
negative.code:                 ne = local_parent(noelem)
                  np = elem_nodes(2,ne)
                  dist = distance_between_points(data_xyz(1,nd),node_xyz(1,np))
                  if(dist.lt.(min_dist+zero_tol))then
  !                if(DIST.lt.MIN_DIST)then
                     ne_min = ne
                     MIN_DIST=DIST
                  endif
               enddo
               if(min_dist.lt.distance_limit/real(elem_ordrs(no_gen,ne_min),kind=dp)+zero_tol)then !keep seed points
  !             if(min_dist.lt.distance_limit/real(elem_ordrs(no_gen,ne_min),kind=dp))then !keep seed points
                  map_array(nd)=ne_min
               else
                  map_array(nd)=0 !too far from branch ends, so discard
               endif
  