1 | include(dom.inc)
2 |
3 | SUBROUTINE master_integrate(s_Gtot, s_Htot, s_Lotot, s_Lbtot, &
4 | & s_Q_rtot,iproc)
5 |
6 | ! ================================================================!
7 | ! !
8 | ! master_integrate.F: Copy resulting vectors to master !
9 | ! !
10 | ! out : !
11 | ! !
12 | ! author : J. AMAYA (october 2007) !
13 | ! !
14 | ! ================================================================!
15 |
16 | USE mod_prissma
17 |
18 | IMPLICIT NONE
19 |
20 | ! IN
21 | DOM_INT :: iproc, i
22 | DOM_REAL,DIMENSION(3,i_dom_ncells) :: s_Q_rtot
23 | DOM_REAL,DIMENSION(i_dom_ncells) :: s_Gtot, s_Lbtot
24 | DOM_REAL,DIMENSION(i_dom_nfacesmax,i_dom_ncells) &
25 | & :: s_Lotot
26 | DOM_REAL,DIMENSION(i_dom_nfacesmax,i_dom_ncells) &
27 | & :: s_Htot
28 | DOM_REAL :: Gmax, Gmin, Lmax, Lmin, Hmax, Hmin
29 |
30 | ! --------------!
31 | ! Printing data !
32 | ! --------------!
33 |
34 | Gmax = MAXVAL(s_Gtot)
35 | Gmin = MINVAL(s_Gtot)
36 | Lmax = MAXVAL(s_Lbtot)
37 | Lmin = MINVAL(s_Lbtot)
38 | Hmax = MAXVAL(s_Htot)
39 | Hmin = MINVAL(s_Htot)
40 |
41 | ! print*, " ---------------------"
42 | ! print*, " Procesor: ", iproc
43 | ! print*, " Gmax from (",iproc,") = ", Gmax
44 | ! print*, " Gmin from (",iproc,") = ", Gmin
45 | ! print*, " Lmax from (",iproc,") = ", Lmax
46 | ! print*, " Lmin from (",iproc,") = ", Lmin
47 | ! print*, " Hmax from (",iproc,") = ", Hmax
48 | ! print*, " Hmin from (",iproc,") = ", Hmin
49 | ! print*, " "
50 |
51 | ! ---------------------------------------!
52 | ! Adding iproc results to master vectors !
53 | ! ---------------------------------------!
54 |
55 | Q_rtot = Q_rtot + s_Q_rtot
56 | Gtot = Gtot + s_Gtot
57 | Lotot = Lotot + s_Lotot
58 | Htot = Htot + s_Htot
59 |
60 | DO i=1, i_dom_ncells
61 | IF (Lbtot(i).eq.0.) Lbtot(i) = s_Lbtot(i)
62 | ENDDO
63 |
64 | ! IF (iproc.eq.0) THEN
65 | ! Lbtot(:) = s_Lbtot(:)
66 | ! ENDIF
67 |
68 | ! print*, " max Sr = ", MAXVAL(Srtot)
69 | ! print*, " ---------------------"
70 |
71 | END SUBROUTINE master_integrate
master_integrate.F could be called by: