Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLU_CloseRestartInfo.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: Close restart info file.
26 !
27 ! Description: None.
28 !
29 ! Input:
30 ! global Pointer to global data
31 !
32 ! Output: None.
33 !
34 ! Notes: None.
35 !
36 ! ******************************************************************************
37 !
38 ! $Id: RFLU_CloseRestartInfo.F90,v 1.6 2008/12/06 08:44:12 mtcampbe Exp $
39 !
40 ! Copyright: (c) 2003 by the University of Illinois
41 !
42 ! ******************************************************************************
43 
44 SUBROUTINE rflu_closerestartinfo(global)
45 
46  USE moddatatypes
47  USE modglobal, ONLY: t_global
48  USE modparameters
49  USE moderror
50  USE modmpi
51 
53 
54 ! *****************************************************************************
55 ! Declarations and definitions
56 ! *****************************************************************************
57 
58 ! =============================================================================
59 ! Arguments
60 ! =============================================================================
61 
62  TYPE(t_global), POINTER :: global
63 
64 ! =============================================================================
65 ! Locals
66 ! =============================================================================
67 
68  CHARACTER(CHRLEN) :: ifilename,rcsidentstring
69  INTEGER :: errorflag
70 
71 ! *****************************************************************************
72 ! Start
73 ! *****************************************************************************
74 
75  rcsidentstring = '$RCSfile: RFLU_CloseRestartInfo.F90,v $ $Revision: 1.6 $'
76 
77  CALL registerfunction(global,'RFLU_CloseRestartInfo',&
78  'RFLU_CloseRestartInfo.F90')
79 
80  IF ( global%myProcid == masterproc .AND. &
81  global%verbLevel > verbose_low ) THEN
82  WRITE(stdout,'(A,1X,A)') solver_name,'Closing restart info file...'
83  END IF ! global%verbLevel
84 
85 ! =============================================================================
86 ! Close file
87 ! =============================================================================
88 
89  CALL buildfilenameplain(global,filedest_outdir,'.rin',ifilename)
90 
91  CLOSE(if_restinfo,iostat=errorflag)
92  global%error = errorflag
93  IF ( global%error /= 0 ) THEN
94  CALL errorstop(global,err_file_close,__line__,'File: '//trim(ifilename))
95  END IF ! global%error
96 
97 ! *****************************************************************************
98 ! End
99 ! *****************************************************************************
100 
101  IF ( global%myProcid == masterproc .AND. &
102  global%verbLevel > verbose_low ) THEN
103  WRITE(stdout,'(A,1X,A)') solver_name,'Closing restart info file done.'
104  END IF ! global%verbLevel
105 
106  CALL deregisterfunction(global)
107 
108 END SUBROUTINE rflu_closerestartinfo
109 
110 
111 ! ******************************************************************************
112 !
113 ! RCS Revision history:
114 !
115 ! $Log: RFLU_CloseRestartInfo.F90,v $
116 ! Revision 1.6 2008/12/06 08:44:12 mtcampbe
117 ! Updated license.
118 !
119 ! Revision 1.5 2008/11/19 22:17:25 mtcampbe
120 ! Added Illinois Open Source License/Copyright
121 !
122 ! Revision 1.4 2006/04/07 15:19:16 haselbac
123 ! Removed tabs
124 !
125 ! Revision 1.3 2004/06/16 20:00:16 haselbac
126 ! Added use of ModBuildFileNames, cosmetics
127 !
128 ! Revision 1.2 2003/08/20 02:09:58 haselbac
129 ! Changed verbosity conditions to reduce solver output in GENx runs
130 !
131 ! Revision 1.1 2003/06/20 22:32:30 haselbac
132 ! Initial revision
133 !
134 ! ******************************************************************************
135 
136 
137 
138 
139 
140 
141 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine buildfilenameplain(global, dest, ext, fileName)
subroutine rflu_closerestartinfo(global)
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine deregisterfunction(global)
Definition: ModError.F90:469