Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ReadPostSection.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: Read in user input related to postprocessor.
26 !
27 ! Description: None.
28 !
29 ! Input:
30 ! global Pointer to global type
31 !
32 ! Output: None.
33 !
34 ! Notes: none.
35 !
36 !******************************************************************************
37 !
38 ! $Id: ReadPostSection.F90,v 1.15 2008/12/06 08:44:09 mtcampbe Exp $
39 !
40 ! Copyright: (c) 2003-2005 by the University of Illinois
41 !
42 !******************************************************************************
43 
44 SUBROUTINE readpostsection(global)
45 
46  USE moddatatypes
47  USE modglobal, ONLY: t_global
48  USE modinterfaces, ONLY: readsection
49  USE moderror
50  USE modparameters
51 
52  IMPLICIT NONE
53 
54 ! ... parameters
55  TYPE(t_global), POINTER :: global
56 
57 ! ... local variables
58  INTEGER :: nvals
59 
60 #ifdef RFLO
61  INTEGER, PARAMETER :: nvals_max = 9
62 #endif
63 #ifdef RFLU
64  INTEGER, PARAMETER :: nvals_max = 20
65 #endif
66 
67  CHARACTER(CHRLEN) :: rcsidentstring
68  CHARACTER(10) :: keys(nvals_max)
69 
70  LOGICAL :: defined(nvals_max)
71 
72  REAL(RFREAL) :: vals(nvals_max)
73 
74 !******************************************************************************
75 
76  rcsidentstring = '$RCSfile: ReadPostSection.F90,v $ $Revision: 1.15 $'
77 
78  CALL registerfunction(global,'ReadPostSection',&
79  'ReadPostSection.F90')
80 
81 ! specify keywords and search for them
82 
83  nvals = nvals_max
84 
85 #ifdef RFLO
86  keys( 1) = 'PLTTYPE'
87  keys( 2) = 'TIME'
88  keys( 3) = 'ITER'
89  keys( 4) = 'OUTFORMAT'
90  keys( 5) = 'STATSFLAG'
91  keys( 6) = 'TURBFLAG'
92  keys( 7) = 'PLAGFLAG'
93  keys( 8) = 'RADIFLAG'
94  keys( 9) = 'SPECFLAG'
95 
96  CALL readsection( global,if_input,nvals,keys(1:nvals),vals(1:nvals), &
97  defined(1:nvals) )
98 
99  global%postStatsFlag = .false.
100  global%postTurbFlag = .false.
101  global%postPlagFlag = .false.
102  global%postRadiFlag = .false.
103  global%postSpecFlag = .false.
104 
105  IF (defined(1).eqv..true.) THEN
106  IF (int(vals(1)+0.5_rfreal) == 1) THEN
107  global%postPlotType = plot_grid_only
108  ELSE
109  global%postPlotType = plot_grid_flow
110  END IF
111  END IF
112 
113  IF (defined(2).eqv..true.) THEN
114  global%postTime = abs(vals(2))
115  END IF
116 
117  IF (defined(3).eqv..true.) THEN
118  global%postIter = int(vals(3)+0.5_rfreal)
119  END IF
120 
121  IF (defined(4).eqv..true.) THEN
122  global%postOutFmt = int(vals(4)+0.5_rfreal)
123  END IF
124 
125  IF (defined(5).eqv..true.) THEN
126  IF (int(vals(5)+0.5_rfreal) == 1) THEN
127  global%postStatsFlag = .true.
128  END IF
129  END IF
130 
131  IF (defined(6).eqv..true.) THEN
132  IF (int(vals(6)+0.5_rfreal) == 1) THEN
133  global%postTurbFlag = .true.
134  END IF
135  END IF
136 
137  IF (defined(7).eqv..true.) THEN
138  IF (int(vals(7)+0.5_rfreal) == 1) THEN
139  global%postPlagFlag = .true.
140  END IF
141  END IF
142 
143  IF (defined(8).eqv..true.) THEN
144  IF (int(vals(8)+0.5_rfreal) == 1) THEN
145  global%postRadiFlag = .true.
146  END IF
147  END IF
148 
149  IF (defined(9).eqv..true.) THEN
150  IF (int(vals(9)+0.5_rfreal) == 1) THEN
151  global%postSpecFlag = .true.
152  END IF
153  END IF
154 
155  IF (global%postOutFmt <= 1) THEN
156  global%postOutFmt = plot_fmt_generic
157  ELSE IF (global%postOutFmt == 2) THEN
158  global%postOutFmt = plot_fmt_tecplot
159  ELSE
160  global%postOutFmt = plot_fmt_tecascii
161  ENDIF
162 #endif
163 
164 #ifdef RFLU
165  keys( 1) = 'PLTTYPE'
166  keys( 2) = 'MERGEFLAG'
167  keys( 3) = 'PLTVOLFLAG'
168  keys( 4) = 'INTERTYPE'
169  keys( 5) = 'INTERORDER'
170  keys( 6) = 'SPECFLAG'
171  keys( 7) = 'EXTRFLAG'
172  keys( 8) = 'DISCFLAG'
173  keys( 9) = 'SCHTYPE'
174  keys(10) = 'SCHEXP'
175  keys(11) = 'NFRINGES'
176  keys(12) = 'VORTFLAG'
177  keys(13) = 'COREFLAG'
178  keys(14) = 'WRIMERGE'
179  keys(15) = 'ERRFLAG'
180  keys(16) = 'OUTFORMAT'
181  keys(17) = 'NSERVERS'
182  keys(18) = 'PLTPATFLAG'
183  keys(19) = 'PEULFLAG'
184  keys(20) = 'GRADFLAG'
185 
186  CALL readsection(global,if_input,nvals,keys,vals,defined)
187 
188  IF ( defined(1) .EQV. .true. ) THEN
189  IF ( nint(vals(1)) == 1 ) THEN
190  global%postPlotType = plot_grid_only
191  ELSE
192  global%postPlotType = plot_grid_flow
193  END IF ! NINT(vals)
194  END IF ! defined
195 
196  IF ( defined(2) .EQV. .true. ) THEN
197  IF ( nint(vals(2)) == 1 ) THEN
198  global%postMergeFlag = .true.
199  ELSE
200  global%postMergeFlag = .false.
201  END IF ! NINT(vals)
202  END IF ! defined
203 
204  IF ( defined(3) .EQV. .true. ) THEN
205  IF ( nint(vals(3)) == 1 ) THEN
206  global%postPlotVolFlag = .true.
207  ELSE
208  global%postPlotVolFlag = .false.
209  END IF ! NINT(vals)
210  END IF ! defined
211 
212  IF ( defined(4) .EQV. .true. ) THEN
213  global%postInterpType = nint(vals(4))
214  END IF ! defined(4)
215 
216  IF ( defined(5) .EQV. .true. ) THEN
217  global%postInterpOrder = nint(vals(5))
218  END IF ! defined
219 
220  IF ( defined(6) .EQV. .true. ) THEN
221  IF ( nint(vals(6)) == 1 ) THEN
222  global%postSpecFlag = .true.
223  ELSE
224  global%postSpecFlag = .false.
225  END IF ! NINT(vals)
226  END IF ! defined
227 
228  IF ( defined(7) .EQV. .true. ) THEN
229  IF ( nint(vals(7)) == 1 ) THEN
230  global%postExtractFlag = .true.
231  ELSE
232  global%postExtractFlag = .false.
233  END IF ! NINT(vals)
234  END IF ! defined
235 
236  IF ( defined(8) .EQV. .true. ) THEN
237  IF ( nint(vals(8)) == 1 ) THEN
238  global%postDiscFlag = .true.
239  ELSE
240  global%postDiscFlag = .false.
241  END IF ! NINT(vals)
242  END IF ! defined
243 
244  IF ( defined(9) .EQV. .true. ) THEN
245  global%postSchType = nint(vals(9))
246  END IF ! defined
247 
248  IF ( defined(10) .EQV. .true. ) THEN
249  global%postSchExp = vals(10)
250  END IF ! defined
251 
252  IF ( defined(11) .EQV. .true. ) THEN
253  global%postNFringes = nint(vals(11))
254  END IF ! defined
255 
256  IF ( defined(12) .EQV. .true. ) THEN
257  IF ( nint(vals(12)) == 1 ) THEN
258  global%postVortFlag = .true.
259  ELSE
260  global%postVortFlag = .false.
261  END IF ! NINT(vals)
262  END IF ! defined
263 
264  IF ( defined(13) .EQV. .true. ) THEN
265  IF ( nint(vals(13)) == 1 ) THEN
266  global%postVortCoreFlag = .true.
267  ELSE
268  global%postVortCoreFlag = .false.
269  END IF ! NINT(vals)
270  END IF ! defined
271 
272  IF ( defined(14) .EQV. .true. ) THEN
273  IF ( nint(vals(14)) == 1 ) THEN
274  global%postWriteMergeFlag = .true.
275  ELSE
276  global%postWriteMergeFlag = .false.
277  END IF ! NINT(vals)
278  END IF ! defined
279 
280  IF ( defined(15) .EQV. .true. ) THEN
281  IF ( nint(vals(15)) == 1 ) THEN
282  global%postCompErrFlag = .true.
283  ELSE
284  global%postCompErrFlag = .false.
285  END IF ! NINT(vals)
286  END IF ! defined
287 
288  IF ( defined(16) .EQV. .true. ) THEN
289  IF ( nint(vals(16)) == 1 ) THEN
290  global%postOutputFormat = post_output_format_tecplot
291  ELSE IF ( nint(vals(16)) == 2 ) THEN
292  global%postOutputFormat = post_output_format_ensight
293  END IF ! NINT(vals)
294  END IF ! defined
295 
296  IF ( defined(17) .EQV. .true. ) THEN
297  global%postNServers = nint(vals(17))
298  END IF ! defined
299 
300  IF ( defined(18) .EQV. .true. ) THEN
301  IF ( nint(vals(18)) == 1 ) THEN
302  global%postPlotPatchFlag = .true.
303  ELSE
304  global%postPlotPatchFlag = .false.
305  END IF ! NINT(vals)
306  END IF ! defined
307 
308  IF ( defined(19) .EQV. .true. ) THEN
309  IF ( nint(vals(19)) == 1 ) THEN
310  global%postLag2EulFlag = .true.
311  ELSE
312  global%postLag2EulFlag = .false.
313  END IF ! NINT(vals)
314  END IF ! defined
315 
316  IF ( defined(20) .EQV. .true. ) THEN
317  IF ( nint(vals(20)) == 1 ) THEN
318  global%postGradFlag = .true.
319  ELSE
320  global%postGradFlag = .false.
321  END IF ! NINT(vals)
322  END IF ! defined
323 #endif
324 
325 ! finalize
326 
327  CALL deregisterfunction(global)
328 
329 END SUBROUTINE readpostsection
330 
331 !******************************************************************************
332 !
333 ! RCS Revision history:
334 !
335 ! $Log: ReadPostSection.F90,v $
336 ! Revision 1.15 2008/12/06 08:44:09 mtcampbe
337 ! Updated license.
338 !
339 ! Revision 1.14 2008/11/19 22:17:23 mtcampbe
340 ! Added Illinois Open Source License/Copyright
341 !
342 ! Revision 1.13 2008/10/23 18:20:55 mtcampbe
343 ! Crazy number of changes to track and fix initialization and
344 ! restart bugs. Many improperly formed logical expressions
345 ! were fixed, and bug in allocation for data associated with
346 ! the BC_INFLOWVELTEMP boundary condition squashed in
347 ! RFLO_ReadBcInflowVelSection.F90.
348 !
349 ! Revision 1.12 2006/04/07 15:19:15 haselbac
350 ! Removed tabs
351 !
352 ! Revision 1.11 2006/01/06 22:04:37 haselbac
353 ! Added GRADFLAG
354 !
355 ! Revision 1.10 2005/12/10 23:27:33 haselbac
356 ! Removed pick variables
357 !
358 ! Revision 1.9 2005/12/10 16:53:36 haselbac
359 ! Added PEULFLAG
360 !
361 ! Revision 1.8 2005/10/28 19:16:05 haselbac
362 ! Added PLTPATFLAG
363 !
364 ! Revision 1.7 2005/10/05 20:01:06 haselbac
365 ! Modified for ENSIGHT
366 !
367 ! Revision 1.6 2005/08/10 00:29:36 haselbac
368 ! Added reading of COREFLAG
369 !
370 ! Revision 1.5 2005/08/09 00:53:01 haselbac
371 ! Added reading of WRIMERGE and ERRFLAG
372 !
373 ! Revision 1.4 2005/07/25 12:19:25 haselbac
374 ! Added vorticity flag, removed NINT
375 !
376 ! Revision 1.3 2005/07/05 19:25:12 haselbac
377 ! Added SCHTYPE and SCHEXP variables
378 !
379 ! Revision 1.2 2005/05/01 14:17:48 haselbac
380 ! Added capability of visualizing discontinuities
381 !
382 ! Revision 1.1 2004/12/01 16:50:39 haselbac
383 ! Initial revision after changing case
384 !
385 ! Revision 1.9 2004/10/27 18:04:15 haselbac
386 ! Changed flag name for extraction, must be no longer than 10 chars
387 !
388 ! Revision 1.8 2004/10/26 15:15:56 haselbac
389 ! Added setting of postExtractFlag
390 !
391 ! Revision 1.7 2004/07/24 03:43:57 wasistho
392 ! add rocflo options in readPostSection
393 !
394 ! Revision 1.6 2004/07/21 14:54:06 haselbac
395 ! Added postInterpType
396 !
397 ! Revision 1.5 2003/08/07 15:29:20 haselbac
398 ! Added and changed var names
399 !
400 ! Revision 1.4 2003/07/22 01:53:06 haselbac
401 ! Added postInterpOrder variable
402 !
403 ! Revision 1.3 2003/05/16 02:27:43 haselbac
404 ! Removed KIND=RFREAL from NINT statements
405 !
406 ! Revision 1.2 2003/05/05 18:38:41 haselbac
407 ! Added plotType, changed pltVolFlag to plotVolFlag under global
408 !
409 ! Revision 1.1 2003/04/29 14:55:48 haselbac
410 ! Initial revision
411 !
412 !******************************************************************************
413 
414 
415 
416 
417 
418 
419 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine readsection(global, fileID, nvals, keys, vals, defined)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE USE ModDataTypes USE nvals
subroutine deregisterfunction(global)
Definition: ModError.F90:469
subroutine readpostsection(global)