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

Go to the source code of this file.

Functions/Subroutines

subroutine userelements (textpart, n, iuel, nuel, inpc, ipoinpc, iline)
 

Function/Subroutine Documentation

◆ userelements()

subroutine userelements ( character*132, dimension(16)  textpart,
integer  n,
integer, dimension(4,*)  iuel,
integer  nuel,
character*1, dimension(*)  inpc,
integer, dimension(0:*)  ipoinpc,
integer  iline 
)
21 !
22 ! reading the input deck: *USER ELEMENT
23 !
24  implicit none
25 !
26  character*1 inpc(*)
27  character*132 textpart(16)
28 !
29  integer n,iuel(4,*),nuel,i,j,istat,number,ipoinpc(0:*),iline,
30  & four,nodes,intpoints,maxdof,id
31 !
32  four=4
33 !
34  do i=2,n
35  if(textpart(i)(1:6).eq.'TYPE=U') then
36  number=ichar(textpart(i)(7:7))*256**3+
37  & ichar(textpart(i)(8:8))*256**2+
38  & ichar(textpart(i)(9:9))*256+
39  & ichar(textpart(i)(10:10))
40 c read(textpart(i)(7:16),'(i10)',iostat=istat) number
41 c if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
42 c & "*USER ELEMENT%")
43  elseif(textpart(i)(1:6).eq.'NODES=') then
44  read(textpart(i)(7:16),'(i10)',iostat=istat) nodes
45  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
46  & "*USER ELEMENT%")
47  elseif(textpart(i)(1:18).eq.'INTEGRATIONPOINTS=') then
48  read(textpart(i)(19:28),'(i10)',iostat=istat) intpoints
49  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
50  & "*USER ELEMENT%")
51  elseif(textpart(i)(1:7).eq.'MAXDOF=') then
52  read(textpart(i)(8:17),'(i10)',iostat=istat) maxdof
53  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
54  & "*USER ELEMENT%")
55  endif
56  enddo
57 !
58 ! check range
59 !
60 c if(number.gt.9999) then
61 c write(*,*) '*ERROR reading *USER ELEMENT'
62 c write(*,*) ' element number ',number,' exceeds 9999'
63 c call exit(201)
64 c endif
65 !
66  if(intpoints.gt.255) then
67  write(*,*) '*ERROR reading *USER ELEMENT'
68  write(*,*) ' number of integration points ',intpoints,
69  & ' exceeds 255'
70  call exit(201)
71  endif
72 !
73  if(maxdof.gt.255) then
74  write(*,*) '*ERROR reading *USER ELEMENT'
75  write(*,*) ' highest degree of freedom ',maxdof,
76  & ' exceeds 255'
77  call exit(201)
78  endif
79 !
80  if(nodes.gt.255) then
81  write(*,*) '*ERROR reading *USER ELEMENT'
82  write(*,*) ' number of nodes ',nodes,' exceeds 255'
83  call exit(201)
84  endif
85 !
86 ! storing the element information in iuel
87 !
88  call nidentk(iuel,number,nuel,id,four)
89 !
90  if(id.gt.0) then
91  if(iuel(1,id).eq.number) then
92  write(*,*) '*ERROR reading *USER ELEMENT'
93  write(*,*) ' element number was already defined'
94  call exit(201)
95  endif
96  endif
97 !
98  nuel=nuel+1
99  do i=nuel,id+2,-1
100  do j=1,4
101  iuel(j,i)=iuel(j,i-1)
102  enddo
103  enddo
104  iuel(1,id+1)=number
105  iuel(2,id+1)=intpoints
106  iuel(3,id+1)=maxdof
107  iuel(4,id+1)=nodes
108 !
109  return
subroutine nodes(inpc, textpart, co, nk, nk_, set, istartset, iendset, ialset, nset, nset_, nalset, nalset_, istep, istat, n, iline, ipol, inl, ipoinp, inp, ipoinpc)
Definition: nodes.f:22
subroutine inputerror(inpc, ipoinpc, iline, text)
Definition: inputerror.f:20
subroutine nidentk(x, px, n, id, k)
Definition: nidentk.f:27
Hosted by OpenAircraft.com, (Michigan UAV, LLC)