Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PLAG_PatchUpdateWrapper.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: wrapper for patch update step in PLAG module.
26 !
27 ! Description: none.
28 !
29 ! Input: regions = data of all regions,
30 ! istage = current RK stage
31 !
32 ! Output: regions%levels%mixt = new solution after one time step.
33 !
34 ! Notes: none.
35 !
36 !******************************************************************************
37 !
38 ! $Id: PLAG_PatchUpdateWrapper.F90,v 1.3 2008/12/06 08:44:34 mtcampbe Exp $
39 !
40 ! Copyright: (c) 2003 by the University of Illinois
41 !
42 !******************************************************************************
43 
44 SUBROUTINE plag_patchupdatewrapper( regions )
45 
46  USE moddatatypes
47  USE moddatastruct, ONLY : t_region
48  USE modglobal, ONLY : t_global
49  USE moderror
50  USE modmpi
51  USE modparameters
52 
54 
56 
57  IMPLICIT NONE
58 
59 ! ... parameters
60  TYPE(t_region), POINTER :: regions(:)
61 
62 ! ... loop variables
63  INTEGER :: ireg
64 
65 ! ... local variables
66  CHARACTER(CHRLEN) :: rcsidentstring
67  TYPE(t_region), POINTER :: region
68 
69  TYPE(t_global), POINTER :: global
70 
71 !******************************************************************************
72 
73  rcsidentstring = '$RCSfile: PLAG_PatchUpdateWrapper.F90,v $ $Revision: 1.3 $'
74 
75  global => regions(1)%global
76 
77  CALL registerfunction( global,'PLAG_PatchUpdateWrapper',&
78  'PLAG_PatchUpdateWrapper.F90' )
79 
80 ! check if module is active in any region======================================
81 
82  IF (.NOT. global%plagUsed) goto 999
83 
84 ! loop over stages and regions ================================================
85 
86  DO ireg=1,global%nRegions
87 
88  IF (regions(ireg)%procid==global%myProcid .AND. & ! region active and
89  regions(ireg)%active==active ) THEN ! on my processor
90  CALL plag_patchupdate( regions, ireg )
91  ENDIF ! regions
92 
93  ENDDO ! iReg
94 
95  CALL plag_patchbuffersendrecv( regions )
96 
97  DO ireg=1,global%nRegions
98 
99  IF (regions(ireg)%procid==global%myProcid .AND. & ! region active and
100  regions(ireg)%active==active ) THEN ! on my processor
101  region => regions(ireg)
102  CALL plag_noncvupdate( region )
103  ENDIF ! regions
104 
105  ENDDO ! iReg
106 
107 ! finalize ====================================================================
108 
109 999 CONTINUE
110  CALL deregisterfunction( global )
111 
112 END SUBROUTINE plag_patchupdatewrapper
113 
114 !******************************************************************************
115 !
116 ! RCS Revision history:
117 !
118 ! $Log: PLAG_PatchUpdateWrapper.F90,v $
119 ! Revision 1.3 2008/12/06 08:44:34 mtcampbe
120 ! Updated license.
121 !
122 ! Revision 1.2 2008/11/19 22:17:47 mtcampbe
123 ! Added Illinois Open Source License/Copyright
124 !
125 ! Revision 1.1 2004/12/01 20:58:00 fnajjar
126 ! Initial revision after changing case
127 !
128 ! Revision 1.7 2004/11/14 20:30:38 haselbac
129 ! Adapted interface
130 !
131 ! Revision 1.6 2004/03/05 22:09:03 jferry
132 ! created global variables for peul, plag, and inrt use
133 !
134 ! Revision 1.5 2004/02/26 21:14:28 haselbac
135 ! Adapted USE <interface> statements and calls
136 !
137 ! Revision 1.4 2004/02/13 16:23:40 fnajjar
138 ! Include correct Interface call for PLAG_nonCvUpdate
139 !
140 ! Revision 1.3 2003/06/19 15:47:08 fnajjar
141 ! Fixed comments on Input field
142 !
143 ! Revision 1.2 2003/05/05 18:11:08 fnajjar
144 ! added check that particles are used in some region
145 !
146 ! Revision 1.1 2003/03/28 19:53:10 fnajjar
147 ! Initial import of wrapper routines for RocfluidMP
148 !
149 !******************************************************************************
150 
151 
152 
153 
154 
155 
156 
subroutine plag_patchupdate(regions, iReg)
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine plag_patchbuffersendrecv(regions)
subroutine plag_noncvupdate(region)
subroutine deregisterfunction(global)
Definition: ModError.F90:469
subroutine plag_patchupdatewrapper(regions)