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

Go to the source code of this file.

Functions/Subroutines

subroutine objective_disp (nodeset, istartset, iendset, ialset, nk, idesvarc, iobject, mi, g0, nobject, vold)
 

Function/Subroutine Documentation

◆ objective_disp()

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