Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BuildFileNameSteady.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 steady flow, that is, file name consisting of
26 ! directory, case name, extension, domain id, and iteration counter.
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 ! it Iteration counter
36 !
37 ! Output:
38 ! fileName File name
39 !
40 ! Notes: None.
41 !
42 !******************************************************************************
43 !
44 ! $Id: BuildFileNameSteady.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 buildfilenamesteady(global,dest,ext,id,it,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,it
75  TYPE(t_global), POINTER :: global
76 
77  CHARACTER(CHRLEN), INTENT(OUT) :: filename
78 
79 ! ******************************************************************************
80 ! Start
81 ! ******************************************************************************
82 
83  rcsidentstring = '$RCSfile: BuildFileNameSteady.F90,v $ $Revision: 1.4 $'
84 
85  CALL registerfunction(global,'BuildFileNameSteady',&
86  'BuildFileNameSteady.F90')
87 
88  IF ( dest == filedest_indir ) THEN
89  WRITE(deststring,'(A)') global%inDir
90  ELSE IF ( dest == filedest_outdir ) THEN
91  WRITE(deststring,'(A)') global%outDir
92  ELSE
93  CALL errorstop(global,err_filedest_invalid,__line__)
94  END IF ! dest
95 
96  WRITE(filename,'(A,A,I5.5,A,I6.6)') &
97  trim(deststring)//trim(global%caseName)//trim(ext),'_',id,'_',it
98 
99  CALL deregisterfunction(global)
100 
101 ! ******************************************************************************
102 ! End
103 ! ******************************************************************************
104 
105 END SUBROUTINE buildfilenamesteady
106 
107 
108 ! ******************************************************************************
109 !
110 ! RCS Revision history:
111 !
112 ! $Log: BuildFileNameSteady.F90,v $
113 ! Revision 1.4 2008/12/06 08:44:08 mtcampbe
114 ! Updated license.
115 !
116 ! Revision 1.3 2008/11/19 22:17:22 mtcampbe
117 ! Added Illinois Open Source License/Copyright
118 !
119 ! Revision 1.2 2006/04/07 15:19:15 haselbac
120 ! Removed tabs
121 !
122 ! Revision 1.1 2004/12/01 16:48:11 haselbac
123 ! Initial revision after changing case
124 !
125 ! Revision 1.1 2003/01/28 16:12:15 haselbac
126 ! Initial revision
127 !
128 ! ******************************************************************************
129 
130 
131 
132 
133 
134 
135 
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 buildfilenamesteady(global, dest, ext, id, it, fileName)