Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BuildFileNameUnsteady.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: Build file name for unsteady flow, that is, file name consisting of
26 ! directory, case name, extension, domain id, and time stamp.
27 !
28 ! Description: None.
29 !
30 ! Input:
31 ! global Global pointer
32 ! dest Integer parameter indicating destination directory
33 ! ext Extension (including ".")
34 ! id Region index
35 ! tm Time stamp
36 !
37 ! Output:
38 ! fileName File name
39 !
40 ! Notes: None.
41 !
42 !******************************************************************************
43 !
44 ! $Id: BuildFileNameUnsteady.F90,v 1.4 2008/12/06 08:44:08 mtcampbe Exp $
45 !
46 ! Copyright: (c) 2003 by the University of Illinois
47 !
48 !******************************************************************************
49 
50 SUBROUTINE buildfilenameunsteady(global,dest,ext,id,tm,fileName)
51 
52  USE modglobal, ONLY: t_global
53  USE moddatatypes
54  USE modparameters
55  USE moderror
56 
57  IMPLICIT NONE
58 
59 ! ******************************************************************************
60 ! Declarations and definitions
61 ! ******************************************************************************
62 
63 ! ==============================================================================
64 ! Local variables
65 ! ==============================================================================
66 
67  CHARACTER(CHRLEN) :: deststring,rcsidentstring
68 
69 ! ==============================================================================
70 ! Arguments
71 ! ==============================================================================
72 
73  CHARACTER(*), INTENT(IN) :: ext
74  INTEGER, INTENT(IN) :: dest,id
75  REAL(RFREAL), INTENT(IN) :: tm
76  TYPE(t_global), POINTER :: global
77 
78  CHARACTER(CHRLEN), INTENT(OUT) :: filename
79 
80 ! ******************************************************************************
81 ! Start
82 ! ******************************************************************************
83 
84  rcsidentstring = '$RCSfile: BuildFileNameUnsteady.F90,v $ $Revision: 1.4 $'
85 
86  CALL registerfunction(global,'BuildFileNameUnsteady',&
87  'BuildFileNameUnsteady.F90')
88 
89  IF ( dest == filedest_indir ) THEN
90  WRITE(deststring,'(A)') global%inDir
91  ELSE IF ( dest == filedest_outdir ) THEN
92  WRITE(deststring,'(A)') global%outDir
93  ELSE
94  CALL errorstop(global,err_filedest_invalid,__line__)
95  END IF ! dest
96 
97  WRITE(filename,'(A,A,I5.5,A,1PE11.5)') &
98  trim(deststring)//trim(global%caseName)//trim(ext),'_',id,'_',tm
99 
100  CALL deregisterfunction(global)
101 
102 ! ******************************************************************************
103 ! End
104 ! ******************************************************************************
105 
106 END SUBROUTINE buildfilenameunsteady
107 
108 
109 ! ******************************************************************************
110 !
111 ! RCS Revision history:
112 !
113 ! $Log: BuildFileNameUnsteady.F90,v $
114 ! Revision 1.4 2008/12/06 08:44:08 mtcampbe
115 ! Updated license.
116 !
117 ! Revision 1.3 2008/11/19 22:17:22 mtcampbe
118 ! Added Illinois Open Source License/Copyright
119 !
120 ! Revision 1.2 2006/04/07 15:19:15 haselbac
121 ! Removed tabs
122 !
123 ! Revision 1.1 2004/12/01 16:48:14 haselbac
124 ! Initial revision after changing case
125 !
126 ! Revision 1.1 2003/01/28 16:12:15 haselbac
127 ! Initial revision
128 !
129 ! ******************************************************************************
130 
131 
132 
133 
134 
135 
136 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
unsigned long id(const Leda_like_handle &x)
Definition: Handle.h:107
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine deregisterfunction(global)
Definition: ModError.F90:469
subroutine buildfilenameunsteady(global, dest, ext, id, tm, fileName)