!{\src2tex{textfont=tt}}
!!****f* ABINIT/ptg_C4v
!!
!! NAME
!! ptg_C4v
!!
!! FUNCTION
!!
!! COPYRIGHT
!! Copyright (C) 2010-2014 ABINIT group (MG)
!! This file is distributed under the terms of the
!! GNU General Public License, see ~abinit/COPYING
!! or http://www.gnu.org/copyleft/gpl.txt .
!! For the initials of contributors, see ~abinit/doc/developers/contributors.txt .
!!
!! INPUTS
!!
!! OUTPUT
!!
!! PARENTS
!!      m_ptgroups
!!
!! CHILDREN
!!
!! SOURCE
!!
!********************************************************************************
! This include file has been automatically generated by the script ptg.py
! Do not edit! Change the script source instead.
!********************************************************************************

! Point group name  C4v  (4mm)

#if defined HAVE_CONFIG_H
#include "config.h"
#endif

#include "abi_common.h"

 subroutine ptg_C4v (nsym,nclass,sym,class_ids,class_names,Irr)
 use defs_basis
 use m_profiling
 use m_defs_ptgroups,  only : irrep_t

!This section has been created automatically by the script Abilint (TD).
!Do not modify the following lines by hand.
#undef ABI_FUNC
#define ABI_FUNC 'ptg_C4v'
!End of the abilint section

 implicit none
!Arguments ------------------------------------
 integer,intent(out) :: nclass,nsym 
 !arrays
 integer,allocatable,intent(out) :: sym(:,:,:), class_ids(:,:)
 character(len=5),allocatable,intent(out) :: class_names(:)
 type(irrep_t),allocatable,intent(out) :: Irr(:)
 !Local variables-------------------------------
 complex(dpc) :: j=(0.0_dp,1.0_dp) 
 ! ********************************************************************************
! List of symmetries packed in classes
 nsym = 8
 ABI_MALLOC(sym, (3,3,nsym))
 sym(:,:,1) = RESHAPE( (/1, 0, 0, 0, 1, 0, 0, 0, 1/) ,(/3,3/) )
 sym(:,:,2) = RESHAPE( (/-1, 0, 0, 0, -1, 0, 0, 0, 1/) ,(/3,3/) )
 sym(:,:,3) = RESHAPE( (/0, 1, 0, -1, 0, 0, 0, 0, 1/) ,(/3,3/) )
 sym(:,:,4) = RESHAPE( (/0, -1, 0, 1, 0, 0, 0, 0, 1/) ,(/3,3/) )
 sym(:,:,5) = RESHAPE( (/1, 0, 0, 0, -1, 0, 0, 0, 1/) ,(/3,3/) )
 sym(:,:,6) = RESHAPE( (/-1, 0, 0, 0, 1, 0, 0, 0, 1/) ,(/3,3/) )
 sym(:,:,7) = RESHAPE( (/0, -1, 0, -1, 0, 0, 0, 0, 1/) ,(/3,3/) )
 sym(:,:,8) = RESHAPE( (/0, 1, 0, 1, 0, 0, 0, 0, 1/) ,(/3,3/) )

! Number of classes and corresponding indeces
 nclass = 5
 ABI_MALLOC(class_ids, (2,nclass))
 class_ids(1,1) = 1
 class_ids(2,1) = 1
 class_ids(1,2) = 2
 class_ids(2,2) = 2
 class_ids(1,3) = 3
 class_ids(2,3) = 4
 class_ids(1,4) = 5
 class_ids(2,4) = 6
 class_ids(1,5) = 7
 class_ids(2,5) = 8

ABI_MALLOC(class_names,(5))
 class_names(1) = "1+" 
 class_names(2) = "2+" 
 class_names(3) = "4+" 
 class_names(4) = "-2+" 
 class_names(5) = "-2+" 

! List of irreducible representations.
 ABI_DT_MALLOC(Irr, (5))
 Irr(1)%name = "A1"
 Irr(1)%dim = 1
 Irr(1)%nsym = 8
 ABI_MALLOC(Irr(1)%mat, (1,1,8))
 Irr(1)%mat(:,:,1) =  RESHAPE( (/1.0/), (/1, 1/) )
 Irr(1)%mat(:,:,2) =  RESHAPE( (/1.0/), (/1, 1/) )
 Irr(1)%mat(:,:,3) =  RESHAPE( (/1.0/), (/1, 1/) )
 Irr(1)%mat(:,:,4) =  RESHAPE( (/1.0/), (/1, 1/) )
 Irr(1)%mat(:,:,5) =  RESHAPE( (/1.0/), (/1, 1/) )
 Irr(1)%mat(:,:,6) =  RESHAPE( (/1.0/), (/1, 1/) )
 Irr(1)%mat(:,:,7) =  RESHAPE( (/1.0/), (/1, 1/) )
 Irr(1)%mat(:,:,8) =  RESHAPE( (/1.0/), (/1, 1/) )

 Irr(2)%name = "A2"
 Irr(2)%dim = 1
 Irr(2)%nsym = 8
 ABI_MALLOC(Irr(2)%mat, (1,1,8))
 Irr(2)%mat(:,:,1) =  RESHAPE( (/1.0/), (/1, 1/) )
 Irr(2)%mat(:,:,2) =  RESHAPE( (/1.0/), (/1, 1/) )
 Irr(2)%mat(:,:,3) =  RESHAPE( (/1.0/), (/1, 1/) )
 Irr(2)%mat(:,:,4) =  RESHAPE( (/1.0/), (/1, 1/) )
 Irr(2)%mat(:,:,5) =  RESHAPE( (/-1.0/), (/1, 1/) )
 Irr(2)%mat(:,:,6) =  RESHAPE( (/-1.0/), (/1, 1/) )
 Irr(2)%mat(:,:,7) =  RESHAPE( (/-1.0/), (/1, 1/) )
 Irr(2)%mat(:,:,8) =  RESHAPE( (/-1.0/), (/1, 1/) )

 Irr(3)%name = "B1"
 Irr(3)%dim = 1
 Irr(3)%nsym = 8
 ABI_MALLOC(Irr(3)%mat, (1,1,8))
 Irr(3)%mat(:,:,1) =  RESHAPE( (/1.0/), (/1, 1/) )
 Irr(3)%mat(:,:,2) =  RESHAPE( (/1.0/), (/1, 1/) )
 Irr(3)%mat(:,:,3) =  RESHAPE( (/-1.0/), (/1, 1/) )
 Irr(3)%mat(:,:,4) =  RESHAPE( (/-1.0/), (/1, 1/) )
 Irr(3)%mat(:,:,5) =  RESHAPE( (/1.0/), (/1, 1/) )
 Irr(3)%mat(:,:,6) =  RESHAPE( (/1.0/), (/1, 1/) )
 Irr(3)%mat(:,:,7) =  RESHAPE( (/-1.0/), (/1, 1/) )
 Irr(3)%mat(:,:,8) =  RESHAPE( (/-1.0/), (/1, 1/) )

 Irr(4)%name = "B2"
 Irr(4)%dim = 1
 Irr(4)%nsym = 8
 ABI_MALLOC(Irr(4)%mat, (1,1,8))
 Irr(4)%mat(:,:,1) =  RESHAPE( (/1.0/), (/1, 1/) )
 Irr(4)%mat(:,:,2) =  RESHAPE( (/1.0/), (/1, 1/) )
 Irr(4)%mat(:,:,3) =  RESHAPE( (/-1.0/), (/1, 1/) )
 Irr(4)%mat(:,:,4) =  RESHAPE( (/-1.0/), (/1, 1/) )
 Irr(4)%mat(:,:,5) =  RESHAPE( (/-1.0/), (/1, 1/) )
 Irr(4)%mat(:,:,6) =  RESHAPE( (/-1.0/), (/1, 1/) )
 Irr(4)%mat(:,:,7) =  RESHAPE( (/1.0/), (/1, 1/) )
 Irr(4)%mat(:,:,8) =  RESHAPE( (/1.0/), (/1, 1/) )

 Irr(5)%name = "E"
 Irr(5)%dim = 2
 Irr(5)%nsym = 8
 ABI_MALLOC(Irr(5)%mat, (2,2,8))
 Irr(5)%mat(:,:,1) =  RESHAPE( (/1.0, 0.0, 0.0, 1.0/), (/2, 2/) )
 Irr(5)%mat(:,:,2) =  RESHAPE( (/-1.0, 0.0, 0.0, -1.0/), (/2, 2/) )
 Irr(5)%mat(:,:,3) =  RESHAPE( (/1*j, 0*j, 0*j, -0-1*j/), (/2, 2/) )
 Irr(5)%mat(:,:,4) =  RESHAPE( (/-0-1*j, 0*j, 0*j, 1*j/), (/2, 2/) )
 Irr(5)%mat(:,:,5) =  RESHAPE( (/0.0, 1.0, 1.0, 0.0/), (/2, 2/) )
 Irr(5)%mat(:,:,6) =  RESHAPE( (/0.0, -1.0, -1.0, 0.0/), (/2, 2/) )
 Irr(5)%mat(:,:,7) =  RESHAPE( (/0*j, 1*j, -0-1*j, 0*j/), (/2, 2/) )
 Irr(5)%mat(:,:,8) =  RESHAPE( (/0*j, -0-1*j, 1*j, 0*j/), (/2, 2/) )

 RETURN
  if (.FALSE.) write(std_out,*) j
 end subroutine ptg_C4v 
!!***
