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

Go to the source code of this file.

Functions/Subroutines

subroutine createialdesi (ndesi, nodedesi, iponoel, inoel, istartdesi, ialdesi, lakon, ipkon, kon, nodedesiinv, icoordinate, noregion)
 

Function/Subroutine Documentation

◆ createialdesi()

subroutine createialdesi ( integer  ndesi,
integer, dimension(*)  nodedesi,
integer, dimension(*)  iponoel,
integer, dimension(2,*)  inoel,
integer, dimension(*)  istartdesi,
integer, dimension(*)  ialdesi,
character*8, dimension(*)  lakon,
integer, dimension(*)  ipkon,
integer, dimension(*)  kon,
integer, dimension(*)  nodedesiinv,
integer  icoordinate,
integer  noregion 
)
22 !
23  implicit none
24 !
25  character*8 lakon(*)
26 !
27  integer ndesi,node,nodedesi(*),iponoel(*),inoel(2,*),
28  & istartdesi(*),ialdesi(*),ifree,index,i,ipkon(*),kon(*),
29  & nodedesiinv(*),icoordinate,indexe,nopedesi,nnodes,nelem,
30  & m,nope,noregion
31 !
32 ! determining the elements belonging to a given design
33 ! variable i. They are stored in ialdesi(istartdesi(i))..
34 ! ...up to..... ialdesi(istartdesi(i+1)-1)
35 !
36  ifree=1
37 !
38  if(icoordinate.eq.1) then
39 !
40 ! coordinates as design variables
41 !
42 ! an element is taken into account if more than nopedesign
43 ! nodes in the element are design variables (important for
44 ! design nodes on the border of the design domain)
45 !
46  do i=1,ndesi
47  istartdesi(i)=ifree
48  node=nodedesi(i)
49  index=iponoel(node)
50  do
51  if(index.eq.0) exit
52  nelem=inoel(1,index)
53 !
54  if(lakon(nelem)(4:4).eq.'8') then
55  nopedesi=3
56  nope=8
57  elseif(lakon(nelem)(4:5).eq.'20') then
58  nopedesi=5
59  nope=20
60  elseif(lakon(nelem)(4:5).eq.'10') then
61  nopedesi=3
62  nope=10
63  elseif(lakon(nelem)(4:4).eq.'4') then
64  nopedesi=3
65  nope=4
66  elseif(lakon(nelem)(4:4).eq.'6') then
67  nopedesi=3
68  nope=6
69  elseif(lakon(nelem)(4:5).eq.'15') then
70  nopedesi=3
71  nope=15
72  endif
73  if(noregion.eq.1) nopedesi=0
74 !
75  indexe=ipkon(nelem)
76 !
77 ! summing the design variables in the element
78 !
79  nnodes=0
80  do m=1,nope
81  if(nodedesiinv(kon(indexe+m)).eq.1) then
82  nnodes=nnodes+1
83  endif
84  enddo
85 !
86  if(nnodes.ge.nopedesi) then
87  ialdesi(ifree)=nelem
88  ifree=ifree+1
89  endif
90  index=inoel(2,index)
91  enddo
92  enddo
93  istartdesi(ndesi+1)=ifree
94  else
95 !
96 ! orientation as design variables
97 !
98  do i=1,ndesi
99  istartdesi(i)=ifree
100  node=nodedesi(i)
101  index=iponoel(node)
102  do
103  if(index.eq.0) exit
104  ialdesi(ifree)=inoel(1,index)
105  ifree=ifree+1
106  index=inoel(2,index)
107  enddo
108  enddo
109  istartdesi(ndesi+1)=ifree
110  endif
111 !
112  return
Hosted by OpenAircraft.com, (Michigan UAV, LLC)