KTH framework for Nek5000 toolboxes; testing version  0.0.1
arna.f
Go to the documentation of this file.
1 
9 !
10 !
11 ! To define ARPACK mode: direct or inverse:
12 ! Notice that simulation with temperature or passive scalars has to be
13 ! performed in inverse mode due to speciffic inner product.
14 !
15 ! Direct eigenvalue problem A*x = lambda*x
16 !#define ARPACK_DIRECT
17 ! Generalized (inverse) eigenvalue problem A*x = lambda*B*x
18 #undef ARPACK_DIRECT
19 !=======================================================================
23  subroutine stepper_register()
24  implicit none
25 
26  include 'SIZE'
27  include 'INPUT'
28  include 'FRAMELP'
29  include 'TSTPRD'
30  include 'ARNAD'
31 
32  ! local variables
33  integer lpmid, il
34  real ltim
35  character*2 str
36 
37  ! functions
38  real dnekclock
39 !-----------------------------------------------------------------------
40  ! timing
41  ltim = dnekclock()
42 
43  ! check if the current module was already registered
44  call mntr_mod_is_name_reg(lpmid,arna_name)
45  if (lpmid.gt.0) then
46  call mntr_warn(lpmid,
47  $ 'module ['//trim(arna_name)//'] already registered')
48  return
49  endif
50 
51  ! find parent module
52  call mntr_mod_is_name_reg(lpmid,tstpr_name)
53  if (lpmid.le.0) then
54  lpmid = 1
55  call mntr_abort(lpmid,
56  $ 'parent module ['//trim(tstpr_name)//'] not registered')
57  endif
58 
59  ! register module
60  call mntr_mod_reg(arna_id,lpmid,arna_name,
61  $ 'Arnoldi ARPACK spectra calculation')
62 
63  ! register timers
64  ! initialisation
65  call mntr_tmr_reg(arna_tmr_ini_id,tstpr_tmr_ini_id,arna_id,
66  $ 'ARNA_INI','Arnoldi ARPACK initialisation time',.true.)
67  ! submodule operation
68  call mntr_tmr_reg(arna_tmr_evl_id,tstpr_tmr_evl_id,arna_id,
69  $ 'ARNA_EVL','Arnoldi ARPACK evolution time',.true.)
70 
71  ! register and set active section
72  call rprm_sec_reg(arna_sec_id,arna_id,'_'//adjustl(arna_name),
73  $ 'Runtime paramere section for Arnoldi ARPACK module')
74  call rprm_sec_set_act(.true.,arna_sec_id)
75 
76  ! register parameters
77  call rprm_rp_reg(arna_nkrl_id,arna_sec_id,'NKRL',
78  $ 'Krylov space size',rpar_int,50,0.0,.false.,' ')
79 
80  call rprm_rp_reg(arna_negv_id,arna_sec_id,'NEGV',
81  $ 'Number of eigenvalues',rpar_int,10,0.0,.false.,' ')
82 
83  ! set initialisation flag
84  arna_ifinit=.false.
85 
86  ! timing
87  ltim = dnekclock() - ltim
88  call mntr_tmr_add(arna_tmr_ini_id,1,ltim)
89 
90  return
91  end subroutine
92 !=======================================================================
96  subroutine stepper_init()
97  implicit none
98 
99  include 'SIZE' ! NIO, NDIM, NPERT
100  include 'TSTEP' ! NSTEPS
101  include 'INPUT' ! IF3D, IFHEAT
102  include 'SOLN' ! V?MASK, TMASK, V[XYZ]P, TP
103  include 'FRAMELP'
104  include 'TSTPRD'
105  include 'ARNAD'
106 
107  ! ARPACK include file
108  include 'debug.h'
109 
110  ! local variables
111  integer itmp, il
112  real rtmp, ltim
113  logical ltmp
114  character*20 ctmp
115 
116  ! to get checkpoint runtime parameters
117  integer ierr, lmid, lsid, lrpid
118 
119  ! functions
120  real dnekclock
121 !-----------------------------------------------------------------------
122  ! check if the module was already initialised
123  if (arna_ifinit) then
124  call mntr_warn(arna_id,
125  $ 'module ['//trim(arna_name)//'] already initiaised.')
126  return
127  endif
128 
129  ! timing
130  ltim = dnekclock()
131 
132  ! get runtime parameters
133  call rprm_rp_get(itmp,rtmp,ltmp,ctmp,arna_nkrl_id,rpar_int)
134  arna_nkrl = itmp
135 
136  call rprm_rp_get(itmp,rtmp,ltmp,ctmp,arna_negv_id,rpar_int)
137  arna_negv = itmp
138 
139  ! check the restart flag
140  ! check if checkpointing module was registered and take parameters
141  ierr = 0
142  call mntr_mod_is_name_reg(lmid,'CHKPT')
143  if (lmid.gt.0) then
144  call rprm_sec_is_name_reg(lsid,lmid,'_CHKPT')
145  if (lsid.gt.0) then
146  ! restart flag
147  call rprm_rp_is_name_reg(lrpid,lsid,'READCHKPT',rpar_log)
148  if (lrpid.gt.0) then
149  call rprm_rp_get(itmp,rtmp,ltmp,ctmp,lrpid,rpar_log)
150  arna_ifrst = ltmp
151  else
152  ierr = 1
153  goto 30
154  endif
155  if (arna_ifrst) then
156  ! checkpoint set number
157  call rprm_rp_is_name_reg(lrpid,lsid,'CHKPFNUMBER',
158  $ rpar_int)
159  if (lrpid.gt.0) then
160  call rprm_rp_get(itmp,rtmp,ltmp,ctmp,lrpid,rpar_int)
161  arna_fnum = itmp
162  else
163  ierr = 1
164  goto 30
165  endif
166  endif
167  else
168  ierr = 1
169  endif
170  else
171  ierr = 1
172  endif
173 
174  30 continue
175 
176  ! check for errors
177  call mntr_check_abort(arna_id,ierr,
178  $ 'Error reading checkpoint parameters')
179 
180  ! check simulation parameters
181 #ifdef ARPACK_DIRECT
182  ! standard eigenvalue problem A*x = lambda*x
183  if(ifheat) call mntr_abort(arna_id,
184  $ 'IFHEAT requires #undef ARPACK_DIRECT')
185 #endif
186 
187  if (arna_nkrl.gt.arna_lkrl) call mntr_abort(arna_id,
188  $ 'arna_nkrl bigger than arna_lkrl')
189 
190  if (arna_negv.ge.(arna_nkrl/2)) call mntr_abort(arna_id,
191  $ 'arna_negv > arna_nkrl/2')
192 
193  ! make sure NSTEPS is bigger than the possible number of iteration in arnoldi
194  ! multiplication by 2 for OIC
195  nsteps = max(nsteps,tstpr_step*arna_nkrl*tstpr_cmax*2+10)
196 
197  ! related to restart
198  nparp = 0
199  ncarp = 0
200  rnmarp= 0.0
201 
202  ! initialise ARPACK parameters
203 #ifdef ARPACK_DIRECT
204  ! direct eigenvalue problem A*x = lambda*x
205  bmatarp='I'
206 #else
207  ! generalised eigenvalue problem A*x = lambda*B*x
208  bmatarp='G'
209 #endif
210  ! eigenvalues of largest magnitude
211  whicharp='LM'
212 
213  call izero(iparp,11)
214  call izero(ipntarp,14)
215  ! exact shifts with respect to the current Hessenberg matrix
216  iparp(1)=1
217  ! maximum number of Arnoldi update iterations allowed
218  iparp(3)=tstpr_cmax
219 #ifdef ARPACK_DIRECT
220  ! A*x = lambda*x
221  iparp(7)=1
222 #else
223  ! A*x = lambda*M*x, M symmetric positive definite; bmatarp='G'
224  iparp(7)=2
225 #endif
226  ! used size of workla
227  nwlarp = (3*arna_nkrl+6)*arna_nkrl
228 
229  ! user supplied initial conditions
230  infarp=1
231 
232  ! get eigenvectors
233  rvarp=.true.
234  ! compute Ritz vectors
235  howarp='A'
236  ! select should be specifird for howarp='S'
237 
238  ! no shift
239  sigarp(1) = 0.0
240  sigarp(2) = 0.0
241 
242  ! vector lengths
243  ! single vector length in Krylov space
244  ! velocity
245  arna_ns = tstpr_nv*ndim
246  ! temperature
247  if(ifheat) then
248  arna_ns = arna_ns + tstpr_nt
249  endif
250  if (arna_ns.gt.arna_ls) call mntr_abort(arna_id,
251  $ 'arna_ns too big; arna_ns > arna_ls')
252 
253  ! initialise arrays
254  call rzero(workda,wddima)
255  call rzero(workla,wldima)
256  call rzero(workea,wedima)
257  call rzero(vbasea,arna_ls*arna_lkrl)
258  call rzero(resida,arna_ls)
259  call rzero(driarp,arna_lkrl*4)
260 
261  ! info level from ARPACK
262  ndigit = -3
263  logfil = 6
264  mngets = 0
265  mnaitr = 2
266  mnapps = 0
267  mnaupd = 2
268  mnaup2 = 2
269  mneupd = 0
270 
271  ! restart
272  if (arna_ifrst) then
273  ! read checkpoint
274  call arna_rst_read
275  else
276  ! if no restatrt fill RESIDA with initial conditions
277  ! V?MASK removes points at the wall and inflow
278 #ifdef ARPACK_DIRECT
279  ! A*x = lambda*x
280  ! velocity
281  call col3(resida(1),vxp,v1mask,tstpr_nv)
282  call col3(resida(1+tstpr_nv),vyp,v2mask,tstpr_nv)
283  if (if3d) call col3(resida(1+2*tstpr_nv),vzp,v3mask,tstpr_nv)
284  ! no temperature here
285 #else
286  ! A*x = lambda*M*x
287  ! velocity
288  call copy(resida(1),vxp,tstpr_nv)
289  call copy(resida(1+tstpr_nv),vyp,tstpr_nv)
290  if (if3d) call copy(resida(1+2*tstpr_nv),vzp,tstpr_nv)
291  ! temperature
292  if(ifheat) call copy(resida(1+ndim*tstpr_nv),tp,tstpr_nt)
293 #endif
294 
295  ! initialise rest of variables
296  ! firts call
297  idoarp=0
298  endif
299 
300  ! ARPACK interface
301  call arna_naupd
302 
303  ! we should start stepper here
304  if (idoarp.ne.-1.and.idoarp.ne.1) then
305  write(ctmp,*) idoarp
306  call mntr_abort(arna_id,
307  $ 'stepper_init; error with arna_naupd, ido = '//trim(ctmp))
308  endif
309 
310  ! print info
311  call mntr_log(arna_id,lp_prd,'ARPACK initialised')
312  call mntr_log(arna_id,lp_prd,'Parameters:')
313  call mntr_log(arna_id,lp_prd,'BMAT = '//trim(bmatarp))
314  call mntr_log(arna_id,lp_prd,'WHICH = '//trim(whicharp))
315  call mntr_logr(arna_id,lp_prd,'TOL = ',tstpr_tol)
316  call mntr_logi(arna_id,lp_prd,'NEV = ',arna_negv)
317  call mntr_logi(arna_id,lp_prd,'NCV = ',arna_nkrl)
318  call mntr_logi(arna_id,lp_prd,'IPARAM(1) = ',iparp(1))
319  call mntr_logi(arna_id,lp_prd,'IPARAM(3) = ',iparp(3))
320  call mntr_logi(arna_id,lp_prd,'IPARAM(7) = ',iparp(7))
321  call mntr_logl(arna_id,lp_prd,'RVEC = ',rvarp)
322  call mntr_log(arna_id,lp_prd,'HOWMNY = '//trim(howarp))
323 
324  ! everything is initialised
325  arna_ifinit=.true.
326 
327  ! timing
328  ltim = dnekclock() - ltim
329  call mntr_tmr_add(arna_tmr_ini_id,1,ltim)
330 
331  return
332  end subroutine
333 !=======================================================================
337  logical function stepper_is_initialised()
338  implicit none
339 
340  include 'SIZE'
341  include 'TSTPRD'
342  include 'ARNAD'
343 !-----------------------------------------------------------------------
344  stepper_is_initialised = arna_ifinit
345 
346  return
347  end function
348 !=======================================================================
353  subroutine stepper_vsolve
354  implicit none
355 
356  include 'SIZE' ! NIO
357  include 'INPUT' ! IFHEAT, IF3D
358  include 'SOLN' ! V[XYZ]P, TP, V?MASK
359  include 'MASS' ! BM1
360  include 'FRAMELP'
361  include 'TSTPRD'
362  include 'ARNAD'
363 
364  ! local variables
365  real ltim ! timing
366  character(20) str
367 
368  ! functions
369  real dnekclock
370 !-----------------------------------------------------------------------
371  ! timing
372  ltim=dnekclock()
373 
374  ! fill work array with velocity
375  ! V?MASK removes points at the boundary
376 #ifdef ARPACK_DIRECT
377  ! A*x = lambda*x
378  ! velocity
379  call col3(workda(ipntarp(2)),vxp,v1mask,tstpr_nv)
380  call col3(workda(ipntarp(2)+tstpr_nv),vyp,v2mask,tstpr_nv)
381  if(if3d) call col3(workda(ipntarp(2)+2*tstpr_nv),vzp,
382  $ v3mask,tstpr_nv)
383  ! no temperature here
384 #else
385  ! velocity
386  ! A*x = lambda*M*x
387  call copy(workda(ipntarp(2)),vxp,tstpr_nv)
388  call copy(workda(ipntarp(2)+tstpr_nv),vyp,tstpr_nv)
389  if (if3d) call copy(workda(ipntarp(2)+2*tstpr_nv),vzp,tstpr_nv)
390  ! temperature
391  if(ifheat) call copy(workda(ipntarp(2)+ndim*tstpr_nv),tp,tstpr_nt)
392  ! this may be not necessary, but ARPACK manual is not clear about it
393  !call col3(workda(ipntarp(1)),VXP,BM1,tstpr_nv)
394  !call col3(workda(ipntarp(1)+tstpr_nv),VYP,BM1,tstpr_nv)
395  !if (IF3D) call col3(workda(ipntarp(1)+2*tstpr_nv),VZP,BM1,tstpr_nv)
396 #endif
397 
398  ! ARPACK interface
399  call arna_naupd
400 
401  if (idoarp.eq.-2) then
402  ! checkpoint
403  call arna_rst_save
404  elseif (idoarp.eq.99) then
405  ! finalise
406  call arna_esolve
407  elseif (idoarp.eq.-1.or.idoarp.eq.1) then
408  ! stepper restart, nothing to do
409  else
410  write(str,*) idoarp
411  call mntr_abort(arna_id,
412  $ 'stepper_vsolve; error with arna_naupd, ido = '//trim(str))
413  endif
414 
415  ! timing
416  ltim = dnekclock() - ltim
417  call mntr_tmr_add(arna_tmr_evl_id,1,ltim)
418 
419  return
420  end
421 !=======================================================================
424  subroutine arna_esolve
425  implicit none
426 
427  include 'SIZE' ! NIO, NID, LDIMT1
428  include 'TSTEP' ! ISTEP, DT, LASTEP
429  include 'SOLN' ! VX, VY, VZ, VMULT, V?MASK
430  include 'INPUT' ! IFXYO,IFPO,IFVO,IFTO,IFPSO,IF3D,IFHEAT
431  include 'FRAMELP'
432  include 'TSTPRD'
433  include 'ARNAD'
434 
435  ! local variables
436  integer il, iunit, ierror
437  real dumm
438  logical lifxyo, lifpo, lifvo, lifto, lifpso(LDIMT1)
439  character(20) str
440 
441  ! global comunication in nekton
442  integer NIDD,NPP,NEKCOMM,NEKGROUP,NEKREAL
443  common /nekmpi/ nidd,npp,nekcomm,nekgroup,nekreal
444 !-----------------------------------------------------------------------
445  if (idoarp.eq.99) then
446 
447  call mntr_logi(arna_id,lp_prd,
448  $ 'Postprocessing converged eigenvectors NV= ',iparp(5))
449 
450 #ifdef MPI
451  call pdneupd(nekcomm,rvarp,howarp,selarp,driarp,driarp(1,2),
452  $ vbasea,arna_ls,sigarp(1),sigarp(2),workea,bmatarp,arna_ns,
453  $ whicharp,arna_negv,tstpr_tol,resida,arna_nkrl,vbasea,
454  $ arna_ls,iparp,ipntarp,workda,workla,nwlarp,ierrarp)
455 #else
456  call dneupd(rvarp,howarp,selarp,driarp,driarp(1,2),
457  $ vbasea,arna_ls,sigarp(1),sigarp(2),workea,bmatarp,arna_ns,
458  $ whicharp,arna_negv,tstpr_tol,resida,arna_nkrl,vbasea,
459  $ arna_ls,iparp,ipntarp,workda,workla,nwlarp,ierrarp)
460 #endif
461 
462  if (ierrarp.eq.0) then
463  call mntr_log(arna_id,lp_prd,
464  $ 'Writing eigenvalues and eigenvectors')
465  ierror=0
466  ! open file
467  if (nid.eq.0) then
468  ! find free unit
469  call io_file_freeid(iunit, ierror)
470  if (ierror.eq.0) then
471  open (unit=iunit,file='eigenvalues.txt',
472  $ action='write', iostat=ierror)
473  write(unit=iunit,fmt=410,iostat=ierror)
474  410 FORMAT(10x,'I',17x,'re(RITZ)',17x,'im(RITZ)',17x,
475  $ 'ln|RITZ|',16x,'arg(RITZ)')
476  endif
477  endif
478  ! error check
479  call mntr_check_abort(arna_id,ierror,
480  $ 'Error opening eigenvalue file.')
481 
482  ! integration time
483  dumm = dt*tstpr_step
484  dumm = 1.0/dumm
485 
486  ! copy and set output parameters
487  lifxyo = ifxyo
488  ifxyo = .true.
489  lifpo= ifpo
490  ifpo = .false.
491  lifvo= ifvo
492  ifvo = .true.
493  lifto= ifto
494  if (ifheat) then
495  ifto = .true.
496  else
497  ifto = .false.
498  endif
499  do il=1,ldimt1
500  lifpso(il)= ifpso(il)
501  ifpso(il) = .false.
502  enddo
503 
504  ! We have to take into account storrage of imaginary and real
505  ! parts of eigenvectors in arpack.
506  ! The complex Ritz vector associated with the Ritz value
507  ! with positive imaginary part is stored in two consecutive
508  ! columns. The first column holds the real part of the Ritz
509  ! vector and the second column holds the imaginary part. The
510  ! Ritz vector associated with the Ritz value with negative
511  ! imaginary part is simply the complex conjugate of the Ritz
512  ! vector associated with the positive imaginary part.
513 
514  ierror=0
515  do il=1,iparp(5)
516  !copy eigenvectors to perturbation variables
517  call copy(vxp,vbasea(1,il),tstpr_nv)
518  call copy(vyp,vbasea(1+tstpr_nv,il),tstpr_nv)
519  if (if3d) call copy(vzp,vbasea(1+2*tstpr_nv,il),tstpr_nv)
520  if(ifheat) then
521  call copy(tp,vbasea(1+ndim*tstpr_nv,il),tstpr_nt)
522  call outpost2(vxp,vyp,vzp,prp,tp,1,'egv')
523  else
524  call outpost2(vxp,vyp,vzp,prp,tp,0,'egv')
525  endif
526  ! possible place to test error
527 
528  ! get growth rate; get eigenvalues of continuous operator
529  driarp(il,3) = log(sqrt(driarp(il,1)**2+
530  $ driarp(il,2)**2))*dumm
531  driarp(il,4) = atan2(driarp(il,2),driarp(il,1))*dumm
532 
533  if (nid.eq.0) write(unit=iunit,fmt=*,iostat=ierror)
534  $ il,driarp(il,1),driarp(il,2),driarp(il,3),driarp(il,4)
535  enddo
536  ! error check
537  call mntr_check_abort(arna_id,ierror,
538  $ 'Error writing eigenvalue file.')
539 
540  ! put output variables back
541  ifxyo = lifxyo
542  ifpo = lifpo
543  ifvo = lifvo
544  ifto = lifto
545  do il=1,ldimt1
546  ifpso(il) = lifpso(il)
547  enddo
548 
549  ! close eigenvalue file
550  if (nid.eq.0) close(unit=iunit)
551 
552  else ! ierrarp
553  write(str,*) ierrarp
554  call mntr_abort(arna_id,
555  $ 'arna_esolve; error with _neupd, info = '//trim(str))
556  endif ! ierrarp
557 
558  ! finish run
559  lastep=1
560  endif
561 
562  return
563  end
564 !=======================================================================
567  subroutine arna_naupd
568  implicit none
569 
570  include 'SIZE' ! NIO, NDIM, N[XYZ]1
571  include 'INPUT' ! IF3D, IFHEAT
572  include 'SOLN' ! V?MASK, TMASK, V[XYZ]P, TP
573  include 'MASS' ! BM1
574  include 'FRAMELP'
575  include 'TSTPRD'
576  include 'ARNAD'
577 
578  ! local variables
579  character(20) str
580 
581  ! global comunication in nekton
582  integer NIDD,NPP,NEKCOMM,NEKGROUP,NEKREAL
583  common /nekmpi/ nidd,npp,nekcomm,nekgroup,nekreal
584 !-----------------------------------------------------------------------
585 #ifdef MPI
586  call pdnaupd(nekcomm,idoarp,bmatarp,arna_ns,whicharp,arna_negv,
587  $ tstpr_tol,resida,arna_nkrl,vbasea,arna_ls,iparp,ipntarp,workda,
588  $ workla,nwlarp,infarp,nparp,rnmarp,ncarp)
589 #else
590  call dnaupd(idoarp,bmatarp,arna_ns,whicharp,arna_negv,
591  $ tstpr_tol,resida,arna_nkrl,vbasea,arna_ls,iparp,ipntarp,workda,
592  $ workla,nwlarp,infarp)
593 #endif
594 
595  ! error check
596  if (infarp.lt.0) then
597  write(str,*) infarp
598  call mntr_abort(arna_id,
599  $ 'arna_naupd; error with _naupd, info = '//trim(str))
600  endif
601 
602  if (idoarp.eq.2) then
603  do
604  ! A*x = lambda*M*x
605  ! multiply by weights and masks
606  ! velocity
607  call col3(workda(ipntarp(2)),bm1,v1mask,tstpr_nv)
608  call col3(workda(ipntarp(2)+tstpr_nv),bm1,v2mask,tstpr_nv)
609  if (if3d) call col3(workda(ipntarp(2)+2*tstpr_nv),
610  $ bm1,v3mask,tstpr_nv)
611 
612  ! temperature
613  if(ifheat) then
614  call col3(workda(ipntarp(2)+ndim*tstpr_nv),
615  $ bm1,tmask,tstpr_nt)
616 
617  !coefficients
618  call cnht_weight_fun (workda(ipntarp(2)),
619  $ workda(ipntarp(2)+tstpr_nv),
620  $ workda(ipntarp(2)+2*tstpr_nv),
621  $ workda(ipntarp(2)+ndim*tstpr_nv),1.0)
622  endif
623 
624  call col2(workda(ipntarp(2)),workda(ipntarp(1)),arna_ns)
625 
626 #ifdef MPI
627  call pdnaupd(nekcomm,idoarp,bmatarp,arna_ns,whicharp,
628  $ arna_negv,tstpr_tol,resida,arna_nkrl,vbasea,arna_ls,
629  $ iparp,ipntarp,workda,workla,nwlarp,infarp,nparp,rnmarp,
630  $ ncarp)
631 #else
632  call dnaupd(idoarp,bmatarp,arna_ns,whicharp,arna_negv,
633  $ tstpr_tol,resida,arna_nkrl,vbasea,arna_ls,iparp,ipntarp,
634  $ workda,workla,nwlarp,infarp)
635 #endif
636 
637  ! error check
638  if (infarp.lt.0) then
639  write(str,*) infarp
640  call mntr_abort(arna_id,
641  $ 'arna_naupd; inner prod. error with _naupd, info = '//trim(str))
642  endif
643  if (idoarp.ne.2) exit
644  enddo
645  endif ! idoarp.eq.2
646 
647  ! restart stepper
648  if (idoarp.eq.-1.or.idoarp.eq.1) then
649  call mntr_log(arna_id,lp_prd,'Restarting stepper')
650 
651  ! move renormed data back to nekton
652  ! velocity
653  call copy(vxp,workda(ipntarp(1)),tstpr_nv)
654  call copy(vyp,workda(ipntarp(1)+tstpr_nv),tstpr_nv)
655  if (if3d) call copy(vzp,workda(ipntarp(1)+2*tstpr_nv),tstpr_nv)
656  ! temperature
657  if(ifheat) call copy(tp,workda(ipntarp(1)+ndim*tstpr_nv),
658  $ tstpr_nt)
659 
660  ! make sure the velocity and temperature fields are continuous at
661  ! element faces and edges
662  call tstpr_dssum
663  endif ! idoarp.eq.-1.or.idoarp.eq.1
664 
665  return
666  end
667 !=======================================================================
subroutine stepper_register()
Register Arnoldi ARPACK module.
Definition: arna.f:24
subroutine stepper_vsolve
Create Krylov space, get Ritz values and restart stepper phase.
Definition: arna.f:354
subroutine arna_esolve
ARPACK postprocessing.
Definition: arna.f:425
logical function stepper_is_initialised()
Check if module was initialised.
Definition: arna.f:338
subroutine stepper_init()
Initilise Arnoldi ARPACK module.
Definition: arna.f:97
subroutine arna_naupd
Interface to pdnaupd.
Definition: arna.f:568
subroutine arna_rst_read
Read from checkpoints.
Definition: arna_io.f:41
subroutine arna_rst_save
Write restart files.
Definition: arna_io.f:8
subroutine cnht_weight_fun(lvx, lvy, lvz, lt, coeff)
Weigth velocity and temperature fields.
Definition: cnht_tools.f:559
subroutine io_file_freeid(iunit, ierr)
Get free file unit number and store max unit value.
Definition: io_tools.f:47
subroutine mntr_logi(mid, priority, logs, ivar)
Write log message adding single integer.
Definition: mntrlog.f:709
subroutine mntr_logr(mid, priority, logs, rvar)
Write log message adding single real.
Definition: mntrlog.f:731
subroutine mntr_warn(mid, logs)
Write warning message.
Definition: mntrlog.f:803
subroutine mntr_tmr_add(mid, icount, time)
Check if timer id is registered. This operation is performed locally.
Definition: mntrtmr.f:237
subroutine mntr_mod_is_name_reg(mid, mname)
Check if module name is registered and return its id.
Definition: mntrlog.f:459
subroutine mntr_abort(mid, logs)
Abort simulation.
Definition: mntrlog.f:837
subroutine mntr_log(mid, priority, logs)
Write log message.
Definition: mntrlog.f:600
subroutine mntr_mod_reg(mid, pmid, mname, mdscr)
Register new module.
Definition: mntrlog.f:346
subroutine mntr_logl(mid, priority, logs, lvar)
Write log message adding single logical.
Definition: mntrlog.f:782
subroutine mntr_tmr_reg(mid, pmid, modid, mname, mdscr, ifsum)
Register new timer.
Definition: mntrtmr.f:16
subroutine mntr_check_abort(mid, ierr, logs)
Abort simulation.
Definition: mntrlog.f:856
subroutine rprm_rp_is_name_reg(rpid, mid, pname, ptype)
Check if parameter name is registered and return its id. Check flags as well.
Definition: rprm.f:658
subroutine rprm_rp_get(ipval, rpval, lpval, cpval, rpid, ptype)
Get runtime parameter form active section. This operation is performed locally.
Definition: rprm.f:883
subroutine rprm_sec_is_name_reg(rpid, mid, pname)
Check if section name is registered and return its id. Check mid as well.
Definition: rprm.f:284
subroutine rprm_rp_reg(rpid, mid, pname, pdscr, ptype, ipval, rpval, lpval, cpval)
Register new runtime parameter.
Definition: rprm.f:484
subroutine rprm_sec_set_act(ifact, rpid)
Set section's activation flag. Master value is broadcasted.
Definition: rprm.f:422
subroutine rprm_sec_reg(rpid, mid, pname, pdscr)
Register new parameter section.
Definition: rprm.f:165
subroutine tstpr_dssum
Average velocity and temperature at element faces.
Definition: tstpr.f:387
subroutine col3(a, b, c, n)
Definition: math.f:598
subroutine col2(a, b, n)
Definition: math.f:564
subroutine copy(a, b, n)
Definition: math.f:260
subroutine izero(a, n)
Definition: math.f:215
subroutine rzero(a, n)
Definition: math.f:208
subroutine outpost2(v1, v2, v3, vp, vt, nfldt, name3)
Definition: prepost.f:1394