~gabriel1984sibiu/calculix/ccx

« back to all changes in this revision

Viewing changes to CalculiX/ccx_2.11/src/createialelem.f

  • Committer: Grevutiu Gabriel
  • Date: 2016-12-30 12:06:41 UTC
  • Revision ID: gabriel1984sibiu@gmail.com-20161230120641-kzmhfy8mn00w3mhg
New upstream version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
!
 
2
!     CalculiX - A 3-dimensional finite element program
 
3
!              Copyright (C) 1998-2015 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 createialelem(ne,istartelem,ialelem,ipoeldi,ieldi)
 
20
!
 
21
      implicit none
 
22
!
 
23
      integer ne,istartelem(*),ialelem(*),ipoeldi(*),ieldi(2,*),
 
24
     &  ifree,i,index
 
25
!
 
26
!     determining the design variables belonging to a given 
 
27
!     element i. They are stored in ialelem(istartelem(i))..
 
28
!     ...up to..... ialdesi(istartelem(i+1)-1)
 
29
!
 
30
      ifree=1
 
31
      do i=1,ne
 
32
         istartelem(i)=ifree
 
33
         index=ipoeldi(i)
 
34
         do
 
35
            if(index.eq.0) exit
 
36
            ialelem(ifree)=ieldi(1,index)
 
37
            ifree=ifree+1
 
38
            index=ieldi(2,index)
 
39
         enddo
 
40
      enddo
 
41
      istartelem(ne+1)=ifree
 
42
!
 
43
      return
 
44
      end