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

Go to the source code of this file.

Functions/Subroutines

subroutine objective_disp_dx (nodeset, istartset, iendset, ialset, nk, idesvarc, iobject, mi, nactdof, dgdx, ndesi, nobject, vold, b)
 

Function/Subroutine Documentation

◆ objective_disp_dx()

subroutine objective_disp_dx ( integer  nodeset,
integer, dimension(*)  istartset,
integer, dimension(*)  iendset,
integer, dimension(*)  ialset,
integer  nk,
integer  idesvarc,
integer  iobject,
integer, dimension(*)  mi,
integer, dimension(0:mi(2),*)  nactdof,
real*8, dimension(ndesi,nobject)  dgdx,
integer  ndesi,
integer  nobject,
real*8, dimension(0:mi(2),*)  vold,
real*8, dimension(*)  b 
)
21 !
22 ! calculates the sum of the square of the displacements of a node
23 ! set and its derivative w.r.t. the coordinates of the mesh
24 !
25  implicit none
26 !
27  integer nk,istartset(*),iendset(*),ialset(*),nodeset,idir,
28  & idof,idesvarc,iobject,mi(*),nactdof(0:mi(2),*),j,k,ndesi,
29  & nobject,idesvar
30 !
31  real*8 dgdx(ndesi,nobject),vold(0:mi(2),*),b(*)
32 !
33  idesvar=idesvarc+1
34 !
35 ! check for the existence of a set, else take the complete mesh
36 !
37  if(nodeset.eq.0) then
38  do j=1,nk
39  do idir=1,3
40  idof=nactdof(idir,j)
41  if(idof.gt.0) then
42  dgdx(idesvar,iobject)=dgdx(idesvar,iobject)
43  & +2.d0*vold(idir,j)*b(idof)
44  endif
45  enddo
46  enddo
47  else
48  do j=istartset(nodeset),iendset(nodeset)
49  if(ialset(j).gt.0) then
50  do idir=1,3
51  idof=nactdof(idir,ialset(j))
52  if(idof.gt.0) then
53  dgdx(idesvar,iobject)=dgdx(idesvar,iobject)
54  & +2.d0*vold(idir,ialset(j))*b(idof)
55  endif
56  enddo
57  else
58  k=ialset(j-2)
59  do
60  k=k-ialset(j)
61  if(k.ge.ialset(j-1)) exit
62  do idir=1,3
63  idof=nactdof(idir,k)
64  if(idof.gt.0) then
65  dgdx(idesvar,iobject)=dgdx(idesvar,iobject)
66  & +2.d0*vold(idir,k)*b(idof)
67  endif
68  enddo
69  enddo
70  endif
71  enddo
72  endif
73 !
74  return
Hosted by OpenAircraft.com, (Michigan UAV, LLC)