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

Go to the source code of this file.

Functions/Subroutines

subroutine contactprints (inpc, textpart, nprint, nprint_, jout, prlab, prset, contactprint_flag, ithermal, istep, istat, n, iline, ipol, inl, ipoinp, inp, amname, nam, itpamp, idrct, ipoinpc, nener)
 

Function/Subroutine Documentation

◆ contactprints()

subroutine contactprints ( character*1, dimension(*)  inpc,
character*132, dimension(16)  textpart,
integer  nprint,
integer  nprint_,
integer, dimension(2)  jout,
character*6, dimension(*)  prlab,
character*81, dimension(*)  prset,
logical  contactprint_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  nener 
)
23 !
24 ! reading the *CONTACT PRINT cards in the input deck
25 !
26  implicit none
27 !
28  logical contactprint_flag
29 !
30  character*1 total,nodesys,inpc(*)
31  character*6 prlab(*)
32  character*80 amname(*),timepointsname
33  character*81 prset(*),noset
34  character*132 textpart(16)
35 !
36  integer ii,i,nam,itpamp,
37  & jout(2),joutl,ithermal,nprint,nprint_,istep,
38  & istat,n,key,ipos,iline,ipol,inl,ipoinp(2,*),inp(3,*),idrct,
39  & ipoinpc(0:*),nener
40 !
41  if(istep.lt.1) then
42  write(*,*) '*ERROR in contactprints: *CONTACT PRINT
43  & should only be'
44  write(*,*) ' used within a *STEP definition'
45  call exit(201)
46  endif
47 !
48  nodesys='L'
49 !
50 ! reset the contact print requests (node and element print requests,
51 ! if any, are kept)
52 !
53  if(.not.contactprint_flag) then
54  ii=0
55  do i=1,nprint
56  if((prlab(i)(1:4).eq.'CSTR').or.
57  & (prlab(i)(1:4).eq.'CDIS').or.
58  & (prlab(i)(1:4).eq.'CNUM').or.
59  & (prlab(i)(1:4).eq.'CELS')) cycle
60  ii=ii+1
61  prlab(ii)=prlab(i)
62  prset(ii)=prset(i)
63  enddo
64  nprint=ii
65  endif
66 !
67 c jout=max(jout,1)
68  do ii=1,81
69  noset(ii:ii)=' '
70  enddo
71  total=' '
72 !
73  do ii=2,n
74  if(textpart(ii)(1:10).eq.'FREQUENCY=') then
75  read(textpart(ii)(11:20),'(i10)',iostat=istat) joutl
76  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
77  &"*CONTACT PRINT%")
78  if(joutl.eq.0) then
79  do
80  call getnewline(inpc,textpart,istat,n,key,iline,ipol,
81  & inl,ipoinp,inp,ipoinpc)
82  if((key.eq.1).or.(istat.lt.0)) return
83  enddo
84  endif
85  if(joutl.gt.0) then
86  jout(1)=joutl
87  itpamp=0
88  endif
89  elseif(textpart(ii)(1:10).eq.'TOTALS=YES') then
90  total='T'
91  elseif(textpart(ii)(1:11).eq.'TOTALS=ONLY') then
92  total='O'
93  elseif(textpart(ii)(1:11).eq.'TIMEPOINTS=') then
94  timepointsname=textpart(ii)(12:91)
95  do i=1,nam
96  if(amname(i).eq.timepointsname) then
97  itpamp=i
98  exit
99  endif
100  enddo
101  if(i.gt.nam) then
102  ipos=index(timepointsname,' ')
103  write(*,*) '*ERROR in contactprints: time points
104  & definition '
105  & ,timepointsname(1:ipos-1),' is unknown or empty'
106  call exit(201)
107  endif
108  if(idrct.eq.1) then
109  write(*,*) '*ERROR in contactprints: the DIRECT option'
110  write(*,*) ' collides with a TIME POINTS '
111  write(*,*) ' specification'
112  call exit(201)
113  endif
114  jout(1)=1
115  jout(2)=1
116  else
117  write(*,*)
118  & '*WARNING in contactprints: parameter not recognized:'
119  write(*,*) ' ',
120  & textpart(ii)(1:index(textpart(ii),' ')-1)
121  call inputwarning(inpc,ipoinpc,iline,
122  &"*CONTACT PRINT%")
123  endif
124  enddo
125 
126  do
127  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
128  & ipoinp,inp,ipoinpc)
129  if(key.eq.1) exit
130  do ii=1,n
131  if((textpart(ii)(1:4).ne.'CSTR').and.
132  & (textpart(ii)(1:4).ne.'CELS').and.
133  & (textpart(ii)(1:4).ne.'CNUM').and.
134  & (textpart(ii)(1:4).ne.'CDIS')) then
135  write(*,*) '*WARNING in contactprints: label not
136  & applicable'
137  write(*,*) ' or unknown; '
138  call inputwarning(inpc,ipoinpc,iline,
139  &"*CONTACT PRINT%")
140  cycle
141  endif
142 !
143 !
144 !
145  if(textpart(ii)(1:4).eq.'CELS') nener=1
146 !
147  nprint=nprint+1
148  if(nprint.gt.nprint_) then
149  write(*,*) '*ERROR in contatcprints: increase nprint_'
150  call exit(201)
151  endif
152  prset(nprint)=noset
153  prlab(nprint)(1:4)=textpart(ii)(1:4)
154  prlab(nprint)(5:5)=total
155  prlab(nprint)(6:6)=nodesys
156  enddo
157  enddo
158 !
159  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)