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

Go to the source code of this file.

Functions/Subroutines

subroutine mafillsmforc (nforc, ndirforc, nodeforc, xforc, nactdof, fext, nmpc, ipompc, nodempc, ikmpc, ilmpc, coefmpc, mi, rhsi, fnext, nmethod)
 

Function/Subroutine Documentation

◆ mafillsmforc()

subroutine mafillsmforc ( integer  nforc,
integer, dimension(*)  ndirforc,
integer, dimension(2,*)  nodeforc,
real*8, dimension(*)  xforc,
integer, dimension(0:mi(2),*)  nactdof,
real*8, dimension(*)  fext,
integer  nmpc,
integer, dimension(*)  ipompc,
integer, dimension(3,*)  nodempc,
integer, dimension(*)  ikmpc,
integer, dimension(*)  ilmpc,
real*8, dimension(*)  coefmpc,
integer, dimension(*)  mi,
logical  rhsi,
real*8, dimension(0:mi(2),*)  fnext,
integer  nmethod 
)
22 !
23 ! including point forces into the external force vector
24 !
25  implicit none
26 !
27  logical rhsi
28 !
29  integer nforc,ndirforc(*),nodeforc(2,*),mi(*),nactdof(0:mi(2),*),
30  & nmpc,ipompc(*),nodempc(3,*),ikmpc(*),ilmpc(*),i,jdof,id,ist,
31  & index,nmethod
32 !
33  real*8 xforc(*),fext(*),coefmpc(*),fnext(0:mi(2),*)
34 !
35  if(rhsi) then
36 !
37 ! point forces
38 !
39  do i=1,nforc
40  if(ndirforc(i).gt.mi(2)) cycle
41 c if(ndirforc(i).gt.3) cycle
42 !
43 ! updating the external force vector for dynamic
44 ! calculations
45 !
46  if(nmethod.eq.4) fnext(ndirforc(i),nodeforc(1,i))=
47  & fnext(ndirforc(i),nodeforc(1,i))+xforc(i)
48 !
49  jdof=nactdof(ndirforc(i),nodeforc(1,i))
50  if(jdof.gt.0) then
51  fext(jdof)=fext(jdof)+xforc(i)
52  else
53 !
54 ! node is a dependent node of a MPC: distribute
55 ! the forces among the independent nodes
56 ! (proportional to their coefficients)
57 !
58 c jdof=8*(nodeforc(1,i)-1)+ndirforc(i)
59 c call nident(ikmpc,jdof,nmpc,id)
60 c if(id.gt.0) then
61 c if(ikmpc(id).eq.jdof) then
62  if(jdof.ne.2*(jdof/2)) then
63 c id=ilmpc(id)
64  id=(-jdof+1)/2
65  ist=ipompc(id)
66  index=nodempc(3,ist)
67  if(index.eq.0) cycle
68  do
69  jdof=nactdof(nodempc(2,index),nodempc(1,index))
70  if(jdof.gt.0) then
71  fext(jdof)=fext(jdof)-
72  & coefmpc(index)*xforc(i)/coefmpc(ist)
73  endif
74  index=nodempc(3,index)
75  if(index.eq.0) exit
76  enddo
77 c endif
78  endif
79  endif
80  enddo
81 !
82  endif
83 !
84  return
Hosted by OpenAircraft.com, (Michigan UAV, LLC)