Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PEUL_BoundaryConditionsRecv.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: receive data for dummy cells from adjacent regions being
26 ! on another processor specific to PEUL Module.
27 !
28 ! Description: none.
29 !
30 ! Input: regions = data of all regions
31 ! iReg = index of current region.
32 !
33 ! Output: regions(iReg)%levels%peul%cv =
34 ! updated smoke concentrations (cv) in dummy cells of current region.
35 !
36 ! Notes: none.
37 !
38 !******************************************************************************
39 !
40 ! $Id: PEUL_BoundaryConditionsRecv.F90,v 1.3 2008/12/06 08:44:39 mtcampbe Exp $
41 !
42 ! Copyright: (c) 2003 by the University of Illinois
43 !
44 !******************************************************************************
45 
46 SUBROUTINE peul_boundaryconditionsrecv( regions,iReg ) ! PUBLIC
47 
48  USE moddatatypes
49  USE modbndpatch, ONLY : t_patch
50  USE moddatastruct, ONLY : t_region
51  USE modglobal, ONLY : t_global
52  USE moderror
53  USE modparameters
58  IMPLICIT NONE
59 
60 ! ... parameters
61  TYPE(t_region), POINTER :: regions(:)
62  INTEGER, INTENT(IN) :: ireg
63 
64 ! ... loop variables
65  INTEGER :: ipatch
66 
67 ! ... local variables
68  CHARACTER(CHRLEN) :: rcsidentstring
69 
70  INTEGER :: ilev, npatches, bctype, iregsrc, ipatchsrc
71 
72  TYPE(t_patch), POINTER :: patch, patchsrc
73  TYPE(t_global), POINTER :: global
74 
75 !******************************************************************************
76 
77  rcsidentstring = &
78  '$RCSfile: PEUL_BoundaryConditionsRecv.F90,v $ $Revision: 1.3 $'
79 
80  global => regions(ireg)%global
81 
82  CALL registerfunction( global,'PEUL_BoundaryConditionsRecv', 'PEUL_BoundaryConditionsRecv.F90' )
83 
84 ! begin -----------------------------------------------------------------------
85 
86 ! get dimensions --------------------------------------------------------------
87 
88  ilev = regions(ireg)%currLevel
89  npatches = regions(ireg)%nPatches
90 
91 ! receive data (regular cells) from other processors --------------------------
92 
93  DO ipatch=1,npatches
94 
95  patch => regions(ireg)%levels(ilev)%patches(ipatch)
96 
97  bctype = patch%bcType
98  iregsrc = patch%srcRegion
99  ipatchsrc = patch%srcPatch
100 
101 ! - region interface, periodic boundary
102 
103  IF ((bctype>=bc_regionconf .AND. bctype<=bc_regionconf+bc_range) .OR. &
104  (bctype>=bc_regionint .AND. bctype<=bc_regionint +bc_range) .OR. &
105  (bctype>=bc_regnonconf .AND. bctype<=bc_regnonconf+bc_range) .OR. &
106  (bctype>=bc_tra_peri .AND. bctype<=bc_tra_peri +bc_range) .OR. &
107  (bctype>=bc_rot_peri .AND. bctype<=bc_rot_peri +bc_range)) THEN
108  IF (regions(iregsrc)%procid /= regions(ireg)%global%myProcid) THEN
109  patchsrc => regions(iregsrc)%levels(ilev)%patches(ipatchsrc)
110 
111  CALL peul_receivedummyvals( regions(ireg),regions(iregsrc), &
112  patch,patchsrc )
113  ENDIF
114  ENDIF
115 
116  ENDDO ! iPatch
117 
118 ! copy/exchange data for edge and corner cells --------------------------------
119 
120  CALL peul_setcorneredgecells( regions(ireg) )
121 
122  DO ipatch=1,npatches
123  patch => regions(ireg)%levels(ilev)%patches(ipatch)
124  bctype = patch%bcType
125  IF (bctype>=bc_symmetry .AND. bctype<=bc_symmetry+bc_range) THEN
126  CALL peul_correctcorneredgecells( regions(ireg),patch,bctype )
127  ENDIF
128  ENDDO ! iPatch
129 
130  CALL peul_exchangecorneredgecells( regions,ireg )
131  CALL peul_receivecorneredgecells( regions,ireg )
132 
133 ! finalize --------------------------------------------------------------------
134 
135  CALL deregisterfunction( global )
136 
137 END SUBROUTINE peul_boundaryconditionsrecv
138 
139 !******************************************************************************
140 !
141 ! RCS Revision history:
142 !
143 ! $Log: PEUL_BoundaryConditionsRecv.F90,v $
144 ! Revision 1.3 2008/12/06 08:44:39 mtcampbe
145 ! Updated license.
146 !
147 ! Revision 1.2 2008/11/19 22:17:51 mtcampbe
148 ! Added Illinois Open Source License/Copyright
149 !
150 ! Revision 1.1 2004/12/01 21:09:20 haselbac
151 ! Initial revision after changing case
152 !
153 ! Revision 1.3 2004/03/05 22:09:04 jferry
154 ! created global variables for peul, plag, and inrt use
155 !
156 ! Revision 1.2 2004/03/02 21:44:07 jferry
157 ! Added corner and edge cell data structures and routines
158 !
159 ! Revision 1.1 2003/04/09 14:32:53 fnajjar
160 ! Initial Import of MPI-based rocsmoke
161 !
162 !******************************************************************************
163 
164 
165 
166 
167 
168 
169 
subroutine peul_exchangecorneredgecells(regions, iReg)
subroutine peul_correctcorneredgecells(region, patch, bcType)
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine peul_receivecorneredgecells(regions, iReg)
Definition: patch.h:74
subroutine peul_setcorneredgecells(region)
subroutine peul_receivedummyvals(region, regionSrc, patch, patchSrc)
subroutine peul_boundaryconditionsrecv(regions, iReg)
subroutine deregisterfunction(global)
Definition: ModError.F90:469