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

Go to the source code of this file.

Functions/Subroutines

subroutine hyperfoams (inpc, textpart, elcon, nelcon, nmat, ntmat_, ncmat_, irstrt, istep, istat, n, iperturb, iline, ipol, inl, ipoinp, inp, ipoinpc)
 

Function/Subroutine Documentation

◆ hyperfoams()

subroutine hyperfoams ( character*1, dimension(*)  inpc,
character*132, dimension(16)  textpart,
real*8, dimension(0:ncmat_,ntmat_,*)  elcon,
integer, dimension(2,*)  nelcon,
integer  nmat,
integer  ntmat_,
integer  ncmat_,
integer  irstrt,
integer  istep,
integer  istat,
integer  n,
integer, dimension(*)  iperturb,
integer  iline,
integer  ipol,
integer  inl,
integer, dimension(2,*)  ipoinp,
integer, dimension(3,*)  inp,
integer, dimension(0:*)  ipoinpc 
)
22 !
23 ! reading the input deck: *HYPERFOAM
24 !
25  implicit none
26 !
27  character*1 inpc(*)
28  character*132 textpart(16)
29 !
30  integer nelcon(2,*),nmat,ntmat,ntmat_,istep,istat,ipoinpc(0:*),
31  & n,key,i,ityp,iperturb(*),iend,ncmat_,irstrt,iline,ipol,inl,
32  & ipoinp(2,*),inp(3,*)
33 !
34  real*8 elcon(0:ncmat_,ntmat_,*)
35 !
36  ntmat=0
37  iperturb(1)=3
38  iperturb(2)=1
39  write(*,*) '*INFO reading *HYPERFOAM: nonlinear geometric'
40  write(*,*) ' effects are turned on'
41  write(*,*)
42 !
43  if((istep.gt.0).and.(irstrt.ge.0)) then
44  write(*,*) '*ERROR reading *HYPERFOAM: *HYPERFOAM should be'
45  write(*,*) ' placed before all step definitions'
46  call exit(201)
47  endif
48 !
49  if(nmat.eq.0) then
50  write(*,*) '*ERROR reading *HYPERFOAM: *HYPERFOAM should be'
51  write(*,*) ' preceded by a *MATERIAL card'
52  call exit(201)
53  endif
54 !
55  ityp=-15
56 !
57  do i=2,n
58  if(textpart(i)(1:2).eq.'N=') then
59  if(textpart(i)(3:3).eq.'1') then
60  elseif(textpart(i)(3:3).eq.'2') then
61  ityp=-16
62  elseif(textpart(i)(3:3).eq.'3') then
63  ityp=-17
64  else
65  write(*,*) '*WARNING reading *HYPERFOAM: only N=1, N=2, o
66  &r N=3 are allowed; '
67  call inputerror(inpc,ipoinpc,iline,
68  &"*HYPERFOAM%")
69  endif
70  else
71  write(*,*)
72  & '*WARNING reading *HYPERFOAM: parameter not recognized:'
73  write(*,*) ' ',
74  & textpart(i)(1:index(textpart(i),' ')-1)
75  call inputwarning(inpc,ipoinpc,iline,
76  &"*HYPERFOAM%")
77  endif
78  enddo
79 !
80  nelcon(1,nmat)=ityp
81 !
82  if(ityp.ne.-17) then
83  if(ityp.eq.-15) then
84  iend=3
85  elseif(ityp.eq.-16) then
86  iend=6
87  endif
88  do
89  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
90  & ipoinp,inp,ipoinpc)
91  if((istat.lt.0).or.(key.eq.1)) return
92  ntmat=ntmat+1
93  nelcon(2,nmat)=ntmat
94  if(ntmat.gt.ntmat_) then
95  write(*,*) '*ERROR reading *HYPERFOAM: increase ntmat_'
96  call exit(201)
97  endif
98  do i=1,iend
99  read(textpart(i)(1:20),'(f20.0)',iostat=istat)
100  & elcon(i,ntmat,nmat)
101  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
102  &"*HYPERFOAM%")
103  enddo
104  read(textpart(3)(1:20),'(f20.0)',iostat=istat)
105  & elcon(0,ntmat,nmat)
106  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
107  &"*HYPERFOAM%")
108  enddo
109  else
110  do
111  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
112  & ipoinp,inp,ipoinpc)
113  if((istat.lt.0).or.(key.eq.1)) return
114  ntmat=ntmat+1
115  nelcon(2,nmat)=ntmat
116  if(ntmat.gt.ntmat_) then
117  write(*,*) '*ERROR reading *HYPERFOAM: increase ntmat_'
118  call exit(201)
119  endif
120  do i=1,8
121  read(textpart(i)(1:20),'(f20.0)',iostat=istat)
122  & elcon(i,ntmat,nmat)
123  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
124  &"*HYPERFOAM%")
125  enddo
126 !
127  iend=1
128  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
129  & ipoinp,inp,ipoinpc)
130  if((istat.lt.0).or.(key.eq.1)) then
131  write(*,*)
132  & '*ERROR reading *HYPERFOAM: orthotropic definition'
133  write(*,*) ' is not complete. '
134  call inputerror(inpc,ipoinpc,iline,
135  &"*HYPERFOAM%")
136  call exit(201)
137  endif
138  do i=1,iend
139  read(textpart(i)(1:20),'(f20.0)',iostat=istat)
140  & elcon(8+i,ntmat,nmat)
141  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
142  &"*HYPERFOAM%")
143  enddo
144  read(textpart(2)(1:20),'(f20.0)',iostat=istat)
145  & elcon(0,ntmat,nmat)
146  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
147  &"*HYPERFOAM%")
148  enddo
149  endif
150 !
151  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)