Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLO_OpenConverFile.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: open file for convergence history.
26 !
27 ! Description: none.
28 !
29 ! Input: global = case name, steady/unsteady flow.
30 !
31 ! Output: to file.
32 !
33 ! Notes: none.
34 !
35 !******************************************************************************
36 !
37 ! $Id: RFLO_OpenConverFile.F90,v 1.3 2008/12/06 08:44:27 mtcampbe Exp $
38 !
39 ! Copyright: (c) 2001 by the University of Illinois
40 !
41 !******************************************************************************
42 
43 SUBROUTINE rflo_openconverfile( global )
44 
45  USE moddatatypes
46  USE moderror
47  USE modglobal, ONLY : t_global
48  USE modmpi
49  USE modparameters
50  IMPLICIT NONE
51 
52 ! ... parameters
53  TYPE(t_global), POINTER :: global
54 
55 ! ... local variables
56  CHARACTER(CHRLEN+4) :: fname
57 
58  INTEGER :: errorflag
59 
60 !******************************************************************************
61 
62  CALL registerfunction( global,'RFLO_OpenConverFile',&
63  'RFLO_OpenConverFile.F90' )
64 
65 ! open file
66 
67  IF (global%myProcid == masterproc) THEN
68  fname = trim(global%outDir)//trim(global%casename)//'.con'
69 
70 ! - append to existing file (restart) or create new file
71 
72  IF ((global%flowType==flow_unsteady .AND. global%currentTime>0._rfreal).OR.&
73  (global%flowType==flow_steady .AND. global%currentIter>1)) THEN
74  OPEN(if_conver,file=fname,form='formatted',status='old', &
75  position='append',iostat=errorflag)
76  ELSE
77  OPEN(if_conver,file=fname,form='formatted',status='unknown', &
78  iostat=errorflag)
79  ENDIF
80  global%error = errorflag
81  IF (global%error /= 0) &
82  CALL errorstop( global,err_file_open,__line__,'File: '//trim(fname) )
83  ENDIF
84 
85 ! finalize
86 
87  CALL deregisterfunction( global )
88 
89 END SUBROUTINE rflo_openconverfile
90 
91 !******************************************************************************
92 !
93 ! RCS Revision history:
94 !
95 ! $Log: RFLO_OpenConverFile.F90,v $
96 ! Revision 1.3 2008/12/06 08:44:27 mtcampbe
97 ! Updated license.
98 !
99 ! Revision 1.2 2008/11/19 22:17:38 mtcampbe
100 ! Added Illinois Open Source License/Copyright
101 !
102 ! Revision 1.1 2004/11/29 20:51:39 wasistho
103 ! lower to upper case
104 !
105 ! Revision 1.5 2003/05/15 02:57:04 jblazek
106 ! Inlined index function.
107 !
108 ! Revision 1.4 2002/10/12 03:20:50 jblazek
109 ! Replaced [io]stat=global%error with local errorFlag for Rocflo.
110 !
111 ! Revision 1.3 2002/09/20 22:22:36 jblazek
112 ! Finalized integration into GenX.
113 !
114 ! Revision 1.2 2002/09/05 17:40:21 jblazek
115 ! Variable global moved into regions().
116 !
117 ! Revision 1.1 2002/02/25 22:36:53 jblazek
118 ! Simplified solver initialization routine.
119 !
120 !******************************************************************************
121 
122 
123 
124 
125 
126 
127 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
int status() const
Obtain the status of the attribute.
Definition: Attribute.h:240
subroutine rflo_openconverfile(global)
**********************************************************************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 SUBROUTINE form
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine deregisterfunction(global)
Definition: ModError.F90:469