1! 2! CalculiX - A 3-dimensional finite element program 3! Copyright (C) 1998-2021 Guido Dhondt 4! 5! This program is free software; you can redistribute it and/or 6! modify it under the terms of the GNU General Public License as 7! published by the Free Software Foundation(version 2); 8! 9! 10! This program is distributed in the hope that it will be useful, 11! but WITHOUT ANY WARRANTY; without even the implied warranty of 12! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13! GNU General Public License for more details. 14! 15! You should have received a copy of the GNU General Public License 16! along with this program; if not, write to the Free Software 17! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18! 19! y=A*x for real sparse matrices (symmetric and non-symmetric) 20! 21! storage of the matrix in a: 22! - first the lower triangular terms 23! - then, if the matrix is non-symmetric, the upper triangular terms 24! - finally the diagonal terms 25! 26 subroutine predgmres_struct(n,b,x,nelt,ia,ja,a,isym,itol,tol, 27 & itmax,iter,err,ierr,iunit,sb,sx,rgwk,lrgw,igwk,ligw,rwork,iwork) 28! 29 implicit none 30! 31 integer n,nelt,ia(*),ja(*),isym,itol,itmax,iter,ierr, 32 & iunit,lrgw,igwk(*),ligw,iwork(*) 33! 34 real*8 b(*),x(*),a(*),tol,err,sb(*),sx(*),rgwk(*), 35 & rwork(*) 36! 37 external matvec_struct,msolve_struct 38! 39 itol=0 40 tol=1.e-6 41 itmax=0 42 iunit=0 43! 44 igwk(1)=10 45 igwk(2)=10 46 igwk(3)=0 47 igwk(4)=1 48 igwk(5)=10 49 ligw=20 50! 51 call dgmres(n,b,x,nelt,ia,ja,a,isym,matvec_struct, 52 & msolve_struct,itol,tol,itmax, 53 & iter,err,ierr,iunit,sb,sx,rgwk,lrgw,igwk,ligw,rwork,iwork) 54! 55 return 56 end 57