Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
standalone/Main.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: main driver of ROCFLO-MP.
26 !
27 ! Description: gets the case name + verbosity level and calls the flow solver.
28 !
29 ! Input: case name & verbosity level from the list of arguments
30 !
31 ! Output: accurate solution.
32 !
33 ! Notes: none
34 !
35 !******************************************************************************
36 !
37 ! $Id: Main.F90,v 1.5 2008/12/06 08:44:45 mtcampbe Exp $
38 !
39 ! Copyright: (c) 2001-2005 by the University of Illinois
40 !
41 !******************************************************************************
42 
43 PROGRAM main
44 
45  USE moddatatypes
46  USE moderror
47  USE modglobal, ONLY : t_global
48  USE moddatastruct, ONLY : t_level,t_region
49  USE modparameters
52  IMPLICIT NONE
53 
54 ! ... local variables
55  CHARACTER(CHRLEN) :: casename, verbosity
56 
57  INTEGER :: verblevel, ditersystem, errorflag
58 
59  REAL(RFREAL) :: dtimesystem
60 
61  TYPE(t_region), POINTER :: regions(:)
62  TYPE(t_global), POINTER :: global
63 
64 !******************************************************************************
65 ! read case name, verbosity level
66 
67  CALL getarg(1,casename)
68  CALL getarg(2,verbosity)
69 
70  IF (len_trim(casename) == 0 .OR. len_trim(verbosity) == 0) THEN
71  WRITE(stdout,'(A)') solver_name
72  WRITE(stdout,'(A,1X,A)') solver_name,'Usage: rflomp <casename> <verbosity>'
73  WRITE(stdout,'(A,1X,A)') solver_name,' verbosity = 0 - no output'
74  WRITE(stdout,'(A,1X,A)') solver_name,' = 1 - moderate output'
75  WRITE(stdout,'(A,1X,A)') solver_name,' = 2 - output all'
76  WRITE(stdout,'(A)') solver_name
77  stop
78  ENDIF ! LEN_TRIM
79 
80  READ(verbosity,*) verblevel
81 
82 ! initialize ------------------------------------------------------------------
83 
84  ALLOCATE( global,stat=errorflag )
85  IF (errorflag /= err_none) THEN
86  WRITE(stderr,'(A)') solver_name//' ERROR - pointer allocation failed.'
87  stop
88  ENDIF
89 
90  CALL rflo_initflowsolver( casename,verblevel,global,regions )
91 
92 ! call the flow solver --------------------------------------------------------
93 
94  dtimesystem = global%maxTime - global%currentTime
95  ditersystem = global%MaxIter - global%currentIter
96 
97  CALL rflo_flowsolver( dtimesystem,ditersystem,regions )
98 
99 ! shut down -------------------------------------------------------------------
100 
101  CALL rflo_endflowsolver( regions )
102 
103 END PROGRAM main
104 
105 !******************************************************************************
106 !
107 ! RCS Revision history:
108 !
109 ! $Log: Main.F90,v $
110 ! Revision 1.5 2008/12/06 08:44:45 mtcampbe
111 ! Updated license.
112 !
113 ! Revision 1.4 2008/11/19 22:17:57 mtcampbe
114 ! Added Illinois Open Source License/Copyright
115 !
116 ! Revision 1.3 2005/05/03 03:07:27 haselbac
117 ! Removed RFLU stuff
118 !
119 ! Revision 1.2 2005/04/15 15:07:46 haselbac
120 ! Cosmetics only
121 !
122 ! Revision 1.1 2004/12/01 21:29:33 haselbac
123 ! Initial revision after changing case
124 !
125 ! Revision 1.9 2003/11/20 16:40:40 mdbrandy
126 ! Backing out RocfluidMP changes from 11-17-03
127 !
128 ! Revision 1.5 2002/10/05 19:40:34 haselbac
129 ! GENX integration of RFLU
130 !
131 ! Revision 1.4 2002/09/20 22:22:37 jblazek
132 ! Finalized integration into GenX.
133 !
134 ! Revision 1.3 2002/09/09 16:47:11 haselbac
135 ! Added RFLU calls
136 !
137 ! Revision 1.2 2002/09/05 17:40:22 jblazek
138 ! Variable global moved into regions().
139 !
140 ! Revision 1.1 2002/08/15 19:43:11 jblazek
141 ! Prepared solver to be optionally linked with an external driver.
142 !
143 ! Revision 1.11 2002/07/25 16:18:02 haselbac
144 ! Fix problem completely, cpp apparently confused by double backslashes
145 !
146 ! Revision 1.10 2002/07/25 16:04:18 haselbac
147 ! Corrected output, leads to error on popovich
148 !
149 ! Revision 1.9 2002/07/25 14:47:23 haselbac
150 ! Added call to RFLU_InitGlobal
151 !
152 ! Revision 1.8 2002/07/16 21:34:37 jblazek
153 ! Prefixed screen output with SOLVER_NAME.
154 !
155 ! Revision 1.7 2002/06/17 13:32:55 haselbac
156 ! Prefixed SOLVER_NAME to all screen output
157 !
158 ! Revision 1.6 2002/04/04 19:41:09 jblazek
159 ! Moved dTime and dIter test from main to flowSolver.
160 !
161 ! Revision 1.5 2002/03/14 19:02:29 haselbac
162 ! Modified argument list of RFLU calls
163 !
164 ! Revision 1.4 2002/02/25 22:36:52 jblazek
165 ! Simplified solver initialization routine.
166 !
167 ! Revision 1.3 2002/01/02 16:00:03 jblazek
168 ! Added input for multigrid parameters.
169 !
170 ! Revision 1.2 2001/12/22 00:09:38 jblazek
171 ! Added routines to store grid and solution.
172 !
173 ! Revision 1.1.1.1 2001/12/03 21:44:04 jblazek
174 ! Import of RocfluidMP
175 !
176 !******************************************************************************
177 
178 
179 
180 
181 
182 
subroutine rflo_flowsolver(dTimeSystem, dIterSystem, regions)
subroutine rflo_endflowsolver(regions)
subroutine rflo_initflowsolver(casename, verbLevel, global, regions)
int main(int argc, char *argv[])
Definition: blastest.C:94