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

Go to the source code of this file.

Functions/Subroutines

subroutine masss (inpc, textpart, nrhcon, nmat, ntmat_, rhcon, matname, irstrt, istep, istat, n, iline, ipol, inl, ipoinp, inp, nmat_, set, istartset, iendset, ialset, nset, ielmat, ielorien, ipoinpc, mi, iaxial)
 

Function/Subroutine Documentation

◆ masss()

subroutine masss ( character*1, dimension(*)  inpc,
character*132, dimension(16)  textpart,
integer, dimension(*)  nrhcon,
integer  nmat,
integer  ntmat_,
real*8, dimension(0:1,ntmat_,*)  rhcon,
character*80, dimension(*)  matname,
integer  irstrt,
integer  istep,
integer  istat,
integer  n,
integer  iline,
integer  ipol,
integer  inl,
integer, dimension(2,*)  ipoinp,
integer, dimension(3,*)  inp,
integer  nmat_,
character*81, dimension(*)  set,
integer, dimension(*)  istartset,
integer, dimension(*)  iendset,
integer, dimension(*)  ialset,
integer  nset,
integer, dimension(mi(3),*)  ielmat,
integer, dimension(mi(3),*)  ielorien,
integer, dimension(0:*)  ipoinpc,
integer, dimension(*)  mi,
integer  iaxial 
)
23 !
24 ! reading the input deck: *MASS
25 !
26  implicit none
27 !
28  character*1 inpc(*)
29  character*80 matname(*)
30  character*81 set(*),elset
31  character*132 textpart(16)
32 !
33  integer mi(*),nrhcon(*),nmat,ntmat_,ntmat,istep,
34  & n,key,i,istat,istartset(*),iaxial,
35  & iendset(*),irstrt,iline,ipol,inl,ipoinp(2,*),inp(3,*),nmat_,
36  & ialset(*),ipos,nset,j,k,ielmat(mi(3),*),ielorien(mi(3),*),
37  & ipoinpc(0:*)
38 !
39  real*8 rhcon(0:1,ntmat_,*)
40 !
41  ntmat=0
42 !
43  if((istep.gt.0).and.(irstrt.ge.0)) then
44  write(*,*) '*ERROR reading *MASS: *MASS should be placed'
45  write(*,*) ' before all step definitions'
46  call exit(201)
47  endif
48 !
49  nmat=nmat+1
50  if(nmat.gt.nmat_) then
51  write(*,*) '*ERROR reading *MASS: increase nmat_'
52  call exit(201)
53  endif
54  matname(nmat)(1:4)='MASS'
55  do i=5,80
56  matname(nmat)(i:i)=' '
57  enddo
58 !
59  do i=2,n
60  if(textpart(i)(1:6).eq.'ELSET=') then
61  elset=textpart(i)(7:86)
62  elset(81:81)=' '
63  ipos=index(elset,' ')
64  elset(ipos:ipos)='E'
65  else
66  write(*,*)
67  & '*WARNING reading *MASS: parameter not recognized:'
68  write(*,*) ' ',
69  & textpart(i)(1:index(textpart(i),' ')-1)
70  call inputwarning(inpc,ipoinpc,iline,
71  &"*MASS%")
72  endif
73  enddo
74 !
75  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
76  & ipoinp,inp,ipoinpc)
77  if((istat.lt.0).or.(key.eq.1)) then
78  write(*,*) '*ERROR reading *MASS: definition of the'
79  write(*,*) ' mass is not complete'
80  call inputerror(inpc,ipoinpc,iline,
81  &"*MASS%")
82  call exit(201)
83  endif
84 !
85 ! reading the mass and storing it in rhcon
86 !
87  ntmat=ntmat+1
88  nrhcon(nmat)=ntmat
89  if(ntmat.gt.ntmat_) then
90  write(*,*) '*ERROR reading *MASS: increase ntmat_'
91  call exit(201)
92  endif
93  read(textpart(1)(1:20),'(f20.0)',iostat=istat)
94  & rhcon(1,ntmat,nmat)
95 !
96 ! dividing by 180 for axisymmetric structures
97 !
98  if(iaxial.eq.180) rhcon(1,ntmat,nmat)=rhcon(1,ntmat,nmat)/iaxial
99 !
100  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
101  &"*MASS%")
102  rhcon(0,ntmat,nmat)=0.d0
103 !
104  if(ntmat.eq.0) then
105  write(*,*) '*ERROR reading *MASS: *MASS card without data'
106  call exit(201)
107  endif
108  do i=1,nset
109  if(set(i).eq.elset) exit
110  enddo
111  if(i.gt.nset) then
112  elset(ipos:ipos)=' '
113  write(*,*) '*ERROR reading *MASS: element set ',elset
114  write(*,*) ' has not yet been defined. '
115  call inputerror(inpc,ipoinpc,iline,
116  &"*MASS%")
117  call exit(201)
118  endif
119 !
120 ! assigning the elements of the set the appropriate material
121 !
122  do j=istartset(i),iendset(i)
123  if(ialset(j).gt.0) then
124  ielmat(1,ialset(j))=nmat
125  ielorien(1,ialset(j))=0
126  else
127  k=ialset(j-2)
128  do
129  k=k-ialset(j)
130  if(k.ge.ialset(j-1)) exit
131  ielmat(1,k)=nmat
132  ielorien(1,k)=0
133  enddo
134  endif
135  enddo
136 !
137  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
138  & ipoinp,inp,ipoinpc)
139 !
140  return
subroutine inputwarning(inpc, ipoinpc, iline, text)
Definition: inputwarning.f:20
subroutine getnewline(inpc, textpart, istat, n, key, iline, ipol, inl, ipoinp, inp, ipoinpc)
Definition: getnewline.f:21
subroutine inputerror(inpc, ipoinpc, iline, text)
Definition: inputerror.f:20
Hosted by OpenAircraft.com, (Michigan UAV, LLC)