OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
ilaenv.f File Reference

Go to the source code of this file.

Functions/Subroutines

integer function ilaenv (ispec, name, opts, n1, n2, n3, n4)
 ILAENV
integer function ilaenv2stage (ispec, name, opts, n1, n2, n3, n4)
integer function iparmq (ispec, name, opts, n, ilo, ihi, lwork)

Function/Subroutine Documentation

◆ ilaenv2stage()

integer function ilaenv2stage ( integer ispec,
character*( * ) name,
character*( * ) opts,
integer n1,
integer n2,
integer n3,
integer n4 )

Definition at line 251 of file ilaenv.f.

253* .. Scalar Arguments ..
254 CHARACTER*( * ) NAME, OPTS
255 INTEGER ISPEC, N1, N2, N3, N4
256* ..
257*
258* =====================================================================
259*
260* .. Local variables ..
261 INTEGER IISPEC
262* .. External Functions ..
263 INTEGER IPARAM2STAGE
264 EXTERNAL iparam2stage
265* ..
266* .. Arrays in Common ..
267 INTEGER IPARMS( 100 )
268* ..
269* .. Common blocks ..
270 COMMON / claenv / iparms
271* ..
272* .. Save statement ..
273 SAVE / claenv /
274* ..
275* .. Executable Statements ..
276*
277 IF(( ispec.GE.1 ) .AND. (ispec.LE.5)) THEN
278*
279* 1 <= ISPEC <= 5: 2stage eigenvalues SVD routines.
280*
281 IF( ispec.EQ.1 ) THEN
282 ilaenv2stage = iparms( 1 )
283 ELSE
284 iispec = 16 + ispec
285 ilaenv2stage = iparam2stage( iispec, name, opts,
286 $ n1, n2, n3, n4 )
287 ENDIF
288*
289 ELSE
290*
291* Invalid value for ISPEC
292*
293 ilaenv2stage = -1
294 END IF
295*
296 RETURN
297*
298* End of ILAENV2STAGE
299*
integer function ilaenv2stage(ispec, name, opts, n1, n2, n3, n4)
Definition ilaenv.f:253
integer function iparam2stage(ispec, name, opts, ni, nbi, ibi, nxi)
IPARAM2STAGE

◆ iparmq()

integer function iparmq ( integer ispec,
character, dimension( * ) name,
character, dimension( * ) opts,
integer n,
integer ilo,
integer ihi,
integer lwork )

Definition at line 301 of file ilaenv.f.

302*
303 INTEGER INMIN, INWIN, INIBL, ISHFTS, IACC22
304 parameter( inmin = 12, inwin = 13, inibl = 14,
305 $ ishfts = 15, iacc22 = 16 )
306 INTEGER NMIN, K22MIN, KACMIN, NIBBLE, KNWSWP
307 parameter( nmin = 11, k22min = 14, kacmin = 14,
308 $ nibble = 14, knwswp = 500 )
309 REAL TWO
310 parameter( two = 2.0 )
311* ..
312* .. Scalar Arguments ..
313 INTEGER IHI, ILO, ISPEC, LWORK, N
314 CHARACTER NAME*( * ), OPTS*( * )
315* ..
316* .. Local Scalars ..
317 INTEGER NH, NS
318* ..
319* .. Intrinsic Functions ..
320 INTRINSIC log, max, mod, nint, real
321* ..
322* .. Executable Statements ..
323 IF( ( ispec.EQ.ishfts ) .OR. ( ispec.EQ.inwin ) .OR.
324 $ ( ispec.EQ.iacc22 ) ) THEN
325*
326* ==== Set the number simultaneous shifts ====
327*
328 nh = ihi - ilo + 1
329 ns = 2
330 IF( nh.GE.30 )
331 $ ns = 4
332 IF( nh.GE.60 )
333 $ ns = 10
334 IF( nh.GE.150 )
335 $ ns = max( 10, nh / nint( log( real( nh ) ) / log( two ) ) )
336 IF( nh.GE.590 )
337 $ ns = 64
338 IF( nh.GE.3000 )
339 $ ns = 128
340 IF( nh.GE.6000 )
341 $ ns = 256
342 ns = max( 2, ns-mod( ns, 2 ) )
343 END IF
344*
345 IF( ispec.EQ.inmin ) THEN
346*
347*
348* ===== Matrices of order smaller than NMIN get sent
349* . to LAHQR, the classic double shift algorithm.
350* . This must be at least 11. ====
351*
352 iparmq = nmin
353*
354 ELSE IF( ispec.EQ.inibl ) THEN
355*
356* ==== INIBL: skip a multi-shift qr iteration and
357* . whenever aggressive early deflation finds
358* . at least (NIBBLE*(window size)/100) deflations. ====
359*
360 iparmq = nibble
361*
362 ELSE IF( ispec.EQ.ishfts ) THEN
363*
364* ==== NSHFTS: The number of simultaneous shifts =====
365*
366 iparmq = ns
367*
368 ELSE IF( ispec.EQ.inwin ) THEN
369*
370* ==== NW: deflation window size. ====
371*
372 IF( nh.LE.knwswp ) THEN
373 iparmq = ns
374 ELSE
375 iparmq = 3*ns / 2
376 END IF
377*
378 ELSE IF( ispec.EQ.iacc22 ) THEN
379*
380* ==== IACC22: Whether to accumulate reflections
381* . before updating the far-from-diagonal elements
382* . and whether to use 2-by-2 block structure while
383* . doing it. A small amount of work could be saved
384* . by making this choice dependent also upon the
385* . NH=IHI-ILO+1.
386*
387 iparmq = 0
388 IF( ns.GE.kacmin )
389 $ iparmq = 1
390 IF( ns.GE.k22min )
391 $ iparmq = 2
392*
393 ELSE
394* ===== invalid value of ispec =====
395 iparmq = -1
396*
397 END IF
398*
399* ==== End of IPARMQ ====
400*
integer function iparmq(ispec, name, opts, n, ilo, ihi, lwork)
Definition ilaenv.f:302
#define max(a, b)
Definition macros.h:21