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

Go to the source code of this file.

Functions/Subroutines

subroutine changekon (ne, ipkon, lakon, mi, nkon, thicke, ielmat, kon)
 

Function/Subroutine Documentation

◆ changekon()

subroutine changekon ( integer  ne,
integer, dimension(*)  ipkon,
character*8, dimension(*)  lakon,
integer, dimension(*)  mi,
integer  nkon,
real*8, dimension(mi(3),*)  thicke,
integer, dimension(mi(3),*)  ielmat,
integer, dimension(*)  kon 
)
20 !
21 ! for composites the connectivity has to be changed to
22 ! allow for the multiple expansions of the composite elements.
23 !
24 ! for a 8-node composite shell the connectivity is set up as follows:
25 ! 1..20: simple expansion of the shell
26 ! 21..28: original connectivity of the element
27 ! 29..48: expansion of the first layer of the shell
28 ! 49..68: expansion of the second layer of the shell
29 ! ..
30 ! 29+(n-1)*20..28+n*20: expansion of the nth layer of the shell
31 !
32 ! similar for 6-node composite shell elements; at the start of the present
33 ! routine the connectivity does not provide for the expansion of the
34 ! layers yet. At the end of the routine appropriate space has been
35 ! provided and the regular connectivity of the elements appropriately
36 ! moved
37 !
38  implicit none
39 !
40  character*8 lakon(*)
41 !
42  integer ne,ipkon(*),mi(*),nkon,ielmat(mi(3),*),nkondiff,i,j,k,
43  & kon(*),nexp,nopeexp,nlayer,ipointer
44 !
45  real*8 thicke(mi(3),*)
46 !
47 ! calculate the extra space needed in kon
48 !
49  nkondiff=0
50  do i=1,ne
51  if(ipkon(i).lt.0) cycle
52  if(lakon(i)(1:1).ne.'S') cycle
53  if(lakon(i)(8:8).ne.'C') cycle
54  do j=1,mi(3)
55  if(ielmat(j,i).ne.0) then
56  if(lakon(i)(2:2).eq.'8') then
57  nkondiff=nkondiff+20
58  elseif(lakon(i)(2:2).eq.'6') then
59  nkondiff=nkondiff+15
60  endif
61  endif
62  enddo
63  enddo
64 !
65 ! move the topology in order to create appropriate space
66 !
67  nkon=nkon+nkondiff
68  ipointer=nkon
69 !
70  do i=ne,1,-1
71  if(ipkon(i).lt.0) cycle
72 !
73 ! calculating the size of the expanded connectivity
74 !
75  if(lakon(i)(1:5).eq.'C3D8I') then
76  nopeexp=11
77  elseif(lakon(i)(4:5).eq.'20') then
78  nopeexp=20
79  elseif(
80  & (lakon(i)(1:4).eq.'CPE8').or.(lakon(i)(1:4).eq.'CPS8').or.
81  & (lakon(i)(1:4).eq.'CAX8').or.(lakon(i)(1:2).eq.'S8')) then
82  nopeexp=28
83  elseif(
84  & (lakon(i)(1:4).eq.'CPE6').or.(lakon(i)(1:4).eq.'CPS6').or.
85  & (lakon(i)(1:4).eq.'CAX6').or.(lakon(i)(1:2).eq.'S6')) then
86  nopeexp=21
87  elseif(lakon(i)(1:1).eq.'B') then
88  nopeexp=23
89  elseif(lakon(i)(4:4).eq.'8') then
90  nopeexp=8
91  elseif(lakon(i)(4:5).eq.'10') then
92  nopeexp=10
93  elseif(lakon(i)(4:4).eq.'4') then
94  nopeexp=4
95  elseif(lakon(i)(4:5).eq.'15') then
96  nopeexp=15
97  elseif(lakon(i)(4:4).eq.'6') then
98  nopeexp=6
99  elseif(lakon(i)(1:8).eq.'DASHPOTA') then
100  nopeexp=2
101  elseif(lakon(i)(1:1).eq.'D') then
102  nopeexp=3
103  elseif(lakon(i)(1:1).eq.'G') then
104  nopeexp=2
105  elseif(lakon(i)(1:7).eq.'SPRINGA') then
106  nopeexp=2
107  else
108  write(*,*) '*ERROR in changekon: element type unknown:',
109  & ' element: ',i,' type: ',lakon(i)
110  call exit(201)
111  endif
112 !
113  nlayer=0
114 !
115  if(lakon(i)(8:8).eq.'C') then
116  do j=1,mi(3)
117  if(ielmat(j,i).ne.0) then
118  nlayer=nlayer+1
119  else
120  exit
121  endif
122  enddo
123  endif
124 !
125  nexp=0
126 !
127  if(lakon(i)(2:2).eq.'8') then
128  nexp=20
129  elseif(lakon(i)(2:2).eq.'6') then
130  nexp=15
131  endif
132 !
133  ipointer=ipointer-nopeexp-nlayer*nexp
134 !
135  do j=nopeexp,1,-1
136  kon(ipointer+j)=kon(ipkon(i)+j)
137  do k=1,mi(3)
138  thicke(k,ipointer+j)=thicke(k,ipkon(i)+j)
139  enddo
140  enddo
141  ipkon(i)=ipointer
142 c write(*,*) 'changekon '
143 c write(*,*) i,ipkon(i)
144 c write(*,*) (kon(ipointer+j),j=1,nopeexp+nlayer*nexp)
145  enddo
146 !
147  return
Hosted by OpenAircraft.com, (Michigan UAV, LLC)