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

Go to the source code of this file.

Functions/Subroutines

subroutine transition (dgdxglob, nobject, nk, nodedesi, ndesi, objectset, xo, yo, zo, x, y, z, nx, ny, nz, co, ifree, ndesia, ndesib)
 

Function/Subroutine Documentation

◆ transition()

subroutine transition ( real*8, dimension(2,nk,nobject)  dgdxglob,
integer  nobject,
integer  nk,
integer, dimension(*)  nodedesi,
integer  ndesi,
character*81, dimension(4,*)  objectset,
real*8, dimension(*)  xo,
real*8, dimension(*)  yo,
real*8, dimension(*)  zo,
real*8, dimension(*)  x,
real*8, dimension(*)  y,
real*8, dimension(*)  z,
integer, dimension(*)  nx,
integer, dimension(*)  ny,
integer, dimension(*)  nz,
real*8, dimension(3,*)  co,
integer  ifree,
integer  ndesia,
integer  ndesib 
)
22 !
23 ! scaling of sensitivitites between the designspace
24 ! and non-designspace
25 !
26  implicit none
27 !
28  character*81 objectset(4,*)
29 
30  integer nobject,nk,nodedesi(*),
31  & ndesi,j,m,neighbor(10),nx(*),ny(*),nz(*),
32  & istat,ndesia,ndesib,ifree,nnodes,irefnode,
33  & iactnode
34 !
35  real*8 dgdxglob(2,nk,nobject),xo(*),yo(*),zo(*),x(*),
36  & y(*),z(*),trans,co(3,*),xdesi,ydesi,zdesi,
37  & scale,actdist,dd,xrefnode,yrefnode,zrefnode
38 !
39 ! Read transition distance.
40 !
41  read(objectset(1,1)(21:40),'(f20.0)',iostat=istat) trans
42 !
43  nnodes=1
44 !
45  do j=ndesia,ndesib
46 !
47  iactnode=nodedesi(j)
48  xdesi=co(1,iactnode)
49  ydesi=co(2,iactnode)
50  zdesi=co(3,iactnode)
51 !
52  call near3d(xo,yo,zo,x,y,z,nx,ny,nz,xdesi,ydesi,zdesi,
53  & ifree,neighbor,nnodes)
54 !
55 ! Calculate scaled sensitivity
56 !
57  irefnode=neighbor(1)
58  xrefnode=xo(irefnode)
59  yrefnode=yo(irefnode)
60  zrefnode=zo(irefnode)
61  dd=(xrefnode-xdesi)**2+(yrefnode-ydesi)**2
62  & +(zrefnode-zdesi)**2
63  actdist=dsqrt(dd)
64  if(actdist.ge.trans) cycle
65 !
66 ! Linear scaling
67  scale=actdist/trans
68 ! Exponential scaling
69 ! scale=1/(1+dexp(-actdist/trans*10+5))
70  do m=1,nobject
71  if(objectset(1,m)(1:9).eq.'THICKNESS') cycle
72  dgdxglob(2,iactnode,m)=dgdxglob(2,iactnode,m)*scale
73  enddo
74  enddo
75 !
76  return
subroutine near3d(xo, yo, zo, x, y, z, nx, ny, nz, xp, yp, zp, n, neighbor, k)
Definition: near3d.f:20
Hosted by OpenAircraft.com, (Michigan UAV, LLC)