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

Go to the source code of this file.

Functions/Subroutines

subroutine buckles (inpc, textpart, nmethod, mei, fei, nforc, nload, ithermal, iprestr, nbody, t0, t1, nk, iperturb, istep, istat, n, iline, ipol, inl, ipoinp, inp, isolver, ipoinpc)
 

Function/Subroutine Documentation

◆ buckles()

subroutine buckles ( character*1, dimension(*)  inpc,
character*132, dimension(16)  textpart,
integer  nmethod,
integer, dimension(4)  mei,
real*8, dimension(3)  fei,
integer  nforc,
integer  nload,
integer  ithermal,
integer  iprestr,
integer  nbody,
real*8, dimension(*)  t0,
real*8, dimension(*)  t1,
integer  nk,
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  isolver,
integer, dimension(0:*)  ipoinpc 
)
22 !
23 ! reading the input deck: *BUCKLE
24 !
25  implicit none
26 !
27  character*1 inpc(*)
28  character*20 solver
29  character*132 textpart(16)
30 !
31  integer nmethod,mei(4),istep,istat,n,key,ncv,mxiter,
32  & nforc,nload,ithermal,iprestr,i,nk,iperturb(2),iline,ipol,inl,
33  & ipoinp(2,*),inp(3,*),nev,isolver,nbody,ipoinpc(0:*)
34 !
35  real*8 fei(3),t0(*),t1(*),tol
36 !
37  if(istep.lt.1) then
38  write(*,*) '*ERROR in buckles: *BUCKLE can only be used'
39  write(*,*) ' within a STEP'
40  call exit(201)
41  endif
42 !
43 ! no heat transfer analysis
44 !
45  if(ithermal.gt.1) then
46  ithermal=1
47  endif
48 !
49 ! default solver
50 !
51  solver=' '
52  if(isolver.eq.0) then
53  solver(1:7)='SPOOLES'
54  elseif(isolver.eq.2) then
55  solver(1:16)='ITERATIVESCALING'
56  elseif(isolver.eq.3) then
57  solver(1:17)='ITERATIVECHOLESKY'
58  elseif(isolver.eq.4) then
59  solver(1:3)='SGI'
60  elseif(isolver.eq.5) then
61  solver(1:5)='TAUCS'
62  elseif(isolver.eq.7) then
63  solver(1:7)='PARDISO'
64  endif
65 !
66  do i=2,n
67  if(textpart(i)(1:7).eq.'SOLVER=') then
68  read(textpart(i)(8:27),'(a20)') solver
69  else
70  write(*,*)
71  & '*WARNING in buckles: parameter not recognized:'
72  write(*,*) ' ',
73  & textpart(i)(1:index(textpart(i),' ')-1)
74  call inputwarning(inpc,ipoinpc,iline,
75  &"*BUCKLE%")
76  endif
77  enddo
78 !
79  if(solver(1:7).eq.'SPOOLES') then
80  isolver=0
81  elseif(solver(1:16).eq.'ITERATIVESCALING') then
82  write(*,*) '*WARNING in frequencies: the iterative scaling'
83  write(*,*) ' procedure is not available for buckling'
84  write(*,*) ' calculations; the default solver is used'
85  elseif(solver(1:17).eq.'ITERATIVECHOLESKY') then
86  write(*,*) '*WARNING in frequencies: the iterative scaling'
87  write(*,*) ' procedure is not available for buckling'
88  write(*,*) ' calculations; the default solver is used'
89  elseif(solver(1:3).eq.'SGI') then
90  isolver=4
91  elseif(solver(1:5).eq.'TAUCS') then
92  isolver=5
93  elseif(solver(1:7).eq.'PARDISO') then
94  isolver=7
95  else
96  write(*,*) '*WARNING in buckles: unknown solver;'
97  write(*,*) ' the default solver is used'
98  endif
99 !
100  if((isolver.eq.2).or.(isolver.eq.3)) then
101  write(*,*) '*ERROR in buckles: the default solver ',
102  & solver
103  write(*,*) ' cannot be used for buckling calculations '
104  call exit(201)
105  endif
106 !
107  nmethod=3
108  if(iperturb(1).gt.1) iperturb(1)=0
109  iperturb(2)=0
110 !
111  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
112  & ipoinp,inp,ipoinpc)
113  if((istat.lt.0).or.(key.eq.1)) then
114  write(*,*) '*ERROR in buckles: definition not complete'
115  write(*,*) ' '
116  call inputerror(inpc,ipoinpc,iline,
117  &"*BUCKLE%")
118  call exit(201)
119  endif
120  read(textpart(1)(1:10),'(i10)',iostat=istat) nev
121  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
122  &"*BUCKLE%")
123  if(nev.le.0) then
124  write(*,*) '*ERROR in buckles: less than 1 eigenvalue re
125  &quested'
126  call exit(201)
127  endif
128  read(textpart(2)(1:20),'(f20.0)',iostat=istat) tol
129  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
130  &"*BUCKLE%")
131  if(tol.le.0.) then
132  tol=1.d-2
133  endif
134  read(textpart(3)(1:10),'(i10)',iostat=istat) ncv
135  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
136  &"*BUCKLE%")
137  if(ncv.le.0) then
138  ncv=4*nev
139  endif
140  ncv=ncv+nev
141  read(textpart(4)(1:10),'(i10)',iostat=istat) mxiter
142  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
143  &"*BUCKLE%")
144  if(mxiter.le.0) then
145  mxiter=1000
146  endif
147 !
148 ! removing the natural boundary conditions
149 !
150  nforc=0
151  nload=0
152  nbody=0
153  iprestr=0
154  if(ithermal.eq.1) then
155  do i=1,nk
156  t1(i)=t0(i)
157  enddo
158  endif
159 !
160  mei(1)=nev
161  mei(2)=ncv
162  mei(3)=mxiter
163  fei(1)=tol
164 !
165  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
166  & ipoinp,inp,ipoinpc)
167 !
168  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)