CalculiX  2.13
A Free Software Three-Dimensional Structural Finite Element Program
expansions.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine expansions (inpc, textpart, alcon, nalcon, alzero, nmat, ntmat_, irstrt, istep, istat, n, iline, ipol, inl, ipoinp, inp, ipoinpc)
 

Function/Subroutine Documentation

◆ expansions()

subroutine expansions ( character*1, dimension(*)  inpc,
character*132, dimension(16)  textpart,
real*8, dimension(0:6,ntmat_,*)  alcon,
integer, dimension(2,*)  nalcon,
real*8, dimension(*)  alzero,
integer  nmat,
integer  ntmat_,
integer  irstrt,
integer  istep,
integer  istat,
integer  n,
integer  iline,
integer  ipol,
integer  inl,
integer, dimension(2,*)  ipoinp,
integer, dimension(3,*)  inp,
integer, dimension(0:*)  ipoinpc 
)
22 !
23 ! reading the input deck: *EXPANSION
24 !
25  implicit none
26 !
27  character*1 inpc(*)
28  character*132 textpart(16)
29 !
30  integer nalcon(2,*),nmat,ntmat,ntmat_,istep,istat,n,
31  & ipoinpc(0:*),
32  & i,ityp,key,irstrt,iline,ipol,inl,ipoinp(2,*),inp(3,*)
33 !
34  real*8 alcon(0:6,ntmat_,*),alzero(*)
35 !
36  ntmat=0
37  alzero(nmat)=0.d0
38 !
39  if((istep.gt.0).and.(irstrt.ge.0)) then
40  write(*,*)
41  & '*ERROR reading *EXPANSION: *EXPANSION should be placed'
42  write(*,*) ' before all step definitions'
43  call exit(201)
44  endif
45 !
46  if(nmat.eq.0) then
47  write(*,*)
48  & '*ERROR reading *EXPANSION: *EXPANSION should be preceded'
49  write(*,*) ' by a *MATERIAL card'
50  call exit(201)
51  endif
52 !
53  ityp=1
54 !
55  do i=2,n
56  if(textpart(i)(1:5).eq.'TYPE=') then
57  if(textpart(i)(6:8).eq.'ISO') then
58  ityp=1
59  elseif(textpart(i)(6:10).eq.'ORTHO') then
60  ityp=3
61  elseif(textpart(i)(6:10).eq.'ANISO') then
62  ityp=6
63  endif
64  elseif(textpart(i)(1:5).eq.'ZERO=') then
65  read(textpart(i)(6:25),'(f20.0)',iostat=istat) alzero(nmat)
66  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
67  &"*EXPANSION%")
68  else
69  write(*,*)
70  & '*WARNING reading *EXPANSION: parameter not recognized:'
71  write(*,*) ' ',
72  & textpart(i)(1:index(textpart(i),' ')-1)
73  call inputwarning(inpc,ipoinpc,iline,
74  &"*EXPANSION%")
75  endif
76  enddo
77 !
78  nalcon(1,nmat)=ityp
79 !
80  if(ityp.eq.1) then
81  do
82  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
83  & ipoinp,inp,ipoinpc)
84  if((istat.lt.0).or.(key.eq.1)) return
85  ntmat=ntmat+1
86  nalcon(2,nmat)=ntmat
87  if(ntmat.gt.ntmat_) then
88  write(*,*) '*ERROR reading *EXPANSION: increase ntmat_'
89  call exit(201)
90  endif
91  do i=1,1
92  read(textpart(i)(1:20),'(f20.0)',iostat=istat)
93  & alcon(i,ntmat,nmat)
94  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
95  &"*EXPANSION%")
96  enddo
97  read(textpart(2)(1:20),'(f20.0)',iostat=istat)
98  & alcon(0,ntmat,nmat)
99  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
100  &"*EXPANSION%")
101  enddo
102  elseif(ityp.eq.3) then
103  do
104  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
105  & ipoinp,inp,ipoinpc)
106  if((istat.lt.0).or.(key.eq.1)) return
107  ntmat=ntmat+1
108  nalcon(2,nmat)=ntmat
109  if(ntmat.gt.ntmat_) then
110  write(*,*) '*ERROR reading *EXPANSION: increase ntmat_'
111  call exit(201)
112  endif
113  do i=1,3
114  read(textpart(i)(1:20),'(f20.0)',iostat=istat)
115  & alcon(i,ntmat,nmat)
116  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
117  &"*EXPANSION%")
118  enddo
119  read(textpart(4)(1:20),'(f20.0)',iostat=istat)
120  & alcon(0,ntmat,nmat)
121  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
122  &"*EXPANSION%")
123  enddo
124  elseif(ityp.eq.6) then
125  do
126  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
127  & ipoinp,inp,ipoinpc)
128  if((istat.lt.0).or.(key.eq.1)) return
129  ntmat=ntmat+1
130  nalcon(2,nmat)=ntmat
131  if(ntmat.gt.ntmat_) then
132  write(*,*) '*ERROR reading *EXPANSION: increase ntmat_'
133  call exit(201)
134  endif
135  do i=1,6
136  read(textpart(i)(1:20),'(f20.0)',iostat=istat)
137  & alcon(i,ntmat,nmat)
138  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
139  &"*EXPANSION%")
140  enddo
141  read(textpart(7)(1:20),'(f20.0)',iostat=istat)
142  & alcon(0,ntmat,nmat)
143  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
144  &"*EXPANSION%")
145  enddo
146  endif
147 !
148  return
subroutine inputwarning(inpc, ipoinpc, iline, text)
Definition: inputwarning.f:20
subroutine getnewline(inpc, textpart, istat, n, key, iline, ipol, inl, ipoinp, inp, ipoinpc)
Definition: getnewline.f:21
subroutine inputerror(inpc, ipoinpc, iline, text)
Definition: inputerror.f:20
Hosted by OpenAircraft.com, (Michigan UAV, LLC)