1!
2!     CalculiX - A 3-dimensional finite element program
3!              Copyright (C) 1998-2021 Guido Dhondt
4!
5!     This program is free software; you can redistribute it and/or
6!     modify it under the terms of the GNU General Public License as
7!     published by the Free Software Foundation(version 2);
8!
9!
10!     This program is distributed in the hope that it will be useful,
11!     but WITHOUT ANY WARRANTY; without even the implied warranty of
12!     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13!     GNU General Public License for more details.
14!
15!     You should have received a copy of the GNU General Public License
16!     along with this program; if not, write to the Free Software
17!     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18!
19      subroutine addizdofcload(nodeforc,ndirforc,nactdof,mi,izdof,
20     &  nzdof,iforc,iznode,nznode,nk,imdnode,nmdnode,xforc,ntrans,
21     &  inotr)
22!
23!     adds the dof in which a point force was applied to iznode, izdof
24!     and to ** imdnode if user-defined load **
25!     (needed in dyna.c and steadystate.c)
26!
27      implicit none
28!
29      integer nodeforc(2,*),ndirforc(*),iforc,node,j,jdof,mi(*),nk,
30     &  nactdof(0:mi(2),*),izdof(*),nzdof,iznode(*),nznode,nodebasis,
31     &  imdnode(*),nmdnode,ntrans,itr,inotr(2,*)
32!
33      real*8 xforc(*)
34!
35      node=nodeforc(1,iforc)
36!
37!     adding the nodes in the basis sector to iznode
38!
39      nodebasis=mod(node,nk)
40      call addimd(iznode,nznode,nodebasis)
41c!
42c!     user-defined load
43c!
44c      if((xforc(iforc).lt.1.2357111318d0).and.
45c     &     (xforc(iforc).gt.1.2357111316d0)) then
46c         call addimd(imdnode,nmdnode,node)
47c      endif
48!
49      if(ntrans.eq.0) then
50         itr=0
51      else
52         itr=inotr(1,node)
53      endif
54!
55      if(itr.eq.0) then
56!
57!        no local transformation
58!
59         j=ndirforc(iforc)
60!
61!        C-convention!
62!
63         jdof=nactdof(j,node)-1
64         if(jdof.gt.0) call addimd(izdof,nzdof,jdof)
65      else
66!
67!        local transformation: loop over all dofs
68!
69         do j=1,3
70            jdof=nactdof(j,node)-1
71            if(jdof.gt.0) call addimd(izdof,nzdof,jdof)
72         enddo
73      endif
74!
75      return
76      end
77
78