Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SURF_CountInteractingPatches.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: count number of boundary patches interacting with GenX.
26 !
27 ! Description: none.
28 !
29 ! Input: regions = region dimensions and topology.
30 !
31 ! Output: nInteract = no. of interacting boundary patches.
32 !
33 ! Notes: none.
34 !
35 !******************************************************************************
36 !
37 ! $Id: SURF_CountInteractingPatches.F90,v 1.3 2008/12/06 08:44:52 mtcampbe Exp $
38 !
39 ! Copyright: (c) 2001 by the University of Illinois
40 !
41 !******************************************************************************
42 
43 SUBROUTINE countinteractingpatches( regions,nInteract )
44 
45  USE moddatatypes
46  USE modbndpatch, ONLY : t_patch
47  USE moddatastruct, ONLY : t_region
48  USE modglobal, ONLY : t_global
49  USE moderror
50  USE modparameters
51  IMPLICIT NONE
52 
53 ! ... parameters
54  INTEGER :: ninteract
55 
56  TYPE(t_region), POINTER :: regions(:)
57 
58 ! ... loop variables
59  INTEGER :: ireg, ipatch
60 
61 ! ... local variables
62  TYPE(t_global), POINTER :: global
63  TYPE(t_patch), POINTER :: patch
64 
65 !******************************************************************************
66 
67  global => regions(1)%global
68 
69  CALL registerfunction( global,'CountInteractingPatches', &
70  'SURF_CountInteractingPatches.F90' )
71 
72 ! loop over all regions
73 
74  ninteract = 0
75 
76  DO ireg=1,global%nRegions
77 
78 ! - loop over all patches of a region
79 
80  DO ipatch=1,regions(ireg)%nPatches
81  patch => regions(ireg)%levels(1)%patches(ipatch)
82  IF (patch%bcCoupled == bc_external) ninteract = ninteract + 1
83  ENDDO ! iPatch
84 
85  ENDDO ! iReg
86 
87 ! finalize
88 
89  CALL deregisterfunction( global )
90 
91 END SUBROUTINE countinteractingpatches
92 
93 !******************************************************************************
94 !
95 ! RCS Revision history:
96 !
97 ! $Log: SURF_CountInteractingPatches.F90,v $
98 ! Revision 1.3 2008/12/06 08:44:52 mtcampbe
99 ! Updated license.
100 !
101 ! Revision 1.2 2008/11/19 22:18:02 mtcampbe
102 ! Added Illinois Open Source License/Copyright
103 !
104 ! Revision 1.1 2004/12/03 02:47:00 wasistho
105 ! added prefix
106 !
107 ! Revision 1.1 2004/12/03 00:49:09 wasistho
108 ! lower to upper case
109 !
110 ! Revision 1.3 2003/05/15 02:57:07 jblazek
111 ! Inlined index function.
112 !
113 ! Revision 1.2 2003/03/20 19:48:09 haselbac
114 ! Corrected mistake in phased check-in
115 !
116 ! Revision 1.1 2002/10/19 00:40:31 jblazek
117 ! Added utility (rflosurf) to write out surface grids for GenX.
118 !
119 !******************************************************************************
120 
121 
122 
123 
124 
125 
126 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
Definition: patch.h:74
subroutine countinteractingpatches(regions, nInteract)
subroutine deregisterfunction(global)
Definition: ModError.F90:469