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

Go to the source code of this file.

Functions/Subroutines

subroutine transformfs (inpc, textpart, trab, ntrans, ntrans_, set, istartset, iendset, ialset, nset, istep, istat, n, iline, ipol, inl, ipoinp, inp, ipoinpc, xload, sideload, nelemload, idefload, nload, nload_, ne, nam, iamload)
 

Function/Subroutine Documentation

◆ transformfs()

subroutine transformfs ( character*1, dimension(*)  inpc,
character*132, dimension(16)  textpart,
real*8, dimension(7,*)  trab,
integer  ntrans,
integer  ntrans_,
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,
real*8, dimension(2,*)  xload,
character*20, dimension(*)  sideload,
integer, dimension(2,*)  nelemload,
integer, dimension(*)  idefload,
integer  nload,
integer  nload_,
integer  ne,
integer  nam,
integer, dimension(*)  iamload 
)
23 !
24 ! reading the input deck: *TRANSFORMF
25 !
26  implicit none
27 !
28  real*8 trab(7,*)
29 !
30  character*1 inpc(*)
31  character*20 sideload(*),label
32  character*81 set(*),surfaceset
33  character*132 textpart(16)
34 !
35  integer ntrans,ntrans_,istep,istat,n,key,i,j,
36  & istartset(*),iendset(*),ialset(*),nset,ipos,iline,ipol,
37  & inl,ipoinp(2,*),inp(3,*),ipoinpc(0:*),nelemload(2,*),ne,
38  & nam,nload,l,iamload(*),iamplitude,idefload(*),
39  & nload_,iset,nelem,ifacel
40 !
41  real*8 xload(2,*),xmagnitude
42 !
43  if(istep.gt.0) then
44  write(*,*) '*ERROR reading *TRANSFORMF: *TRANSFORMF should be'
45  write(*,*) ' placed before all step definitions'
46  call exit(201)
47  endif
48 !
49  ntrans=ntrans+1
50  if(ntrans.gt.ntrans_) then
51  write(*,*) '*ERROR reading *TRANSFORMF: increase ntrans_'
52  call exit(201)
53  endif
54 !
55  ipos=1
56  xmagnitude=0.d0
57  iamplitude=0
58 !
59 ! rectangular coordinate system: trab(7,norien)=1
60 ! cylindrical coordinate system: trab(7,norien)=-1
61 ! default is rectangular
62 !
63  trab(7,ntrans)=1.d0
64 !
65  do i=2,n
66  if(textpart(i)(1:5).eq.'TYPE=') then
67  if(textpart(i)(6:6).eq.'C') then
68  trab(7,ntrans)=-1.d0
69  endif
70  elseif(textpart(i)(1:8).eq.'SURFACE=') then
71  surfaceset(1:80)=textpart(i)(9:88)
72  surfaceset(81:81)=' '
73  ipos=index(surfaceset,' ')
74  surfaceset(ipos:ipos)='T'
75  do iset=1,nset
76  if(set(iset).eq.surfaceset) exit
77  enddo
78  if(iset.gt.nset) then
79  write(*,*)
80  & '*WARNING reading *TRANSFORMF: element surface ',
81  & surfaceset(1:ipos-1),' does not exist'
82  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
83  & ipoinp,inp,ipoinpc)
84  return
85  endif
86  else
87  write(*,*)
88  & '*WARNING reading *TRANSFORMF: parameter not recognized:'
89  write(*,*) ' ',
90  & textpart(i)(1:index(textpart(i),' ')-1)
91  call inputwarning(inpc,ipoinpc,iline,
92  &"*TRANSFORMF%")
93  endif
94  enddo
95 !
96  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
97  & ipoinp,inp,ipoinpc)
98  if((istat.lt.0).or.(key.eq.1)) then
99  write(*,*)'*ERROR reading *TRANSFORMF: definition of a'
100  write(*,*) ' transformation is not complete'
101  call inputerror(inpc,ipoinpc,iline,
102  &"*TRANSFORMF%")
103  call exit(201)
104  endif
105 !
106  do i=1,6
107  read(textpart(i)(1:20),'(f20.0)',iostat=istat) trab(i,ntrans)
108  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
109  &"*TRANSFORMF%")
110  enddo
111 !
112  label(1:20)='T '
113  do j=istartset(iset),iendset(iset)
114  l=ialset(j)
115  nelem=int(l/10.d0)
116  ifacel=l-10*nelem
117  write(label(2:2),'(i1)') ifacel
118  call loadadd(nelem,label,xmagnitude,nelemload,
119  & sideload,xload,nload,nload_,iamload,
120  & iamplitude,nam,ntrans,idefload)
121  enddo
122 !
123  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
124  & ipoinp,inp,ipoinpc)
125 !
126  return
subroutine inputwarning(inpc, ipoinpc, iline, text)
Definition: inputwarning.f:20
subroutine loadadd(nelement, label, value, nelemload, sideload, xload, nload, nload_, iamload, iamplitude, nam, isector, idefload)
Definition: loadadd.f:21
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)