-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaddimdnodedof.f
73 lines (73 loc) · 2.53 KB
/
addimdnodedof.f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
!
! CalculiX - A 3-dimensional finite element program
! Copyright (C) 1998-2021 Guido Dhondt
!
! This program is free software; you can redistribute it and/or
! modify it under the terms of the GNU General Public License as
! published by the Free Software Foundation(version 2);
!
!
! This program is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with this program; if not, write to the Free Software
! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
!
subroutine addimdnodedof(node,k,ikmpc,ilmpc,ipompc,
& nodempc,nmpc,imdnode,nmdnode,imddof,nmddof,nactdof,mi,
& imdmpc,nmdmpc,imdboun,nmdboun,ikboun,nboun,ilboun)
!
! node was kept by the user in a modal dynamics calculation;
! the present routine checks DOF k of node; if this DOF belongs
! to a MPC all independent nodes and DOF's of the MPC have to be kept
!
implicit none
!
integer node,k,idof,ikmpc(*),ilmpc(*),ipompc(*),nodempc(3,*),
& nmpc,imdnode(*),nmdnode,imddof(*),nmddof,id,ist,index,jdof,
& mi(*),nactdof(0:mi(2),*),imdmpc(*),nmdmpc,imdboun(*),nmdboun,
& ikboun(*),nboun,ilboun(*)
!
idof=nactdof(k,node)
c write(*,*) 'addimdnodedof ',node,k,idof
if(idof.le.0) then
idof=(node-1)*8+k
!
! checking for mpc's
!
call nident(ikmpc,idof,nmpc,id)
if(id.gt.0) then
if(ikmpc(id).eq.idof) then
call addimd(imdmpc,nmdmpc,ilmpc(id))
id=ilmpc(id)
ist=ipompc(id)
index=nodempc(3,ist)
if(index.ne.0) then
do
call addimd(imdnode,nmdnode,nodempc(1,index))
jdof=nactdof(nodempc(2,index),nodempc(1,index))
if(jdof.gt.0) call addimd(imddof,nmddof,jdof)
index=nodempc(3,index)
if(index.eq.0) exit
enddo
endif
endif
endif
!
! checking for spc's
!
call nident(ikboun,idof,nboun,id)
if(id.gt.0) then
if(ikboun(id).eq.idof) then
call addimd(imdboun,nmdboun,ilboun(id))
endif
endif
else
call addimd(imddof,nmddof,idof)
endif
!
return
end