Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLU_SetPatchPlotFlags.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: Set patch plotting flags.
26 !
27 ! Description: None.
28 !
29 ! Input:
30 ! pRegion Pointer to region data
31 !
32 ! Output: None.
33 !
34 ! Notes: None.
35 !
36 ! ******************************************************************************
37 !
38 ! $Id: RFLU_SetPatchPlotFlags.F90,v 1.7 2008/12/06 08:45:06 mtcampbe Exp $
39 !
40 ! Copyright: (c) 2005 by the University of Illinois
41 !
42 ! ******************************************************************************
43 
44 SUBROUTINE rflu_setpatchplotflags(pRegion)
45 
46  USE moddatatypes
47  USE modglobal, ONLY: t_global
48  USE moderror
49  USE moddatastruct, ONLY: t_region
50  USE modbndpatch, ONLY: t_patch
51  USE modparameters
52  USE modmpi
53 
54  IMPLICIT NONE
55 
56 ! ******************************************************************************
57 ! Declarations and definitions
58 ! ******************************************************************************
59 
60 ! ==============================================================================
61 ! Arguments
62 ! ==============================================================================
63 
64  TYPE(t_region), POINTER :: pregion
65 
66 ! ==============================================================================
67 ! Local variables
68 ! ==============================================================================
69 
70  CHARACTER(CHRLEN) :: rcsidentstring
71  INTEGER :: bcvirtcntr,ipatch
72  TYPE(t_global), POINTER :: global
73  TYPE(t_patch), POINTER :: ppatch
74 
75 ! ******************************************************************************
76 ! Start
77 ! ******************************************************************************
78 
79  rcsidentstring = '$RCSfile: RFLU_SetPatchPlotFlags.F90,v $ $Revision: 1.7 $'
80 
81  global => pregion%global
82 
83  CALL registerfunction(global,'RFLU_SetPatchPlotFlags',&
84  'RFLU_SetPatchPlotFlags.F90')
85 
86  IF ( global%myProcid == masterproc .AND. &
87  global%verbLevel > verbose_none ) THEN
88  WRITE(stdout,'(A,1X,A)') solver_name,'Setting patch plot flags...'
89  END IF ! global%verbLevel
90 
91 ! ******************************************************************************
92 ! Loop over patches
93 ! ******************************************************************************
94 
95  bcvirtcntr = 0
96 
97  SELECT CASE ( pregion%mixtInput%dimens )
98  CASE ( 1,2 )
99  IF ( global%postPlotPatchFlag .EQV. .true. ) THEN
100  DO ipatch = 1,pregion%grid%nPatches
101  ppatch => pregion%patches(ipatch)
102 
103  IF ( ppatch%bcType == bc_virtual ) THEN
104  bcvirtcntr = bcvirtcntr + 1
105 
106  IF ( bcvirtcntr == 1 ) THEN
107  ppatch%plotFlag = .true.
108  ELSE
109  ppatch%plotFlag = .false.
110  END IF ! bcVirtCntr
111  ELSE
112  ppatch%plotFlag = .false.
113  END IF ! pPatch%bcType
114  END DO ! iPatch
115  ELSE
116  DO ipatch = 1,pregion%grid%nPatches
117  ppatch => pregion%patches(ipatch)
118 
119  ppatch%plotFlag = .true.
120  END DO ! iPatch
121  END IF ! global%postPlotPatchFlag
122  CASE ( 3 )
123  DO ipatch = 1,pregion%grid%nPatches
124  ppatch => pregion%patches(ipatch)
125 
126  ppatch%plotFlag = .true.
127  END DO ! iPatch
128  CASE default
129  CALL errorstop(global,err_reached_default,__line__)
130  END SELECT ! pRegion%mixtInput%dimens
131 
132 ! ******************************************************************************
133 ! Write info
134 ! ******************************************************************************
135 
136  IF ( global%myProcid == masterproc .AND. &
137  global%verbLevel > verbose_none ) THEN
138  WRITE(stdout,'(A,3X,A)') solver_name,'Patch plot flag information:'
139  WRITE(stdout,'(A,5X,A,1X,A,1X,A)') solver_name,'Local','Global','Flag'
140 
141  DO ipatch = 1,pregion%grid%nPatches
142  ppatch => pregion%patches(ipatch)
143 
144  WRITE(stdout,'(A,4X,I4,2X,I4,5X,L1)') solver_name,ipatch, &
145  ppatch%iPatchGlobal, &
146  ppatch%plotFlag
147  END DO ! iPatch
148  END IF ! global%verbLevel
149 
150 ! ******************************************************************************
151 ! End
152 ! ******************************************************************************
153 
154  IF ( global%myProcid == masterproc .AND. &
155  global%verbLevel > verbose_none ) THEN
156  WRITE(stdout,'(A,1X,A)') solver_name,'Setting patch plot flags done.'
157  END IF ! global%verbLevel
158 
159  CALL deregisterfunction(global)
160 
161 END SUBROUTINE rflu_setpatchplotflags
162 
163 ! ******************************************************************************
164 !
165 ! RCS Revision history:
166 !
167 ! $Log: RFLU_SetPatchPlotFlags.F90,v $
168 ! Revision 1.7 2008/12/06 08:45:06 mtcampbe
169 ! Updated license.
170 !
171 ! Revision 1.6 2008/11/19 22:18:17 mtcampbe
172 ! Added Illinois Open Source License/Copyright
173 !
174 ! Revision 1.5 2007/02/27 13:25:04 haselbac
175 ! Enabled 1d computations
176 !
177 ! Revision 1.4 2006/04/07 15:19:26 haselbac
178 ! Removed tabs
179 !
180 ! Revision 1.3 2005/10/28 19:18:51 haselbac
181 ! Added use of postPlotPatchFlag in setting pPatch%plotFlag
182 !
183 ! Revision 1.2 2005/09/21 19:42:18 haselbac
184 ! Added writing of info
185 !
186 ! Revision 1.1 2005/08/09 01:14:30 haselbac
187 ! Initial revision
188 !
189 ! ******************************************************************************
190 
191 
192 
193 
194 
195 
196 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine rflu_setpatchplotflags(pRegion)
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine deregisterfunction(global)
Definition: ModError.F90:469