      subroutine compt
      use module
      implicit real(8) (a-h,o-x,z),logical(1)(y)
      !
      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      ! dimension des classes TP
      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      !
      yw=.false.
      idimtp=0
      ! TP= 0/0
      idimtp(1)=1
      !
      ! TP= 0/1
      idimtp(2)=nlcv
      idimtp(3)=nlcv
      !
      ! TP= 1/0
      idimtp(7)=nlco
      idimtp(8)=nlco
      !
      ! TP= 1/1
      idimtp(9)=nlpair
      idimtp(10)=nlpair
      idimtp(11)=nlpair
      idimtp(12)=nlpair
      !
      if(igener>1) then
      ! TP= 0/2
         idimtp(4)=nlcv*(nlcv-1)/2
         idimtp(5)=nlcv*nlcv
         idimtp(6)=nlcv*(nlcv-1)/2
      !
      ! TP= 2/0
         idimtp(19)=nlco*(nlco-1)/2
         idimtp(20)=nlco*nlco
         idimtp(21)=nlco*(nlco-1)/2
      !
         if(igener>2) then
      ! TP= 1/2
            idimtp(13)=npcovv
            idimtp(14)=npcovv*2+npcovv_pe
            idimtp(15)=npcovv
            idimtp(16)=npcovv
            idimtp(17)=npcovv*2+npcovv_pe
            idimtp(18)=npcovv
      !
      ! TP= 2/1
            idimtp(22)=npcoov
            idimtp(23)=npcoov
            idimtp(24)=npcoov*2+npcoov_te
            idimtp(25)=npcoov*2+npcoov_te
            idimtp(26)=npcoov
            idimtp(27)=npcoov
      !
            if(igener==4) then
      ! TP= 2/2
               idimtp(28)=nppaaaa
               idimtp(29)=nppaaaa*2+npp_pe
               idimtp(30)=nppaaaa
               idimtp(31)=nppaaaa*2+npp_te
               idimtp(32)=nppaaaa*4+(npp_te+npp_pe)*2+npp_tepe
               idimtp(33)=nppaaaa*2+npp_te
               idimtp(34)=nppaaaa
               idimtp(35)=nppaaaa*2+npp_pe
               idimtp(36)=nppaaaa
            endif
         endif
      endif
      !
      if(yw) then
         do k=1,36
            print*,'idimtp',k,idimtp(k)
         enddo
      endif
!      !
!      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!      ! On somme les classes TP compatibles
       !
       ! c'est a dire correspondant a la meme classe CAS
       ! exemple les classes TP iclpt(nta,ntb,npa,npb)
       ! pour nta,ntb,npa,npb = 0,0,0,0,   1,0,1,0,    0,1,0,1,
       ! 1,1,1,1    2,0,2,0   0,2,0,2
       ! (classes TP numeros 1,9,12,32,28,36)
       ! correspondent a la meme classe de CAS (ica=0,icb=0)
!      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!      !
      isdimtp=0
      isdimtp(9)=idimtp(1)
      isdimtp(12)=isdimtp(9)+idimtp(9)
      isdimtp(13)=idimtp(2)
      isdimtp(14)=idimtp(3)
      isdimtp(17)=isdimtp(13)+idimtp(13)
      isdimtp(18)=isdimtp(14)+idimtp(14)
!      !
      isdimtp(22)=isdimtp(7)+idimtp(7)
      isdimtp(24)=isdimtp(8)+idimtp(8)
      isdimtp(25)=isdimtp(22)+idimtp(22)
      isdimtp(27)=isdimtp(24)+idimtp(24)
      isdimtp(28)=isdimtp(12)+idimtp(12)
      isdimtp(29)=isdimtp(10)+idimtp(10)
      isdimtp(31)=isdimtp(11)+idimtp(11)
      isdimtp(32)=isdimtp(28)+idimtp(28)
      isdimtp(33)=isdimtp(29)+idimtp(29)
      isdimtp(35)=isdimtp(31)+idimtp(31)
      isdimtp(36)=isdimtp(32)+idimtp(32)
      if(yw) then
         do k=1,36
            print*,'isdimtp',k,isdimtp(k)
         enddo
      endif
      return
      end
