Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLU_WriteRestartInfo.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: Write iteration or time to restart info file.
26 !
27 ! Description: None.
28 !
29 ! Input:
30 ! global Pointer to global data
31 !
32 ! Output: None.
33 !
34 ! Notes:
35 ! 1. Only master process writes to file.
36 ! 2. Every time write to file, open and close it to make sure always have
37 ! latest data in file.
38 !
39 !******************************************************************************
40 !
41 ! $Id: RFLU_WriteRestartInfo.F90,v 1.4 2008/12/06 08:44:13 mtcampbe Exp $
42 !
43 ! Copyright: (c) 2003 by the University of Illinois
44 !
45 !******************************************************************************
46 
47 SUBROUTINE rflu_writerestartinfo(global)
48 
49  USE moddatatypes
50  USE modglobal, ONLY: t_global
51  USE modparameters
52  USE moderror
53  USE modmpi
54 
56 
57 ! *****************************************************************************
58 ! Declarations and definitions
59 ! *****************************************************************************
60 
61 ! =============================================================================
62 ! Arguments
63 ! =============================================================================
64 
65  TYPE(t_global), POINTER :: global
66 
67 ! =============================================================================
68 ! Locals
69 ! =============================================================================
70 
71  LOGICAL :: dummylogical
72  CHARACTER(CHRLEN) :: rcsidentstring
73 
74 ! *****************************************************************************
75 ! Start
76 ! *****************************************************************************
77 
78  rcsidentstring = '$RCSfile: RFLU_WriteRestartInfo.F90,v $ $Revision: 1.4 $'
79 
80  CALL registerfunction(global,'RFLU_WriteRestartInfo',&
81  'RFLU_WriteRestartInfo.F90')
82 
83 ! =============================================================================
84 ! Write restart info to file
85 ! =============================================================================
86 
87  IF ( global%myProcid == masterproc ) THEN
88  CALL rflu_openrestartinfo(global,file_position_end,dummylogical)
89 
90  IF ( global%flowType == flow_steady ) THEN
91  WRITE(if_restinfo,*) global%currentIter
92  ELSE
93  WRITE(if_restinfo,*) global%currentTime
94  END IF ! global%flowType
95 
96  CALL rflu_closerestartinfo(global)
97  END IF ! global%myProcid
98 
99 ! *****************************************************************************
100 ! End
101 ! *****************************************************************************
102 
103  CALL deregisterfunction(global)
104 
105 END SUBROUTINE rflu_writerestartinfo
106 
107 
108 !******************************************************************************
109 !
110 ! RCS Revision history:
111 !
112 ! $Log: RFLU_WriteRestartInfo.F90,v $
113 ! Revision 1.4 2008/12/06 08:44:13 mtcampbe
114 ! Updated license.
115 !
116 ! Revision 1.3 2008/11/19 22:17:26 mtcampbe
117 ! Added Illinois Open Source License/Copyright
118 !
119 ! Revision 1.2 2006/04/07 15:19:16 haselbac
120 ! Removed tabs
121 !
122 ! Revision 1.1 2003/06/20 22:32:30 haselbac
123 ! Initial revision
124 !
125 !******************************************************************************
126 
127 
128 
129 
130 
131 
132 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine rflu_openrestartinfo(global, filePosition, fileExists)
subroutine rflu_closerestartinfo(global)
subroutine deregisterfunction(global)
Definition: ModError.F90:469
subroutine rflu_writerestartinfo(global)