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

Go to the source code of this file.

Functions/Subroutines

subroutine uncouptempdisps (inpc, textpart, nmethod, iperturb, isolver, istep, istat, n, tinc, tper, tmin, tmax, idrct, ithermal, iline, ipol, inl, ipoinp, inp, ipoinpc, alpha, ctrl, ttime, nener)
 

Function/Subroutine Documentation

◆ uncouptempdisps()

subroutine uncouptempdisps ( character*1, dimension(*)  inpc,
character*132, dimension(16)  textpart,
integer  nmethod,
integer  iperturb,
integer  isolver,
integer  istep,
integer  istat,
integer  n,
real*8  tinc,
real*8  tper,
real*8  tmin,
real*8  tmax,
integer  idrct,
integer  ithermal,
integer  iline,
integer  ipol,
integer  inl,
integer, dimension(2,*)  ipoinp,
integer, dimension(3,*)  inp,
integer, dimension(0:*)  ipoinpc,
real*8  alpha,
real*8, dimension(*)  ctrl,
real*8  ttime,
integer  nener 
)
23 !
24 ! reading the input deck: *UNCOUPLED TEMPERATURE-DISPLACEMENT
25 !
26 ! isolver=0: SPOOLES
27 ! 2: iterative solver with diagonal scaling
28 ! 3: iterative solver with Cholesky preconditioning
29 ! 4: sgi solver
30 ! 5: TAUCS
31 ! 7: pardiso
32 !
33  implicit none
34 !
35  logical timereset
36 !
37  character*1 inpc(*)
38  character*20 solver
39  character*132 textpart(16)
40 !
41  integer nmethod,iperturb,isolver,istep,istat,n,key,i,idrct,
42  & ithermal,iline,ipol,inl,ipoinp(2,*),inp(3,*),ipoinpc(0:*),
43  & nener
44 !
45  real*8 tinc,tper,tmin,tmax,alpha,ctrl(*),ttime
46 !
47  idrct=0
48  alpha=-0.05d0
49  tmin=0.d0
50  tmax=0.d0
51  nmethod=4
52  timereset=.false.
53 !
54  if(iperturb.eq.0) then
55  iperturb=2
56  elseif((iperturb.eq.1).and.(istep.gt.1)) then
57  write(*,*)
58  & '*ERROR reading *UNCOUPLED TEMPERATURE-DISPLACEMENT:'
59  write(*,*) ' perturbation analysis is not provided in a '
60  write(*,*) ' *UNCOUPLED TEMPERATURE-DISPLACEMENT step.'
61  call exit(201)
62  endif
63 !
64  if(istep.lt.1) then
65  write(*,*)
66  & '*ERROR reading *UNCOUPLED TEMPERATURE-DISPLACEMENT:'
67  write(*,*) ' *UNCOUPLED TEMPERATURE-DISPLACMENT '
68  write(*,*) ' can only be used within a STEP'
69  call exit(201)
70  endif
71 !
72 ! default solver
73 !
74  solver=' '
75  if(isolver.eq.0) then
76  solver(1:7)='SPOOLES'
77  elseif(isolver.eq.2) then
78  solver(1:16)='ITERATIVESCALING'
79  elseif(isolver.eq.3) then
80  solver(1:17)='ITERATIVECHOLESKY'
81  elseif(isolver.eq.4) then
82  solver(1:3)='SGI'
83  elseif(isolver.eq.5) then
84  solver(1:5)='TAUCS'
85  elseif(isolver.eq.7) then
86  solver(1:7)='PARDISO'
87  endif
88 !
89  do i=2,n
90  if(textpart(i)(1:6).eq.'ALPHA=') then
91  read(textpart(i)(7:26),'(f20.0)',iostat=istat) alpha
92  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
93  &"*UNCOUPLED TEMPERATURE-DISPLACEMENT%")
94  if(alpha.lt.-1.d0/3.d0) then
95  write(*,*) '*WARNING in dynamics: alpha is smaller'
96  write(*,*) ' than -1/3 and is reset to -1/3'
97  alpha=-1.d0/3.d0
98  elseif(alpha.gt.0.d0) then
99  write(*,*) '*WARNING in dynamics: alpha is greater'
100  write(*,*) ' than 0 and is reset to 0'
101  alpha=0.d0
102  endif
103  elseif(textpart(i)(1:7).eq.'SOLVER=') then
104  read(textpart(i)(8:27),'(a20)') solver
105  elseif((textpart(i)(1:6).eq.'DIRECT').and.
106  & (textpart(i)(1:9).ne.'DIRECT=NO')) then
107  idrct=1
108  elseif(textpart(i)(1:11).eq.'STEADYSTATE') then
109  nmethod=1
110  elseif(textpart(i)(1:7).eq.'DELTMX=') then
111  read(textpart(i)(8:27),'(f20.0)',iostat=istat) ctrl(27)
112  elseif(textpart(i)(1:9).eq.'TIMERESET') then
113  timereset=.true.
114  elseif(textpart(i)(1:17).eq.'TOTALTIMEATSTART=') then
115  read(textpart(i)(18:37),'(f20.0)',iostat=istat) ttime
116  else
117  write(*,*)
118  & '*WARNING in uncouptempdisps: parameter not recognized:'
119  write(*,*) ' ',
120  & textpart(i)(1:index(textpart(i),' ')-1)
121  call inputwarning(inpc,ipoinpc,iline,
122  &"*UNCOUPLED TEMPERATURE-DISPLACEMENT%")
123  endif
124  enddo
125  if(nmethod.eq.1) ctrl(27)=1.d30
126 !
127  if((ithermal.eq.0).and.(nmethod.ne.1).and.
128  & (nmethod.ne.2).and.(iperturb.ne.0)) then
129  write(*,*)
130  & '*ERROR reading *UNCOUPLED TEMPERATURE-DISPLACEMENT:'
131  write(*,*) ' please define initial '
132  write(*,*) ' conditions for the temperature'
133  call exit(201)
134  else
135  ithermal=4
136  endif
137 !
138  if(solver(1:7).eq.'SPOOLES') then
139  isolver=0
140  elseif(solver(1:16).eq.'ITERATIVESCALING') then
141  isolver=2
142  elseif(solver(1:17).eq.'ITERATIVECHOLESKY') then
143  isolver=3
144  elseif(solver(1:3).eq.'SGI') then
145  isolver=4
146  elseif(solver(1:5).eq.'TAUCS') then
147  isolver=5
148  elseif(solver(1:7).eq.'PARDISO') then
149  isolver=7
150  else
151  write(*,*)
152  & '*WARNING reading *UNCOUPLED TEMPERATURE-DISPLACEMENT:'
153  write(*,*) ' unknown solver;'
154  write(*,*) ' the default solver is used'
155  endif
156 !
157  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
158  & ipoinp,inp,ipoinpc)
159  if((istat.lt.0).or.(key.eq.1)) then
160  if(iperturb.ge.2) then
161  write(*,*)
162  & '*WARNING reading *UNCOUPLED TEMPERATURE-DISPLACEMENT:'
163  write(*,*) ' a nonlinear analysis is requested'
164  write(*,*) ' but no time increment nor step is speci
165  &fied'
166  write(*,*) ' the defaults (1,1) are used'
167  tinc=1.d0
168  tper=1.d0
169  tmin=1.d-5
170  tmax=1.d+30
171  endif
172  if(timereset)ttime=ttime-tper
173  if(nmethod.eq.4) nener=1
174  return
175  endif
176 !
177  read(textpart(1)(1:20),'(f20.0)',iostat=istat) tinc
178  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
179  &"*UNCOUPLED TEMPERATURE-DISPLACEMENT%")
180  read(textpart(2)(1:20),'(f20.0)',iostat=istat) tper
181  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
182  &"*UNCOUPLED TEMPERATURE-DISPLACEMENT%")
183  read(textpart(3)(1:20),'(f20.0)',iostat=istat) tmin
184  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
185  &"*UNCOUPLED TEMPERATURE-DISPLACEMENT%")
186  read(textpart(4)(1:20),'(f20.0)',iostat=istat) tmax
187  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
188  &"*UNCOUPLED TEMPERATURE-DISPLACEMENT%")
189 !
190  if(tinc.le.0.d0) then
191  write(*,*)
192  & '*ERROR reading *UNCOUPLED TEMPERATURE-DISPLACEMENT:'
193  write(*,*) ' initial increment size is
194  &negative'
195  endif
196  if(tper.le.0.d0) then
197  write(*,*)
198  & '*ERROR reading *UNCOUPLED TEMPERATURE-DISPLACEMENT:'
199  write(*,*) ' step size is negative'
200  endif
201  if(tinc.gt.tper) then
202  write(*,*)
203  & '*ERROR reading *UNCOUPLED TEMPERATURE-DISPLACEMENT:'
204  write(*,*) ' initial increment size exc
205  &eeds step size'
206  endif
207 !
208  if(idrct.ne.1) then
209  if(dabs(tmin).lt.1.d-6*tper) then
210  tmin=min(tinc,1.d-6*tper)
211  endif
212  if(dabs(tmax).lt.1.d-10) then
213  tmax=1.d+30
214  endif
215  if(tinc.gt.dabs(tmax)) then
216  write(*,*)
217  & '*WARNING reading *UNCOUPLED TEMPERATURE-DISPLACEMENT'
218  write(*,*) ' the initial increment ',tinc
219  write(*,*) ' exceeds the maximum increment ',
220  & tmax
221  write(*,*) ' the initial increment is reduced'
222  write(*,*) ' to the maximum value'
223  tinc=dabs(tmax)
224  endif
225  endif
226 !
227  if(timereset)ttime=ttime-tper
228 !
229  if(nmethod.eq.4) nener=1
230 !
231  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
232  & ipoinp,inp,ipoinpc)
233 !
234  return
subroutine inputwarning(inpc, ipoinpc, iline, text)
Definition: inputwarning.f:20
#define min(a, b)
Definition: cascade.c:31
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)