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

Go to the source code of this file.

Functions/Subroutines

subroutine clearances (inpc, textpart, tieset, istat, n, iline, ipol, inl, ipoinp, inp, ntie, ipoinpc, istep, tietol, irstrt)
 

Function/Subroutine Documentation

◆ clearances()

subroutine clearances ( character*1, dimension(*)  inpc,
character*132, dimension(16)  textpart,
character*81, dimension(3,*)  tieset,
integer  istat,
integer  n,
integer  iline,
integer  ipol,
integer  inl,
integer, dimension(2,*)  ipoinp,
integer, dimension(3,*)  inp,
integer  ntie,
integer, dimension(0:*)  ipoinpc,
integer  istep,
real*8, dimension(3,*)  tietol,
integer  irstrt 
)
21 !
22 ! reading the input deck: *CLEARANCE
23 !
24  implicit none
25 !
26  logical contactpair
27 !
28  character*1 inpc(*)
29  character*81 tieset(3,*)
30  character*132 textpart(16),master,slave
31 !
32  integer istat,n,i,j,key,ipos,iline,ipol,inl,ipoinp(2,*),irstrt,
33  & inp(3,*),ntie,ipoinpc(0:*),iposslave,iposmaster,itie,istep
34 !
35  real*8 tietol(3,*),value
36 !
37  if((istep.gt.0).and.(irstrt.ge.0)) then
38  write(*,*) '*ERROR reading *CLEARANCE: *CLEARANCE should be'
39  write(*,*) ' placed before all step definitions'
40  call exit(201)
41  endif
42 !
43  contactpair=.false.
44 !
45  do i=2,n
46  if(textpart(i)(1:7).eq.'MASTER=') then
47  iposmaster=index(textpart(i),' ')
48  master(1:iposmaster-8)=textpart(i)(8:iposmaster-1)
49  do j=iposmaster-7,132
50  master(j:j)=' '
51  enddo
52  elseif(textpart(i)(1:6).eq.'SLAVE=') then
53  iposslave=index(textpart(i),' ')
54  slave(1:iposslave-7)=textpart(i)(7:iposslave-1)
55  do j=iposslave-6,132
56  slave(j:j)=' '
57  enddo
58  elseif(textpart(i)(1:6).eq.'VALUE=') then
59  read(textpart(i)(7:26),'(f20.0)',iostat=istat) value
60  else
61  write(*,*)
62  & '*WARNING reading *CLEARANCE: parameter not recognized:'
63  write(*,*) ' ',
64  & textpart(i)(1:index(textpart(i),' ')-1)
65  call inputwarning(inpc,ipoinpc,iline,
66  &"*CLEARANCE%")
67  endif
68  enddo
69 !
70 ! selecting the appropriate action
71 !
72  iposslave=index(slave(1:80),' ')
73  iposmaster=index(master(1:80),' ')
74  do i=1,ntie
75  if((tieset(1,i)(81:81).ne.'C').and.
76  & (tieset(1,i)(81:81).ne.'-')) cycle
77  ipos=index(tieset(2,i),' ')-1
78  if(ipos.ne.iposslave) cycle
79  if(tieset(2,i)(1:ipos-1).ne.slave(1:ipos-1)) cycle
80  ipos=index(tieset(3,i),' ')-1
81  if(ipos.ne.iposmaster) cycle
82  if(tieset(3,i)(1:ipos-1).ne.master(1:ipos-1)) cycle
83  itie=i
84  exit
85  enddo
86 !
87  if(i.gt.ntie) then
88  write(*,*) '*ERROR in clearances: no such contact pair'
89  call inputerror(inpc,ipoinpc,iline,
90  &"*CLEARANCE%")
91  endif
92  tietol(3,i)=value
93 !
94  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
95  & ipoinp,inp,ipoinpc)
96 !
97  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)