KTH framework for Nek5000 toolboxes; testing version  0.0.1
makeq.f
Go to the documentation of this file.
1 c-----------------------------------------------------------------------
2  subroutine makeq
3 
4 C Generate forcing function for the solution of a passive scalar.
5 C !! NOTE: Do not change the content of the array BQ until the current
6 
7  include 'SIZE'
8  include 'TOTAL'
9  include 'CTIMER'
10 
11  logical if_conv_std
12  common /scruz/ w1(lx1,ly1,lz1,lelt)
13 
14  nxyz = lx1*ly1*lz1
15  ntot = nxyz*nelv
16 
17  etime0 = dnekclock()
18 
19  if (nio.eq.0.and.loglevel.gt.2)
20  $ write(6,*) 'makeq', ifield
21 
22  if_conv_std = .true.
23  if (ifmhd.and.ifaxis) if_conv_std = .false. ! conv. treated in induct.f
24 
25  call makeq_aux ! nekuq, etc.
26 
27  if (ifadvc(ifield) .and. if_conv_std) then
28 
29  if (ifcvfld(ifield)) then
30  if (ifmvbd) then
31  call sub2 (vx, wx, ntot)
32  call sub2 (vy, wy, ntot)
33  call sub2 (vz, wz, ntot)
34  endif
35 
36  call convab
37 
38  if (ifmvbd) then
39  call add2 (vx, wx, ntot)
40  call add2 (vy, wy, ntot)
41  call add2 (vz, wz, ntot)
42  endif
43  else
44  if (.not.ifchar) call convab
45  endif
46 
47  endif
48 
49  if (iftran) then
50 
51  if (ifcvfld(ifield)) then
52 
53  if (ifdiff(ifield)) then
54  ntot = lx1*ly1*lz1*nelfld(ifield)
55  call wlaplacian(w1,t(1,1,1,1,ifield-1),
56  & vdiff(1,1,1,1,ifield),ifield)
57  call add2(bq(1,1,1,1,ifield-1),w1,ntot)
58  endif
59 
60  else
61 
62  if (ifmvbd.and..not.ifchar) call admesht
63 
64  call makeabq
65 
66  if (ifchar.and.ifadvc(ifield)) then
67  call convch
68  else
69  call makebdq
70  endif
71 
72  endif
73 
74  endif
75 
76  tmakq=tmakq+(dnekclock()-etime0)
77 
78  return
79  end
real *8 function dnekclock()
Definition: comm_mpi.f:393
subroutine convab
Definition: conduct.f:205
subroutine makebdq
Definition: conduct.f:255
subroutine makeabq
Definition: conduct.f:231
subroutine convch
Definition: convect.f:965
subroutine makeq
Definition: makeq.f:3
subroutine makeq_aux
Definition: makeq_aux.f:2
subroutine sub2(a, b, n)
Definition: math.f:164
subroutine add2(a, b, n)
Definition: math.f:622
subroutine admesht
Definition: mvmesh.f:111
subroutine wlaplacian(out, a, diff, ifld)
Definition: navier1.f:4370