inv.F90

Go to the documentation of this file.
00001 subroutine invmat(nm,mat)
00002   implicit none 
00003   integer,intent(in)::nm
00004   real(8),intent(inout)::mat(nm,nm)
00005   integer::ipiv(nm)
00006   integer::Lwork 
00007   real(8),allocatable::work(:)
00008   integer::info 
00009 
00010   Lwork = 10*nm
00011   allocate(work(Lwork))
00012   info = 0
00013   call dgetrf(nm,nm,mat,nm,ipiv,info)
00014   call dgetri(nm,mat,nm,ipiv,work,Lwork,info)
00015   if(info /= 0) then
00016    write(6,*)'info (subrouitine inv):',info
00017    stop
00018   end if 
00019   deallocate(work)
00020   return 
00021 end subroutine
00022 

Generated on 17 Nov 2020 for respack by  doxygen 1.6.1