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

Go to the source code of this file.

Functions/Subroutines

subroutine designvariabless (inpc, textpart, tieset, tietol, istep, istat, n, iline, ipol, inl, ipoinp, inp, ntie, ntie_, ipoinpc, set, nset)
 

Function/Subroutine Documentation

◆ designvariabless()

subroutine designvariabless ( character*1, dimension(*)  inpc,
character*132, dimension(16)  textpart,
character*81, dimension(3,*)  tieset,
real*8, dimension(3,*)  tietol,
integer  istep,
integer  istat,
integer  n,
integer  iline,
integer  ipol,
integer  inl,
integer, dimension(2,*)  ipoinp,
integer, dimension(3,*)  inp,
integer  ntie,
integer  ntie_,
integer, dimension(0:*)  ipoinpc,
character*81, dimension(*)  set,
integer  nset 
)
22 !
23 ! reading the input deck: *DESIGNVARIABLES
24 !
25  implicit none
26 !
27  character*1 inpc(*)
28  character*81 tieset(3,*),set(*)
29  character*132 textpart(16)
30 !
31  integer istep,istat,n,i,key,ipos,iline,ipol,inl,ipoinp(2,*),
32  & inp(3,*),ntie,ntie_,ipoinpc(0:*),nset,itype
33 !
34  real*8 tietol(3,*)
35 !
36 ! Check of correct position in Inputdeck
37 !
38  if(istep.gt.0) then
39  write(*,*) '*ERROR reading *DESIGN VARIABLES: *DESIGNVARIABLES'
40  write(*,*) ' should be placed before all step definitions'
41  call exit(201)
42  endif
43 !
44 ! Check of correct number of ties
45 !
46  ntie=ntie+1
47  if(ntie.gt.ntie_) then
48  write(*,*) '*ERROR reading *DESIGN VARIABLES: increase ntie_'
49  call exit(201)
50  endif
51 !
52 ! Read in *DESIGNVARIABLES
53 !
54  itype=0
55  do i=2,n
56  if(textpart(i)(1:5).eq.'TYPE=') then
57  read(textpart(i)(6:85),'(a80)',iostat=istat)
58  & tieset(1,ntie)(1:80)
59  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
60  & "*DESIGNVARIABLE%")
61  itype=1
62  endif
63  enddo
64 !
65  if(itype.eq.0) then
66  write(*,*)
67  &'*ERROR reading *DESIGN VARIABLES: type is lacking'
68  call inputerror(inpc,ipoinpc,iline,
69  &"*DESIGNVARIABLE%")
70  call exit(201)
71  endif
72 !
73 ! Add "D" at the end of the name of the designvariable keyword
74 !
75  tieset(1,ntie)(81:81)='D'
76 !
77  if(tieset(1,ntie)(1:10).eq.'COORDINATE') then
78  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
79  & ipoinp,inp,ipoinpc)
80  if((istat.lt.0).or.(key.eq.1)) then
81  write(*,*)
82  &'*ERROR reading *DESIGN VARIABLES: definition'
83  write(*,*) ' is not complete.'
84  call exit(201)
85  endif
86 !
87 ! Read the name of the design variable node set
88 !
89  tieset(2,ntie)(1:81)=textpart(1)(1:81)
90  ipos=index(tieset(2,ntie),' ')
91  tieset(2,ntie)(ipos:ipos)='N'
92 !
93 ! Check existence of the node set
94 !
95  do i=1,nset
96  if(set(i).eq.tieset(2,ntie)) exit
97  enddo
98  if(i.gt.nset) then
99  write(*,*) '*ERROR reading *DESIGN VARIABLES'
100  write(*,*) 'node set ',tieset(2,ntie)(1:ipos-1),
101  & 'does not exist. Card image:'
102  call inputerror(inpc,ipoinpc,iline,
103  &"*DESIGN VARIABLES%")
104  endif
105  endif
106 !
107  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
108  & ipoinp,inp,ipoinpc)
109 !
110  return
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)