TABLE OF CONTENTS
ABINIT/blow_pawuj [ Functions ]
NAME
blow_pawuj
FUNCTION
This subroutine reads a real nxn matrice and appends lines n+1 and clumn n+1 containing the sum of the lines
COPYRIGHT
Copyright (C) 1998-2017 ABINIT group (DJA) 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
mat(nj,nj) matrix to be completed
OUTPUT
matt(nj+1,nj+1) completed matrix
PARENTS
pawuj_utils
CHILDREN
SOURCE
31 #if defined HAVE_CONFIG_H 32 #include "config.h" 33 #endif 34 35 #include "abi_common.h" 36 37 38 subroutine blow_pawuj(mat,nj,matt) 39 40 use defs_basis 41 42 !This section has been created automatically by the script Abilint (TD). 43 !Do not modify the following lines by hand. 44 #undef ABI_FUNC 45 #define ABI_FUNC 'blow_pawuj' 46 !End of the abilint section 47 48 implicit none 49 50 !Arguments ------------------------------------ 51 !scalars 52 integer,intent(in) :: nj 53 !arrays 54 real(dp),intent(in) :: mat(nj,nj) 55 real(dp),intent(out) :: matt(nj+1,nj+1) 56 57 !Local variables------------------------------- 58 !scalars 59 integer :: ii 60 !arrays 61 62 ! ************************************************************************* 63 64 matt(1:nj,1:nj)=mat 65 do ii = 1,nj 66 matt(ii,nj+1)=-sum(matt(ii,1:nj)) 67 end do 68 69 do ii = 1,nj+1 70 matt(nj+1,ii)=-sum(matt(1:nj,ii)) 71 end do 72 73 end subroutine blow_pawuj