Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PEUL_BoundaryConditionsSend.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: send data to dummy cells of adjacent regions being located
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: data to other processors.
34 !
35 ! Notes: none.
36 !
37 !******************************************************************************
38 !
39 ! $Id: PEUL_BoundaryConditionsSend.F90,v 1.3 2008/12/06 08:44:39 mtcampbe Exp $
40 !
41 ! Copyright: (c) 2003 by the University of Illinois
42 !
43 !******************************************************************************
44 
45 SUBROUTINE peul_boundaryconditionssend( regions,iReg ) ! PUBLIC
46 
47  USE moddatatypes
48  USE modbndpatch, ONLY : t_patch
49  USE moddatastruct, ONLY : t_region
50  USE modglobal, ONLY : t_global
51  USE moderror
52  USE modparameters
55  IMPLICIT NONE
56 
57 ! ... parameters
58  TYPE(t_region), POINTER :: regions(:)
59  INTEGER, INTENT(IN) :: ireg
60 
61 ! ... loop variables
62  INTEGER :: ipatch
63 
64 ! ... local variables
65  CHARACTER(CHRLEN) :: rcsidentstring
66 
67  INTEGER :: ilev, npatches, bctype, iregsrc, ipatchsrc
68 
69  TYPE(t_patch), POINTER :: patch, patchsrc
70  TYPE(t_global), POINTER :: global
71 
72 !******************************************************************************
73 
74  rcsidentstring = &
75  '$RCSfile: PEUL_BoundaryConditionsSend.F90,v $ $Revision: 1.3 $'
76 
77  global => regions(ireg)%global
78 
79  CALL registerfunction( global,'PEUL_BoundaryConditionsSend',&
80  'PEUL_BoundaryConditionsSend.F90' )
81 
82 ! get dimensions --------------------------------------------------------------
83 
84  ilev = regions(ireg)%currLevel
85  npatches = regions(ireg)%nPatches
86 
87 ! send data for edge and corner cells -----------------------------------------
88 
89  CALL peul_sendcorneredgecells( regions,ireg )
90 
91 ! loop over patches -----------------------------------------------------------
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 ! - conforming region interface
102 
103  IF (bctype>=bc_regionconf .AND. bctype<=bc_regionconf+bc_range) THEN
104  patchsrc => regions(iregsrc)%levels(ilev)%patches(ipatchsrc)
105 
106  IF (regions(iregsrc)%procid /= global%myProcid) THEN
107  CALL peul_senddummyconf( regions(ireg),regions(iregsrc),patch )
108  ENDIF
109 
110 ! - non-conforming region interface (integer)
111 
112 ! ELSE IF (bcType>=BC_REGIONINT .AND. bcType<=BC_REGIONINT+BC_RANGE) THEN
113 ! patchSrc => regions(iRegSrc)%levels(iLev)%patches(iPatchSrc)
114 !
115 ! IF (regions(iRegSrc)%procid /= global%myProcid) THEN
116 ! CALL PEUL_SendDummyInt( regions(iReg),regions(iRegSrc),patch )
117 ! ENDIF
118 
119 ! - non-conforming region interface (irregular)
120 
121 ! ELSE IF (bcType>=BC_REGNONCONF .AND. bcType<=BC_REGNONCONF+BC_RANGE) THEN
122 ! patchSrc => regions(iRegSrc)%levels(iLev)%patches(iPatchSrc)
123 !
124 ! IF (regions(iRegSrc)%procid /= global%myProcid) THEN
125 ! CALL PEUL_SendDummyIreg( regions(iReg),regions(iRegSrc),patch )
126 ! ENDIF
127 
128 ! - translational periodicity
129 
130 ! ELSE IF (bcType>=BC_TRA_PERI .AND. bcType<=BC_TRA_PERI+BC_RANGE) THEN
131 ! patchSrc => regions(iRegSrc)%levels(iLev)%patches(iPatchSrc)
132 !
133 ! IF (regions(iRegSrc)%procid /= global%myProcid) THEN
134 ! CALL PEUL_SendDummyConf( regions(iReg),regions(iRegSrc),patch )
135 ! ENDIF
136 
137 ! - rotational periodicity
138 
139 ! ELSE IF (bcType>=BC_ROT_PERI .AND. bcType<=BC_ROT_PERI+BC_RANGE) THEN
140 ! patchSrc => regions(iRegSrc)%levels(iLev)%patches(iPatchSrc)
141 !
142 ! CALL PEUL_BcondRotatPeriod( regions(iReg),regions(iRegSrc), &
143 ! patch,patchSrc )
144 
145  ENDIF ! bcType
146 
147  ENDDO ! iPatch
148 
149 ! finalize --------------------------------------------------------------------
150 
151  CALL deregisterfunction( global )
152 
153 END SUBROUTINE peul_boundaryconditionssend
154 
155 !******************************************************************************
156 !
157 ! RCS Revision history:
158 !
159 ! $Log: PEUL_BoundaryConditionsSend.F90,v $
160 ! Revision 1.3 2008/12/06 08:44:39 mtcampbe
161 ! Updated license.
162 !
163 ! Revision 1.2 2008/11/19 22:17:51 mtcampbe
164 ! Added Illinois Open Source License/Copyright
165 !
166 ! Revision 1.1 2004/12/01 21:09:22 haselbac
167 ! Initial revision after changing case
168 !
169 ! Revision 1.2 2004/03/02 21:44:07 jferry
170 ! Added corner and edge cell data structures and routines
171 !
172 ! Revision 1.1 2003/04/09 14:33:15 fnajjar
173 ! Initial Import of MPI-based rocsmoke
174 !
175 !******************************************************************************
176 
177 
178 
179 
180 
181 
182 
subroutine peul_senddummyconf(region, regionSrc, patch)
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine peul_boundaryconditionssend(regions, iReg)
Definition: patch.h:74
subroutine peul_sendcorneredgecells(regions, iReg)
subroutine deregisterfunction(global)
Definition: ModError.F90:469