1!
2! Copyright (C) 2004 PWSCF group
3! This file is distributed under the terms of the
4! GNU General Public License. See the file `License'
5! in the root directory of the present distribution,
6! or http://www.gnu.org/copyleft/gpl.txt .
7!
8!
9!----------------------------------------------------------------------------
10subroutine nodeno(snlo,jj1,jj2,nodes,idim1)
11  !----------------------------------------------------------------------------
12  !
13  !   routine counts the number of nodes of the wavefunction snlo
14  !   between the points jj1 and jj2
15  !
16  use kinds, only : DP
17  implicit none
18  integer :: jj1,jj2,nodes,idim1
19  !
20  !   wavefunction array
21  !
22  real(DP) :: snlo(idim1)
23
24  integer :: i
25  !
26  nodes = 0
27  !
28  do i = jj1+1,jj2
29     if ( snlo(i-1) * snlo(i) .lt. 0.0_DP ) nodes = nodes + 1
30  enddo
31  return
32end subroutine nodeno
33