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 subroutine specificheats(inpc,textpart,shcon,nshcon, 20 & nmat,ntmat_,irstrt,istep,istat,n,iline,ipol,inl,ipoinp, 21 & inp,ipoinpc,ier) 22! 23! reading the input deck: *SPECIFIC HEAT 24! 25 implicit none 26! 27 character*1 inpc(*) 28 character*132 textpart(16) 29! 30 integer nshcon(*),nmat,ntmat,ntmat_,istep,istat,n,ipoinpc(0:*), 31 & key,irstrt(*),iline,ipol,inl,ipoinp(2,*),inp(3,*),i,ier 32! 33 real*8 shcon(0:3,ntmat_,*) 34! 35 ntmat=0 36! 37 if((istep.gt.0).and.(irstrt(1).ge.0)) then 38 write(*,*) 39 & '*ERROR reading *SPECIFIC HEAT: *SPECIFIC HEAT should be' 40 write(*,*) ' placed before all step definitions' 41 ier=1 42 return 43 endif 44! 45 if(nmat.eq.0) then 46 write(*,*) 47 & '*ERROR reading *SPECIFIC HEAT: *SPECIFIC HEAT should be' 48 write(*,*) ' preceded by a *MATERIAL card' 49 ier=1 50 return 51 endif 52! 53 do i=2,n 54 write(*,*) 55 & '*WARNING reading *SPECIFIC HEAT: parameter not recognized:' 56 write(*,*) ' ', 57 & textpart(i)(1:index(textpart(i),' ')-1) 58 call inputwarning(inpc,ipoinpc,iline, 59 &"*SPECIFIC HEAT%") 60 enddo 61! 62 do 63 call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl, 64 & ipoinp,inp,ipoinpc) 65 if((istat.lt.0).or.(key.eq.1)) return 66 ntmat=ntmat+1 67 nshcon(nmat)=ntmat 68 if(ntmat.gt.ntmat_) then 69 write(*,*) '*ERROR reading *SPECIFIC HEAT: increase ntmat_' 70 ier=1 71 return 72 endif 73 read(textpart(1)(1:20),'(f20.0)',iostat=istat) 74 & shcon(1,ntmat,nmat) 75 if(istat.gt.0) then 76 call inputerror(inpc,ipoinpc,iline, 77 & "*SPECIFIC HEAT%",ier) 78 return 79 endif 80 read(textpart(2)(1:20),'(f20.0)',iostat=istat) 81 & shcon(0,ntmat,nmat) 82 if(istat.gt.0) then 83 call inputerror(inpc,ipoinpc,iline, 84 & "*SPECIFIC HEAT%",ier) 85 return 86 endif 87 enddo 88! 89 return 90 end 91 92