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

Go to the source code of this file.

Functions/Subroutines

subroutine transforms (inpc, textpart, trab, ntrans, ntrans_, inotr, set, istartset, iendset, ialset, nset, istep, istat, n, iline, ipol, inl, ipoinp, inp, ipoinpc)
 

Function/Subroutine Documentation

◆ transforms()

subroutine transforms ( character*1, dimension(*)  inpc,
character*132, dimension(16)  textpart,
real*8, dimension(7,*)  trab,
integer  ntrans,
integer  ntrans_,
integer, dimension(2,*)  inotr,
character*81, dimension(*)  set,
integer, dimension(*)  istartset,
integer, dimension(*)  iendset,
integer, dimension(*)  ialset,
integer  nset,
integer  istep,
integer  istat,
integer  n,
integer  iline,
integer  ipol,
integer  inl,
integer, dimension(2,*)  ipoinp,
integer, dimension(3,*)  inp,
integer, dimension(0:*)  ipoinpc 
)
22 !
23 ! reading the input deck: *TRANSFORM
24 !
25  implicit none
26 !
27  real*8 trab(7,*)
28 !
29  character*1 inpc(*)
30  character*81 set(*),noset
31  character*132 textpart(16)
32 !
33  integer ntrans,ntrans_,istep,istat,n,key,i,j,k,inotr(2,*),
34  & istartset(*),iendset(*),ialset(*),nset,ipos,iline,ipol,
35  & inl,ipoinp(2,*),inp(3,*),ipoinpc(0:*)
36 !
37  if(istep.gt.0) then
38  write(*,*) '*ERROR reading *TRANSFORM: *TRANSFORM should be'
39  write(*,*) ' placed before all step definitions'
40  call exit(201)
41  endif
42 !
43  ntrans=ntrans+1
44  if(ntrans.gt.ntrans_) then
45  write(*,*) '*ERROR reading *TRANSFORM: increase ntrans_'
46  call exit(201)
47  endif
48 !
49  ipos=1
50  noset(1:1)=' '
51 !
52 ! rectangular coordinate system: trab(7,norien)=1
53 ! cylindrical coordinate system: trab(7,norien)=-1
54 ! default is rectangular
55 !
56  trab(7,ntrans)=1.d0
57 !
58  do i=2,n
59  if(textpart(i)(1:5).eq.'NSET=') then
60  noset=textpart(i)(6:85)
61  noset(81:81)=' '
62  ipos=index(noset,' ')
63  noset(ipos:ipos)='N'
64  elseif(textpart(i)(1:5).eq.'TYPE=') then
65  if(textpart(i)(6:6).eq.'C') then
66  trab(7,ntrans)=-1.d0
67  endif
68  else
69  write(*,*)
70  & '*WARNING reading *TRANSFORM: parameter not recognized:'
71  write(*,*) ' ',
72  & textpart(i)(1:index(textpart(i),' ')-1)
73  call inputwarning(inpc,ipoinpc,iline,
74  &"*TRANSFORM%")
75  endif
76  enddo
77 !
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(*,*)'*ERROR reading *TRANSFORM: definition of a'
82  write(*,*) ' transformation is not complete'
83  call inputerror(inpc,ipoinpc,iline,
84  &"*TRANSFORM%")
85  call exit(201)
86  endif
87 !
88  do i=1,6
89  read(textpart(i)(1:20),'(f20.0)',iostat=istat) trab(i,ntrans)
90  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
91  &"*TRANSFORM%")
92  enddo
93 !
94  if(noset(1:1).eq.' ') then
95  write(*,*) '*ERROR reading *TRANSFORM: no node set defined'
96  call exit(201)
97  endif
98 !
99  do i=1,nset
100  if(set(i).eq.noset) exit
101  enddo
102  if(i.gt.nset) then
103  noset(ipos:ipos)=' '
104  write(*,*) '*ERROR reading *TRANSFORM: node set ',noset
105  write(*,*) ' has not yet been defined.'
106  call exit(201)
107  endif
108  do j=istartset(i),iendset(i)
109  if(ialset(j).gt.0) then
110  inotr(1,ialset(j))=ntrans
111  else
112  k=ialset(j-2)
113  do
114  k=k-ialset(j)
115  if(k.ge.ialset(j-1)) exit
116  inotr(1,k)=ntrans
117  enddo
118  endif
119  enddo
120 !
121  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
122  & ipoinp,inp,ipoinpc)
123 !
124  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)