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

Go to the source code of this file.

Functions/Subroutines

subroutine frequencys (inpc, textpart, nmethod, mei, fei, iperturb, istep, istat, n, iline, ipol, inl, ipoinp, inp, ithermal, isolver, xboun, nboun, ipoinpc, ipompc, labmpc, fmpc, ikmpc, ilmpc, nmpc)
 

Function/Subroutine Documentation

◆ frequencys()

subroutine frequencys ( character*1, dimension(*)  inpc,
character*132, dimension(16)  textpart,
integer  nmethod,
integer, dimension(4)  mei,
real*8, dimension(3)  fei,
integer, dimension(2)  iperturb,
integer  istep,
integer  istat,
integer  n,
integer  iline,
integer  ipol,
integer  inl,
integer, dimension(2,*)  ipoinp,
integer, dimension(3,*)  inp,
integer  ithermal,
integer  isolver,
real*8, dimension(*)  xboun,
integer  nboun,
integer, dimension(0:*)  ipoinpc,
integer, dimension(*)  ipompc,
character*20, dimension(*)  labmpc,
real*8, dimension(*)  fmpc,
integer, dimension(*)  ikmpc,
integer, dimension(*)  ilmpc,
integer  nmpc 
)
23 !
24 ! reading the input deck: *FREQUENCY
25 !
26  implicit none
27 !
28  logical global,cycmpcactive
29 !
30  character*1 inpc(*)
31  character*20 solver,labmpc(*)
32  character*132 textpart(16)
33 !
34  integer nmethod,mei(4),ncv,mxiter,istep,istat,iperturb(2),i,
35  & nboun,
36  & n,key,iline,ipol,inl,ipoinp(2,*),inp(3,*),nev,ithermal,isolver,
37  & ipoinpc(0:*),nmpcred,kflag,ipompc(*),ikmpc(*),ilmpc(*),nmpc
38 !
39  real*8 fei(3),pi,fmin,fmax,tol,xboun(*),fmpc(*)
40 !
41  global=.true.
42  cycmpcactive=.true.
43 !
44  pi=4.d0*datan(1.d0)
45  mei(4)=0
46 !
47 ! defaults for fmin and fmax
48 !
49  fmin=-1.d0
50  fmax=-1.d0
51 !
52  if(istep.lt.1) then
53  write(*,*) '*ERROR in frequencies: *FREQUENCY can only be used'
54  write(*,*) ' within a STEP'
55  call exit(201)
56  endif
57 !
58 ! no heat transfer analysis
59 !
60  if(ithermal.gt.1) then
61  ithermal=1
62  endif
63 !
64 ! default solver
65 !
66  solver=' '
67  if(isolver.eq.0) then
68  solver(1:20)='SPOOLES '
69  elseif(isolver.eq.2) then
70  solver(1:16)='ITERATIVESCALING'
71  elseif(isolver.eq.3) then
72  solver(1:17)='ITERATIVECHOLESKY'
73  elseif(isolver.eq.4) then
74  solver(1:3)='SGI'
75  elseif(isolver.eq.5) then
76  solver(1:5)='TAUCS'
77  elseif(isolver.eq.7) then
78  solver(1:7)='PARDISO'
79  endif
80 !
81  do i=2,n
82  if(textpart(i)(1:7).eq.'SOLVER=') then
83  read(textpart(i)(8:27),'(a20)') solver
84  elseif(textpart(i)(1:11).eq.'STORAGE=YES') then
85  mei(4)=1
86  elseif(textpart(i)(1:9).eq.'GLOBAL=NO') then
87  global=.false.
88  elseif(textpart(i)(1:15).eq.'CYCMPC=INACTIVE') then
89  cycmpcactive=.false.
90  else
91  write(*,*)
92  & '*WARNING in frequencies: parameter not recognized:'
93  write(*,*) ' ',
94  & textpart(i)(1:index(textpart(i),' ')-1)
95  call inputwarning(inpc,ipoinpc,iline,
96  &"*FREQUENCY%")
97  endif
98  enddo
99 !
100  if(solver(1:7).eq.'SPOOLES') then
101  isolver=0
102  elseif(solver(1:16).eq.'ITERATIVESCALING') then
103  write(*,*) '*WARNING in frequencies: the iterative scaling'
104  write(*,*) ' procedure is not available for frequency'
105  write(*,*) ' calculations; the default solver is used'
106  elseif(solver(1:17).eq.'ITERATIVECHOLESKY') then
107  write(*,*) '*WARNING in frequencies: the iterative scaling'
108  write(*,*) ' procedure is not available for frequency'
109  write(*,*) ' calculations; the default solver is used'
110  elseif(solver(1:3).eq.'SGI') then
111  isolver=4
112  elseif(solver(1:5).eq.'TAUCS') then
113  isolver=5
114  elseif(solver(1:13).eq.'MATRIXSTORAGE') then
115  isolver=6
116  elseif(solver(1:7).eq.'PARDISO') then
117  isolver=7
118  else
119  write(*,*) '*WARNING in frequencies: unknown solver;'
120  write(*,*) ' the default solver is used'
121  endif
122 !
123  if((isolver.eq.2).or.(isolver.eq.3)) then
124  write(*,*) '*ERROR in frequencies: the default solver ',
125  & solver
126  write(*,*) ' cannot be used for frequency calculations '
127  call exit(201)
128  endif
129 !
130  nmethod=2
131  if(iperturb(1).gt.1) iperturb(1)=0
132 c iperturb(2)=0
133 !
134  if(isolver.ne.6) then
135  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
136  & ipoinp,inp,ipoinpc)
137  if((istat.lt.0).or.(key.eq.1)) then
138  write(*,*) '*ERROR in frequencies: definition not complete'
139  write(*,*) ' '
140  call inputerror(inpc,ipoinpc,iline,
141  &"*FREQUENCY%")
142  call exit(201)
143  endif
144  read(textpart(1)(1:10),'(i10)',iostat=istat) nev
145  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
146  &"*FREQUENCY%")
147  if(nev.le.0) then
148  write(*,*) '*ERROR in frequencies: less than 1 eigenvalue re
149  &quested'
150  call exit(201)
151  endif
152  tol=1.d-2
153  ncv=4*nev
154  ncv=ncv+nev
155  mxiter=1000
156  if(textpart(2)(1:1).ne.' ') then
157  read(textpart(2)(1:20),'(f20.0)',iostat=istat) fmin
158  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
159  &"*FREQUENCY%")
160  endif
161  if(textpart(3)(1:1).ne.' ') then
162  read(textpart(3)(1:20),'(f20.0)',iostat=istat) fmax
163  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
164  &"*FREQUENCY%")
165  endif
166 !
167  mei(1)=nev
168  mei(2)=ncv
169  mei(3)=mxiter
170  fei(1)=tol
171  fei(2)=fmin
172  fei(3)=fmax
173 !
174  else
175 !
176 ! matrix storage
177 !
178  if(global) then
179  mei(1)=1
180  else
181  mei(1)=0
182  endif
183 !
184  if(.not.cycmpcactive) then
185 !
186 ! remove the CYCLIC and SUBCYCLIC MPC's
187 !
188  nmpcred=0
189 !
190  kflag=2
191  call isortii(ilmpc,ikmpc,nmpc,kflag)
192 !
193  do i=1,nmpc
194  if((labmpc(i)(1:6).eq.'CYCLIC').or.
195  & (labmpc(i)(1:9).eq.'SUBCYCLIC')) cycle
196  nmpcred=nmpcred+1
197  ipompc(nmpcred)=ipompc(i)
198  labmpc(nmpcred)=labmpc(i)
199  fmpc(nmpcred)=fmpc(i)
200  ikmpc(nmpcred)=ikmpc(i)
201  ilmpc(nmpcred)=nmpcred
202  enddo
203 !
204  nmpc=nmpcred
205  call isortii(ikmpc,ilmpc,nmpc,kflag)
206  endif
207  endif
208 !
209 ! removing nonzero boundary conditions
210 !
211  do i=1,nboun
212  xboun(i)=0.d0
213  enddo
214 !
215  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
216  & ipoinp,inp,ipoinpc)
217 !
218  return
subroutine inputwarning(inpc, ipoinpc, iline, text)
Definition: inputwarning.f:20
subroutine isortii(ix, iy, n, kflag)
Definition: isortii.f:6
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)