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

Go to the source code of this file.

Functions/Subroutines

subroutine objective_shapeener_tot (ne, kon, ipkon, lakon, fint, vold, iperturb, mi, nactdof, dgdx, df, ndesi, iobject, jqs, irows, vec)
 

Function/Subroutine Documentation

◆ objective_shapeener_tot()

subroutine objective_shapeener_tot ( integer  ne,
integer, dimension(*)  kon,
integer, dimension(*)  ipkon,
character*8, dimension(*)  lakon,
real*8, dimension(*)  fint,
real*8, dimension(0:mi(2),*)  vold,
integer, dimension(*)  iperturb,
integer, dimension(*)  mi,
integer, dimension(0:mi(2),*)  nactdof,
real*8, dimension(ndesi,*)  dgdx,
real*8, dimension(*)  df,
integer  ndesi,
integer  iobject,
integer, dimension(*)  jqs,
integer, dimension(*)  irows,
real*8, dimension(*)  vec 
)
22 !
23  implicit none
24 !
25  character*8 lakon(*)
26 !
27  integer ndesi,iobject,idesvar,i,j,l,jqs(*),irows(*),idof,
28  & ne,ipkon(*),ielem,iperturb(*),indexe,konl(26),kon(*),mi(*),
29  & nope,nactdof(0:mi(2),*)
30 !
31  real*8 dgdx(ndesi,*),df(*),vec(*),vold(0:mi(2),*),fint(*)
32 !
33 ! ----------------------------------------------------------------
34 ! Calculation of the total differential:
35 ! non-linear: dgdx = dgdx + fint^(T) * ( df )
36 ! linear: dgdx = dgdx + vold^(T) * ( df )
37 ! ----------------------------------------------------------------
38 !
39 ! copying the entries of vold (linear) or fint (nonlinear) of the nodes
40 ! belonging to the active element set in the field vec
41 !
42  do ielem=1,ne
43 
44  if(ipkon(ielem).lt.0) cycle
45 
46  indexe=ipkon(ielem)
47 
48  if(lakon(ielem)(4:4).eq.'8') then
49  nope=8
50  elseif(lakon(ielem)(4:5).eq.'20') then
51  nope=20
52  elseif(lakon(ielem)(4:5).eq.'10') then
53  nope=10
54  elseif(lakon(ielem)(4:4).eq.'4') then
55  nope=4
56  elseif(lakon(ielem)(4:4).eq.'6') then
57  nope=6
58  elseif(lakon(ielem)(4:5).eq.'15') then
59  nope=15
60  else
61  exit
62  endif
63 
64  do l=1,nope
65  konl(l)=kon(indexe+l)
66  enddo
67 
68  if(iperturb(2).eq.1) then
69  do i=1,nope
70  do j=1,3
71  idof=nactdof(j,konl(i))
72  if(idof.gt.0) then
73  vec(idof)=fint(idof)
74  endif
75  enddo
76  enddo
77  else
78  do i=1,nope
79  do j=1,3
80  idof=nactdof(j,konl(i))
81  if(idof.gt.0) then
82  vec(idof)=vold(j,konl(i))
83  endif
84  enddo
85  enddo
86  endif
87  enddo
88 !
89 ! Calculation of the total differential:
90 !
91  do idesvar=1,ndesi
92  do j=jqs(idesvar),jqs(idesvar+1)-1
93  idof=irows(j)
94  dgdx(idesvar,iobject)=dgdx(idesvar,iobject)
95  & +vec(idof)*df(j)
96  enddo
97  enddo
98 !
99  return
subroutine df(x, u, uprime, rpar, nev)
Definition: subspace.f:133
Hosted by OpenAircraft.com, (Michigan UAV, LLC)