Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
INRT_ComputeMaxEdges.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: Compute maximum number of edges in any particle-related and
26 ! cell-related interaction
27 !
28 ! Description: none.
29 !
30 ! Input: region = data of current region.
31 !
32 ! Output: region%levels(iLev)%inrt%inrtInput%maxDisEdges and maxConEdges
33 !
34 ! Notes: none.
35 !
36 !******************************************************************************
37 !
38 ! $Id: INRT_ComputeMaxEdges.F90,v 1.3 2008/12/06 08:44:31 mtcampbe Exp $
39 !
40 ! Copyright: (c) 2004 by the University of Illinois
41 !
42 !******************************************************************************
43 
44 SUBROUTINE inrt_computemaxedges( region )
45 
46  USE moddatatypes
47  USE moddatastruct, ONLY : t_region
48  USE modglobal, ONLY : t_global
49  USE moderror
50  USE modinteract, ONLY : t_inrt_interact
52 
53  IMPLICIT NONE
54 
55 ! ... parameters
56  TYPE(t_region), INTENT(INOUT) :: region
57 
58 ! ... loop variables
59  INTEGER :: iinrt
60 
61 ! ... local variables
62  CHARACTER(CHRLEN) :: rcsidentstring
63 
64  INTEGER :: maxconedges,maxdisedges
65 
66  TYPE(t_inrt_interact), POINTER :: inrt
67  TYPE(t_global), POINTER :: global
68 
69 !******************************************************************************
70 
71  rcsidentstring = &
72  '$RCSfile: INRT_ComputeMaxEdges.F90,v $ $Revision: 1.3 $'
73 
74  global => region%global
75 
76  CALL registerfunction( global,'INRT_ComputeMaxEdges',&
77  'INRT_ComputeMaxEdges.F90' )
78 
79 ! begin -----------------------------------------------------------------------
80 
81  maxconedges = 0
82  maxdisedges = 0
83 
84 ! compute maximum number of edges
85 
86  DO iinrt = 1,inrt_type_total
87 
88  inrt => region%inrtInput%inrts(iinrt)
89 
90  IF (inrt%used) THEN
91  IF (inrt%pclsUsed) THEN
92  maxdisedges = max(maxdisedges,inrt%nEdges)
93  ELSE
94  maxconedges = max(maxconedges,inrt%nEdges)
95  ENDIF
96  END IF ! inrt%used
97 
98  END DO ! iInrt
99 
100  region%inrtInput%maxConEdges = maxconedges
101  region%inrtInput%maxDisEdges = maxdisedges
102 
103 ! finalize --------------------------------------------------------------------
104 
105  CALL deregisterfunction( global )
106 
107 END SUBROUTINE inrt_computemaxedges
108 
109 !******************************************************************************
110 !
111 ! RCS Revision history:
112 !
113 ! $Log: INRT_ComputeMaxEdges.F90,v $
114 ! Revision 1.3 2008/12/06 08:44:31 mtcampbe
115 ! Updated license.
116 !
117 ! Revision 1.2 2008/11/19 22:17:44 mtcampbe
118 ! Added Illinois Open Source License/Copyright
119 !
120 ! Revision 1.1 2004/12/01 21:56:19 fnajjar
121 ! Initial revision after changing case
122 !
123 ! Revision 1.1 2004/07/26 17:06:54 fnajjar
124 ! initial import
125 !
126 !******************************************************************************
127 
128 
129 
130 
131 
132 
133 
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
Definition: Vector_n.h:354
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine inrt_computemaxedges(region)
subroutine deregisterfunction(global)
Definition: ModError.F90:469