Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TURB_LesCommunication.F90
Go to the documentation of this file.
1 ! *********************************************************************
2 ! * Rocstar Simulation Suite *
3 ! * Copyright@2015, Illinois Rocstar LLC. All rights reserved. *
4 ! * *
5 ! * Illinois Rocstar LLC *
6 ! * Champaign, IL *
7 ! * www.illinoisrocstar.com *
8 ! * sales@illinoisrocstar.com *
9 ! * *
10 ! * License: See LICENSE file in top level of distribution package or *
11 ! * http://opensource.org/licenses/NCSA *
12 ! *********************************************************************
13 ! *********************************************************************
14 ! * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
15 ! * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
16 ! * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *
17 ! * NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR *
18 ! * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
19 ! * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
20 ! * Arising FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
21 ! * USE OR OTHER DEALINGS WITH THE SOFTWARE. *
22 ! *********************************************************************
23 !******************************************************************************
24 !
25 ! Purpose: LES inter processor communication.
26 !
27 ! Description: none.
28 !
29 ! Input: regions = data of all regions
30 ! iReg = current region number
31 !
32 ! Output: global% = new global parameters after global communication
33 !
34 ! Notes: This procedure is always done regardless turbulence model selected.
35 ! The input/output global variables are always defined.
36 ! If not needed, the result is simply not used.
37 !
38 !******************************************************************************
39 !
40 ! $Id: TURB_LesCommunication.F90,v 1.6 2008/12/06 08:44:41 mtcampbe Exp $
41 !
42 ! Copyright: (c) 2003 by the University of Illinois
43 !
44 !******************************************************************************
45 
46 SUBROUTINE turb_lescommunication( regions ) ! PUBLIC
47 
48  USE moddatatypes
49  USE moddatastruct, ONLY : t_region
50  USE modglobal, ONLY : t_global
51  USE moderror
52  USE modmpi
53 
54  IMPLICIT NONE
55 
56 ! ... parameters
57  TYPE(t_region), POINTER :: regions(:)
58 
59 ! ... local variables
60  TYPE(t_global), POINTER :: global
61  REAL(RFREAL) :: esg1glo, esg4glo
62 
63 !******************************************************************************
64 
65  global => regions(1)%global
66 
67  CALL registerfunction( global,'TURB_LesCommunication',&
68  'TURB_LesCommunication.F90' )
69 
70 ! global sum of LES energy sgs model 1 and 4 ----------------------------------
71 
72 #ifdef MPI
73  CALL mpi_allreduce( global%esg1sum, esg1glo, 1, mpi_double_precision, &
74  mpi_sum, global%mpiComm, global%mpierr )
75  IF (global%mpierr /=0 ) CALL errorstop( global,err_mpi_trouble,__line__ )
76  CALL mpi_allreduce( global%esg4sum, esg4glo, 1, mpi_double_precision, &
77  mpi_sum, global%mpiComm, global%mpierr )
78  IF (global%mpierr /=0 ) CALL errorstop( global,err_mpi_trouble,__line__ )
79  global%esg1sum = esg1glo
80  global%esg4sum = esg4glo
81 #endif
82 
83 !#ifdef RFLU
84 !#ifdef CHARM
85 ! CALL FEM_REDUCE( global%fieldFlagTurbReal,global%esg1sum,esg1Glo,FEM_SUM )
86 ! CALL FEM_REDUCE( global%fieldFlagTurbReal,global%esg4sum,esg4Glo,FEM_SUM )
87 ! global%esg1sum = esg1Glo
88 ! global%esg4sum = esg4Glo
89 !#endif
90 !#endif
91 
92 ! finalize --------------------------------------------------------------------
93 
94  CALL deregisterfunction( global )
95 
96 END SUBROUTINE turb_lescommunication
97 
98 !******************************************************************************
99 !
100 ! RCS Revision history:
101 !
102 ! $Log: TURB_LesCommunication.F90,v $
103 ! Revision 1.6 2008/12/06 08:44:41 mtcampbe
104 ! Updated license.
105 !
106 ! Revision 1.5 2008/11/19 22:17:54 mtcampbe
107 ! Added Illinois Open Source License/Copyright
108 !
109 ! Revision 1.4 2005/12/29 19:45:51 wasistho
110 ! removed CHARM stuff
111 !
112 ! Revision 1.3 2005/04/15 15:07:35 haselbac
113 ! Removed Charm/FEM stuff
114 !
115 ! Revision 1.2 2004/03/19 02:49:28 wasistho
116 ! prepared for RFLU
117 !
118 ! Revision 1.1 2004/03/05 04:37:00 wasistho
119 ! changed nomenclature
120 !
121 ! Revision 1.1 2004/02/26 21:32:51 wasistho
122 ! install TURB_lesCommunication
123 !
124 !
125 !******************************************************************************
126 
127 
128 
129 
130 
131 
132 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine turb_lescommunication(regions)
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine deregisterfunction(global)
Definition: ModError.F90:469