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

Go to the source code of this file.

Functions/Subroutines

subroutine sectionprints (inpc, textpart, set, istartset, iendset, ialset, nset, nset_, nalset, nprint, nprint_, jout, prlab, prset, sectionprint_flag, ithermal, istep, istat, n, iline, ipol, inl, ipoinp, inp, amname, nam, itpamp, idrct, ipoinpc, cfd)
 

Function/Subroutine Documentation

◆ sectionprints()

subroutine sectionprints ( character*1, dimension(*)  inpc,
character*132, dimension(16)  textpart,
character*81, dimension(*)  set,
integer, dimension(*)  istartset,
integer, dimension(*)  iendset,
integer, dimension(*)  ialset,
integer  nset,
integer  nset_,
integer  nalset,
integer  nprint,
integer  nprint_,
integer, dimension(2)  jout,
character*6, dimension(*)  prlab,
character*81, dimension(*)  prset,
logical  sectionprint_flag,
integer  ithermal,
integer  istep,
integer  istat,
integer  n,
integer  iline,
integer  ipol,
integer  inl,
integer, dimension(2,*)  ipoinp,
integer, dimension(3,*)  inp,
character*80, dimension(*)  amname,
integer  nam,
integer  itpamp,
integer  idrct,
integer, dimension(0:*)  ipoinpc,
integer  cfd 
)
23 !
24 ! reading the *NODE PRINT cards in the input deck
25 !
26  implicit none
27 !
28  logical sectionprint_flag
29 !
30  character*1 total,nodesys,inpc(*)
31  character*6 prlab(*)
32  character*80 amname(*),timepointsname
33  character*81 set(*),prset(*),noset
34  character*132 textpart(16),name
35 !
36  integer istartset(*),iendset(*),ialset(*),ii,i,nam,itpamp,
37  & jout(2),joutl,ithermal,nset,nset_,nalset,nprint,nprint_,istep,
38  & istat,n,key,ipos,iline,ipol,inl,ipoinp(2,*),inp(3,*),idrct,
39  & ipoinpc(0:*),cfd
40 !
41  if(istep.lt.1) then
42  write(*,*) '*ERROR reading *SECTION PRINT: *SECTION PRINT'
43  write(*,*) ' should only be used within a *STEP'
44  write(*,*) ' definition'
45  call exit(201)
46  endif
47 !
48  nodesys='G'
49 !
50 ! reset the facial print requests (nodal and element print requests,
51 ! if any,are kept)
52 !
53  if(.not.sectionprint_flag) then
54  ii=0
55  do i=1,nprint
56  if((prlab(i)(1:4).eq.'DRAG').or.(prlab(i)(1:4).eq.'FLUX')
57  & .or.(prlab(i)(1:3).eq.'SOF').or.(prlab(i)(1:3).eq.'SOM')
58  & .or.(prlab(i)(1:6).eq.'SOAREA'))
59  & cycle
60  ii=ii+1
61  prlab(ii)=prlab(i)
62  prset(ii)=prset(i)
63  enddo
64  nprint=ii
65  endif
66 !
67  do ii=1,81
68  noset(ii:ii)=' '
69  enddo
70  total=' '
71 !
72  name(1:1)=' '
73  do ii=2,n
74  if(textpart(ii)(1:8).eq.'SURFACE=') then
75  noset(1:80)=textpart(ii)(9:88)
76  ipos=index(noset,' ')
77  noset(ipos:ipos)='T'
78  do i=1,nset
79  if(set(i).eq.noset) exit
80  enddo
81  if(i.gt.nset) then
82  write(*,*)
83  & '*WARNING reading *SECTION PRINT: element surface ',
84  & noset(1:ipos-1),' does not exist'
85  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
86  & ipoinp,inp,ipoinpc)
87  return
88  endif
89  elseif(textpart(ii)(1:11).eq.'FREQUENCYF=') then
90  read(textpart(ii)(12:21),'(i10)',iostat=istat) joutl
91  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
92  &"*SECTION PRINT%")
93  if(joutl.eq.0) then
94  do
95  call getnewline(inpc,textpart,istat,n,key,iline,ipol,
96  & inl,ipoinp,inp,ipoinpc)
97  if((key.eq.1).or.(istat.lt.0)) return
98  enddo
99  endif
100  if(joutl.gt.0) then
101  jout(2)=joutl
102  itpamp=0
103  endif
104  elseif(textpart(ii)(1:11).eq.'TIMEPOINTS=') then
105  timepointsname=textpart(ii)(12:91)
106  do i=1,nam
107  if(amname(i).eq.timepointsname) then
108  itpamp=i
109  exit
110  endif
111  enddo
112  if(i.gt.nam) then
113  ipos=index(timepointsname,' ')
114  write(*,*)
115  & '*ERROR reading *SECTION PRINT: time points definition '
116  & ,timepointsname(1:ipos-1),' is unknown or empty'
117  call exit(201)
118  endif
119  if(idrct.eq.1) then
120  write(*,*)
121  & '*ERROR reading *SECTION PRINT: the DIRECT option'
122  write(*,*) ' collides with a TIME POINTS '
123  write(*,*) ' specification'
124  call exit(201)
125  endif
126  jout(1)=1
127  jout(2)=1
128  elseif(textpart(ii)(1:5).eq.'NAME=') then
129  name(1:127)=textpart(ii)(6:132)
130  else
131  write(*,*)
132  & '*WARNING reading *SECTION PRINT: parameter not recognized:'
133  write(*,*) ' ',
134  & textpart(ii)(1:index(textpart(ii),' ')-1)
135  call inputwarning(inpc,ipoinpc,iline,
136  &"*SECTION PRINT%")
137  endif
138  enddo
139 !
140  if(name(1:1).eq.' ') then
141  write(*,*)
142  & '*ERROR reading *SECTION PRINT: no NAME given'
143  write(*,*) ' '
144  call inputerror(inpc,ipoinpc,iline,
145  &"*SECTION PRINT%")
146  call exit(201)
147  endif
148 !
149 ! check whether a set was defined
150 !
151  if(noset(1:1).eq.' ') then
152  write(*,*)
153  & '*WARNING reading *SECTION PRINT: no set was defined'
154  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
155  & ipoinp,inp,ipoinpc)
156  return
157  endif
158 !
159  do
160  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
161  & ipoinp,inp,ipoinpc)
162  if(key.eq.1) exit
163  loop: do ii=1,n
164  if((textpart(ii)(1:4).ne.'DRAG').and.
165  & (textpart(ii)(1:4).ne.'FLUX').and.
166  & (textpart(ii)(1:3).ne.'SOF').and.
167  & (textpart(ii)(1:3).ne.'SOM').and.
168  & (textpart(ii)(1:6).ne.'SOAREA')) then
169  write(*,*)
170  & '*WARNING reading *SECTION PRINT: label not applicable'
171  write(*,*) ' or unknown; '
172  call inputwarning(inpc,ipoinpc,iline,
173  &"*SECTION PRINT%")
174  cycle
175  endif
176  if((cfd.eq.0).and.(textpart(ii)(1:4).eq.'DRAG')) then
177  write(*,*)
178  & '*WARNING reading *SECTION PRINT: DRAG only makes '
179  write(*,*) ' sense for 3D fluid '
180  write(*,*) ' calculations'
181  cycle
182  endif
183 !
184 ! SOF, SOM and SOAREA generate the same output
185 !
186  if(textpart(ii)(1:3).eq.'SOM') textpart(ii)(1:3)='SOF'
187  if(textpart(ii)(1:6).eq.'SOAREA') textpart(ii)(1:6)='SOF '
188  do i=1,nprint
189  if(prlab(i)(1:3).eq.'SOF') then
190  if(prset(i).eq.noset) cycle loop
191  endif
192  enddo
193 !
194  nprint=nprint+1
195  if(nprint.gt.nprint_) then
196  write(*,*)
197  & '*ERROR reading *SECTION PRINT: increase nprint_'
198  call exit(201)
199  endif
200  prset(nprint)=noset
201  prlab(nprint)(1:4)=textpart(ii)(1:4)
202  prlab(nprint)(5:5)=total
203  prlab(nprint)(6:6)=nodesys
204  enddo loop
205  enddo
206 !
207  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)