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

Go to the source code of this file.

Functions/Subroutines

subroutine mpcrem (i, mpcfree, nodempc, nmpc, ikmpc, ilmpc, labmpc, coefmpc, ipompc)
 

Function/Subroutine Documentation

◆ mpcrem()

subroutine mpcrem ( integer  i,
integer  mpcfree,
integer, dimension(3,*)  nodempc,
integer  nmpc,
integer, dimension(*)  ikmpc,
integer, dimension(*)  ilmpc,
character*20, dimension(*)  labmpc,
real*8, dimension(*)  coefmpc,
integer, dimension(*)  ipompc 
)
21 !
22 ! removes multiple point constraint i
23 !
24  implicit none
25 !
26  character*20 labmpc(*)
27 !
28  integer nodempc(3,*),node,nmpc,i,j,index,mpcfree,mpcfreeold,
29  & ikmpc(*),ilmpc(*),idof,id,ipompc(*),idir
30 !
31  real*8 coefmpc(*)
32 !
33  mpcfreeold=mpcfree
34  index=ipompc(i)
35  ipompc(i)=0
36  node=nodempc(1,index)
37  idir=nodempc(2,index)
38  idof=8*(node-1)+idir
39  call nident(ikmpc,idof,nmpc,id)
40 c mpcfree=nodempc(3,index)
41  mpcfree=index
42 !
43 ! removing the MPC from fields nodempc and coefmpc
44 !
45  do
46  nodempc(1,index)=0
47  nodempc(2,index)=0
48  coefmpc(index)=0
49  if(nodempc(3,index).ne.0) then
50  index=nodempc(3,index)
51  else
52  nodempc(3,index)=mpcfreeold
53  exit
54  endif
55  enddo
56 !
57 ! decrementing nmpc
58 !
59  nmpc=nmpc-1
60 !
61 ! shifting fields ikmpc,ilmpc
62 !
63  do j=id,nmpc
64  ikmpc(j)=ikmpc(j+1)
65  ilmpc(j)=ilmpc(j+1)
66  enddo
67  ikmpc(nmpc+1)=0
68  ilmpc(nmpc+1)=0
69 !
70 ! shifting fields ipompc,labmpc
71 !
72  do j=i,nmpc
73  ipompc(j)=ipompc(j+1)
74  labmpc(j)=labmpc(j+1)
75  enddo
76  ipompc(nmpc+1)=0
77 !
78 ! updating ilmpc
79 !
80  do j=1,nmpc
81  if(ilmpc(j).gt.i) ilmpc(j)=ilmpc(j)-1
82  enddo
83 !
84  return
subroutine nident(x, px, n, id)
Definition: nident.f:26
Hosted by OpenAircraft.com, (Michigan UAV, LLC)