38 character*132 textpart(16)
40 integer nmethod,iperturb,isolver,istep,istat,n,key,i,idrct,nev,
41 & ithermal,iline,ipol,inl,ipoinp(2,*),inp(3,*),mei(4),ncv,mxiter,
42 & ipoinpc(0:*),idirect,iheat
44 real*8 tinc,tper,tmin,tmax,alpha,fei(3),tol,fmin,fmax,ctrl(*),
59 if(iperturb.eq.0)
then 61 elseif((iperturb.eq.1).and.(istep.gt.1))
then 63 &
'*ERROR reading *ELECTROMAGNETICS: perturbation analysis is' 64 write(*,*)
' not provided in a *HEAT TRANSFER step.' 70 &
'*ERROR reading *ELECTROMAGNETICS: *HEAT TRANSFER can only' 71 write(*,*)
' be used within a STEP' 80 elseif(isolver.eq.2)
then 81 solver(1:16)=
'ITERATIVESCALING' 82 elseif(isolver.eq.3)
then 83 solver(1:17)=
'ITERATIVECHOLESKY' 84 elseif(isolver.eq.4)
then 86 elseif(isolver.eq.5)
then 88 elseif(isolver.eq.7)
then 96 if(textpart(i)(1:7).eq.
'SOLVER=')
then 97 read(textpart(i)(8:27),
'(a20)') solver
98 elseif((textpart(i)(1:6).eq.
'DIRECT').and.
99 & (textpart(i)(1:9).ne.
'DIRECT=NO'))
then 101 elseif(textpart(i)(1:9).eq.
'DIRECT=NO')
then 103 elseif(textpart(i)(1:14).eq.
'MAGNETOSTATICS')
then 105 elseif(textpart(i)(1:9).eq.
'FREQUENCY')
then 107 elseif(textpart(i)(1:7).eq.
'DELTMX=')
then 108 read(textpart(i)(8:27),
'(f20.0)',iostat=istat) ctrl(27)
109 elseif(textpart(i)(1:9).eq.
'TIMERESET')
then 111 elseif(textpart(i)(1:17).eq.
'TOTALTIMEATSTART=')
then 112 read(textpart(i)(18:37),
'(f20.0)',iostat=istat) ttime
113 elseif(textpart(i)(1:14).eq.
'NOHEATTRANSFER')
then 117 &
'*WARNING reading *ELECTROMAGNETICS: parameter not recognized:' 119 & textpart(i)(1:index(textpart(i),
' ')-1)
121 &
"*ELECTROMAGNETICS%")
124 if(nmethod.eq.8) ctrl(27)=1.d30
129 if(iperturb.eq.0)
then 131 if(idirect.eq.0)idrct=0
134 if(idirect.eq.1)idrct=1
137 if(nmethod.eq.9)
then 139 if(ithermal.eq.0)
then 141 &
'*ERROR reading *ELECTROMAGNETICS: please define initial ' 142 write(*,*)
' conditions for the temperature' 149 if((nmethod.ne.10).and.(iperturb.ne.0))
then 153 if(solver(1:7).eq.
'SPOOLES')
then 155 elseif(solver(1:16).eq.
'ITERATIVESCALING')
then 157 elseif(solver(1:17).eq.
'ITERATIVECHOLESKY')
then 159 elseif(solver(1:3).eq.
'SGI')
then 161 elseif(solver(1:5).eq.
'TAUCS')
then 163 elseif(solver(1:7).eq.
'PARDISO')
then 167 &
'*WARNING reading *ELECTROMAGNETICS: unknown solver;' 168 write(*,*)
' the default solver is used' 171 call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
172 & ipoinp,inp,ipoinpc)
173 if((istat.lt.0).or.(key.eq.1))
then 174 if(iperturb.ge.2)
then 175 write(*,*)
'*WARNING reading *ELECTROMAGNETICS: a nonline 176 &ar geometric analysis is requested' 177 write(*,*)
' but no time increment nor step is sp 179 write(*,*)
' the defaults (1,1) are used' 185 if(timereset)ttime=ttime-tper
189 read(textpart(1)(1:20),
'(f20.0)',iostat=istat) tinc
190 if(istat.gt.0)
call inputerror(inpc,ipoinpc,iline,
191 &
"*ELECTROMAGNETICS%")
192 read(textpart(2)(1:20),
'(f20.0)',iostat=istat) tper
193 if(istat.gt.0)
call inputerror(inpc,ipoinpc,iline,
194 &
"*ELECTROMAGNETICS%")
195 read(textpart(3)(1:20),
'(f20.0)',iostat=istat) tmin
196 if(istat.gt.0)
call inputerror(inpc,ipoinpc,iline,
197 &
"*ELECTROMAGNETICS%")
198 read(textpart(4)(1:20),
'(f20.0)',iostat=istat) tmax
199 if(istat.gt.0)
call inputerror(inpc,ipoinpc,iline,
200 &
"*ELECTROMAGNETICS%")
202 if(tinc.le.0.d0)
then 203 write(*,*)
'*ERROR reading *ELECTROMAGNETICS: initial increm 204 &ent size is negative' 206 if(tper.le.0.d0)
then 208 &
'*ERROR reading *ELECTROMAGNETICS: step size is negative' 210 if(tinc.gt.tper)
then 211 write(*,*)
'*ERROR reading *ELECTROMAGNETICS: initial increm 212 &ent size exceeds step size' 218 if(dabs(tmin).lt.1.d-6*tper)
then 219 tmin=
min(tinc,1.d-6*tper)
221 if(dabs(tmax).lt.1.d-10)
then 225 elseif(nmethod.eq.10)
then 231 call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
232 & ipoinp,inp,ipoinpc)
233 if((istat.lt.0).or.(key.eq.1))
then 235 &
'*ERROR reading *ELECTROMAGNETICS: definition not complete' 238 &
"*ELECTROMAGNETICS%")
241 read(textpart(1)(1:10),
'(i10)',iostat=istat) nev
242 if(istat.gt.0)
call inputerror(inpc,ipoinpc,iline,
243 &
"*ELECTROMAGNETICS%")
245 write(*,*)
'*ERROR reading *ELECTROMAGNETICS: less than 1 ei 253 if(textpart(2)(1:1).ne.
' ')
then 254 read(textpart(2)(1:20),
'(f20.0)',iostat=istat) fmin
255 if(istat.gt.0)
call inputerror(inpc,ipoinpc,iline,
256 &
"*ELECTROMAGNETICS%")
258 if(textpart(3)(1:1).ne.
' ')
then 259 read(textpart(3)(1:20),
'(f20.0)',iostat=istat) fmax
260 if(istat.gt.0)
call inputerror(inpc,ipoinpc,iline,
261 &
"*ELECTROMAGNETICS%")
272 if(timereset)ttime=ttime-tper
274 call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
275 & ipoinp,inp,ipoinpc)
#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