Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLO_Multigrid.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: integrate the governing equations in time using
26 ! the multigrid methodology.
27 !
28 ! Description: none.
29 !
30 ! Input: regions = data of all grid regions.
31 !
32 ! Output: regions = flow variables for all grid regions.
33 !
34 ! Notes: none.
35 !
36 !******************************************************************************
37 !
38 ! $Id: RFLO_Multigrid.F90,v 1.3 2008/12/06 08:44:27 mtcampbe Exp $
39 !
40 ! Copyright: (c) 2001 by the University of Illinois
41 !
42 !******************************************************************************
43 
44 SUBROUTINE rflo_multigrid( dIterSystem,regions )
45 
46  USE moddatatypes
47  USE moddatastruct, ONLY : t_region
48  USE modglobal, ONLY : t_global
49  USE modinterfaces, ONLY :
50  USE moderror
51  USE modmpi
52  USE modparameters
53  IMPLICIT NONE
54 
55 ! ... parameters
56  INTEGER :: ditersystem
57 
58  TYPE(t_region), POINTER :: regions(:)
59 
60 ! ... loop variables
61 
62 
63 ! ... local variables
64  INTEGER :: iter
65 
66  LOGICAL :: stopexists
67 
68  TYPE(t_global), POINTER :: global
69 
70 !******************************************************************************
71 
72  global => regions(1)%global
73 
74  CALL registerfunction( global,'RFLO_Multigrid',&
75  'RFLO_Multigrid.F90' )
76 
77  iter = 0
78 
79 ! iterations ------------------------------------------------------------------
80 
81  DO
82 
83 ! - update time / iteration number
84 
85  global%currentIter = global%currentIter + 1
86  iter = iter + 1
87 
88 ! - check for stop file
89 
90  INQUIRE(file="STOP",exist=stopexists)
91  IF (stopexists) THEN
92  IF (global%myProcid==masterproc .AND. global%verbLevel/=verbose_none) &
93  WRITE(stdout,1000) solver_name
94  ENDIF
95 
96 ! - check for end of time stepping
97 
98  IF (iter==ditersystem .OR. global%residual<=global%resTol .OR. &
99  stopexists) EXIT
100 
101  ENDDO ! loop over iter
102 
103 ! finalize --------------------------------------------------------------------
104 
105  CALL deregisterfunction( global )
106 
107 1000 FORMAT(/,a,' File ''STOP'' detected !')
108 
109 END SUBROUTINE rflo_multigrid
110 
111 !******************************************************************************
112 !
113 ! RCS Revision history:
114 !
115 ! $Log: RFLO_Multigrid.F90,v $
116 ! Revision 1.3 2008/12/06 08:44:27 mtcampbe
117 ! Updated license.
118 !
119 ! Revision 1.2 2008/11/19 22:17:38 mtcampbe
120 ! Added Illinois Open Source License/Copyright
121 !
122 ! Revision 1.1 2004/11/29 20:51:39 wasistho
123 ! lower to upper case
124 !
125 ! Revision 1.10 2003/11/20 16:40:39 mdbrandy
126 ! Backing out RocfluidMP changes from 11-17-03
127 !
128 ! Revision 1.6 2003/05/15 02:57:04 jblazek
129 ! Inlined index function.
130 !
131 ! Revision 1.5 2002/09/05 17:40:21 jblazek
132 ! Variable global moved into regions().
133 !
134 ! Revision 1.4 2002/07/16 21:34:37 jblazek
135 ! Prefixed screen output with SOLVER_NAME.
136 !
137 ! Revision 1.3 2002/06/22 01:13:38 jblazek
138 ! Modified interfaces to BC routines.
139 !
140 ! Revision 1.2 2002/02/21 23:25:06 jblazek
141 ! Blocks renamed as regions.
142 !
143 ! Revision 1.1 2002/01/16 22:03:35 jblazek
144 ! Added time-stepping routines.
145 !
146 !******************************************************************************
147 
148 
149 
150 
151 
152 
153 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine rflo_multigrid(dIterSystem, regions)
subroutine deregisterfunction(global)
Definition: ModError.F90:469
RT a() const
Definition: Line_2.h:140