Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
InitCommunicationMP.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: initiate communication for RocfluidMP framework.
26 !
27 ! Description: none.
28 !
29 ! Input: regions = data of all regions,
30 ! iReg = current region,
31 ! istage = current RK stage.
32 !
33 ! Output: regions%levels%mixt = new solution after one time step.
34 !
35 ! Notes: none.
36 !
37 !******************************************************************************
38 !
39 ! $Id: InitCommunicationMP.F90,v 1.4 2008/12/06 08:44:09 mtcampbe Exp $
40 !
41 ! Copyright: (c) 2003 by the University of Illinois
42 !
43 !******************************************************************************
44 
45 SUBROUTINE initcommunicationmp( regions,iReg,istage )
46 
47  USE moddatatypes
48  USE moddatastruct, ONLY : t_region
49  USE modglobal, ONLY : t_global
50  USE moderror
51  USE modparameters
52 #ifdef RFLO
54 #endif
55 #ifdef PEUL
57 #endif
58 #ifdef TURB
59 #ifdef RFLO
61 #endif
62 #endif
63 
64  IMPLICIT NONE
65 
66 ! ... parameters
67  TYPE(t_region), POINTER :: regions(:)
68 
69  INTEGER :: ireg, istage
70 
71 ! ... local variables
72  REAL(RFREAL) :: ark(5), time, subtime, subdt
73 
74  TYPE(t_global), POINTER :: global
75 
76 !******************************************************************************
77 
78  global => regions(ireg)%global
79 
80  CALL registerfunction( global,'InitCommunicationMP',&
81  'InitCommunicationMP.F90' )
82 
83 ! compute value of substage physical time and time-step =======================
84 
85  ark(:) = regions(ireg)%mixtInput%ark(:)
86 
87  IF (istage == 1) THEN
88  subdt = ark(1)*global%dtMin
89  subtime = global%currentTime + subdt
90  ELSE IF (istage == global%nrkSteps) THEN
91  subdt = (1.0_rfreal - ark(global%nrkSteps-1))*global%dtMin
92  subtime = global%currentTime + global%dtMin
93  ELSE
94  subdt = (ark(istage) - ark(istage - 1))*global%dtMin
95  subtime = global%currentTime + ark(istage)*global%dtMin
96  ENDIF ! istage
97 
98 ! send conservative variables to other processors -----------------------------
99 
100 #ifdef RFLO
101  CALL rflo_boundaryconditionssend( regions,ireg )
102 
103 #ifdef PEUL
104  IF ( global%peulUsed ) &
105  CALL peul_boundaryconditionssend( regions,ireg )
106 #endif
107 
108 #ifdef TURB
109  IF (regions(ireg)%mixtInput%flowModel == flow_navst .AND. &
110  regions(ireg)%mixtInput%turbModel /= turb_model_none) &
111  CALL turb_rflo_ransbndconditionssend( regions,ireg )
112 #endif
113 #endif
114 
115 ! finalize ====================================================================
116 
117  CALL deregisterfunction( global )
118 
119 END SUBROUTINE initcommunicationmp
120 
121 !******************************************************************************
122 !
123 ! RCS Revision history:
124 !
125 ! $Log: InitCommunicationMP.F90,v $
126 ! Revision 1.4 2008/12/06 08:44:09 mtcampbe
127 ! Updated license.
128 !
129 ! Revision 1.3 2008/11/19 22:17:22 mtcampbe
130 ! Added Illinois Open Source License/Copyright
131 !
132 ! Revision 1.2 2004/12/28 22:49:25 wasistho
133 ! moved RFLO_Bcond* and RFLO_BoundaryCond* routines into RFLO_ModBoundaryConditions
134 !
135 ! Revision 1.1 2004/12/01 16:48:39 haselbac
136 ! Initial revision after changing case
137 !
138 ! Revision 1.14 2004/03/27 03:02:24 wasistho
139 ! added ifdef RFLO within ifdef TURB
140 !
141 ! Revision 1.13 2004/03/11 03:32:39 wasistho
142 ! changed rocturb nomenclature
143 !
144 ! Revision 1.12 2004/03/05 22:09:00 jferry
145 ! created global variables for peul, plag, and inrt use
146 !
147 ! Revision 1.11 2003/11/25 21:01:40 haselbac
148 ! Removed RFLU routines, now in RFLU_UpdateDummyCells
149 !
150 ! Revision 1.10 2003/11/20 16:40:35 mdbrandy
151 ! Backing out RocfluidMP changes from 11-17-03
152 !
153 ! Revision 1.7 2003/10/03 20:41:09 haselbac
154 ! Removed call to UpdateTbc - wrong place
155 !
156 ! Revision 1.6 2003/10/03 20:12:22 wasistho
157 ! initial installation of turbModel SA and DES
158 !
159 ! Revision 1.5 2003/10/01 23:52:09 jblazek
160 ! Corrected bug in moving noslip wall BC and grid speeds.
161 !
162 ! Revision 1.4 2003/09/26 21:45:34 fnajjar
163 ! Modified ModInterfaces calls to proper physical modules
164 !
165 ! Revision 1.3 2003/05/15 02:57:02 jblazek
166 ! Inlined index function.
167 !
168 ! Revision 1.2 2003/04/09 14:17:23 fnajjar
169 ! Added PEUL_BoundaryConditionsSend for MPI-based rocsmoke
170 !
171 ! Revision 1.1 2003/03/28 19:45:59 fnajjar
172 ! Initial import for RocfluidMP
173 !
174 !******************************************************************************
175 
176 
177 
178 
179 
180 
181 
subroutine initcommunicationmp(regions, iReg, istage)
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine peul_boundaryconditionssend(regions, iReg)
subroutine, public rflo_boundaryconditionssend(regions, iReg)
subroutine turb_rflo_ransbndconditionssend(regions, iReg)
subroutine deregisterfunction(global)
Definition: ModError.F90:469