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 fluidconstantss(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: *FLUID CONSTANTS
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 *FLUID CONSTANTS: *FLUID CONSTANTS 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 *FLUID CONSTANTS: *FLUID CONSTANTS 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 *FLUID CONSTANTS: parameter not recognized:'
56         write(*,*) '         ',
57     &        textpart(i)(1:index(textpart(i),' ')-1)
58         call inputwarning(inpc,ipoinpc,iline,
59     &"*FLUID CONSTANTS%")
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(*,*)
70     &          '*ERROR reading *FLUID CONSTANTS: increase ntmat_'
71            ier=1
72            return
73         endif
74         read(textpart(1)(1:20),'(f20.0)',iostat=istat)
75     &        shcon(1,ntmat,nmat)
76         if(istat.gt.0) then
77            call inputerror(inpc,ipoinpc,iline,
78     &           "*FLUID CONSTANTS%",ier)
79            return
80         endif
81         read(textpart(2)(1:20),'(f20.0)',iostat=istat)
82     &        shcon(2,ntmat,nmat)
83         if(istat.gt.0) then
84            call inputerror(inpc,ipoinpc,iline,
85     &           "*FLUID CONSTANTS%",ier)
86            return
87         endif
88         read(textpart(3)(1:20),'(f20.0)',iostat=istat)
89     &        shcon(0,ntmat,nmat)
90         if(istat.gt.0) then
91            call inputerror(inpc,ipoinpc,iline,
92     &           "*FLUID CONSTANTS%",ier)
93            return
94         endif
95      enddo
96!
97      return
98      end
99
100