Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TFLU_WriteFluCellMap.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 cell-mapping file for Rocflu run.
26 !
27 ! Description: none.
28 !
29 ! Notes: none.
30 !
31 ! ******************************************************************************
32 !
33 ! $Id $
34 !
35 ! Copyright: (c) 2004 by the University of Illinois
36 !
37 ! ******************************************************************************
38 
39 SUBROUTINE writeflucellmap( global )
40 
41  USE modparameters
42  USE moddatatypes
43  USE moderror
44  USE modglobal, ONLY: t_global
45  USE modmpi
46 
47  IMPLICIT NONE
48 
49 ! ... parameters
50  TYPE(t_global), POINTER :: global
51 
52 ! ... loop variables
53  INTEGER :: j
54 
55 ! ... local variables
56  CHARACTER(CHRLEN) :: ifilename, sectionstring
57 
58  INTEGER :: errorflag, ifile, ntets, npris, npyrs
59 
60 ! ******************************************************************************
61 
62  CALL registerfunction(global,'WriteFluCellMap',&
63  'TFLU_WriteFluCellMap.F90')
64 
65 ! start ------------------------------------------------------------------------
66 
67  IF ( global%verbLevel > verbose_none ) THEN
68  WRITE(stdout,'(A,1X,A)') solver_name,'Writing Rocflu cell-mapping file...'
69  END IF
70 
71  ifile = if_dims
72 
73  WRITE(ifilename,'(A,I5.5)') &
74  trim(global%outDir)//trim(global%casename)//'.cmp_',0
75 
76  OPEN(ifile,file=ifilename,form="FORMATTED",status="UNKNOWN",iostat=errorflag)
77  global%error = errorflag
78 
79  IF ( global%error /= err_none ) THEN
80  CALL errorstop(global,err_file_open,__line__,ifilename)
81  END IF ! global%error
82 
83 ! header and general information -----------------------------------------------
84 
85  IF ( global%verbLevel > verbose_low ) THEN
86  WRITE(stdout,'(A,3X,A)') solver_name,'Header information...'
87  END IF ! global%verbLevel
88 
89  sectionstring = '# ROCFLU cell mapping file'
90  WRITE(ifile,'(A)') trim(sectionstring)
91 
92  ntets = 0
93  npris = 0
94  npyrs = 0
95  sectionstring = '# Dimensions'
96  WRITE(ifile,'(A)') trim(sectionstring)
97  WRITE(ifile,'(4(I8))') ntets,global%tofluNHexs,npris,npyrs
98 
99  sectionstring = '# Hexahedra'
100  WRITE(ifile,'(A)') trim(sectionstring)
101  WRITE(ifile,'(10(I8))') (j,j=1,global%tofluNHexs)
102 
103 ! end marker -------------------------------------------------------------------
104 
105  IF ( global%verbLevel > verbose_low ) THEN
106  WRITE(stdout,'(A,3X,A)') solver_name,'End marker...'
107  END IF
108 
109  sectionstring = '# End'
110  WRITE(ifile,'(A)') trim(sectionstring)
111 
112 ! close file -------------------------------------------------------------------
113 
114  CLOSE(ifile,iostat=errorflag)
115  global%error = errorflag
116  IF ( global%error /= err_none ) THEN
117  CALL errorstop(global,err_file_close,__line__,ifilename)
118  END IF
119 
120  IF ( global%verbLevel > verbose_none ) THEN
121  WRITE(stdout,'(A,1X,A)') solver_name,'Writing Rocflu cell-mapping file done.'
122  END IF
123 
124 ! finalize ---------------------------------------------------------------------
125 
126  CALL deregisterfunction( global )
127 
128 END SUBROUTINE writeflucellmap
129 
130 ! ******************************************************************************
131 !
132 ! RCS Revision history:
133 !
134 ! $Log: TFLU_WriteFluCellMap.F90,v $
135 ! Revision 1.3 2008/12/06 08:44:53 mtcampbe
136 ! Updated license.
137 !
138 ! Revision 1.2 2008/11/19 22:18:04 mtcampbe
139 ! Added Illinois Open Source License/Copyright
140 !
141 ! Revision 1.1 2005/12/21 22:39:03 wasistho
142 ! initial import
143 !
144 !
145 ! ******************************************************************************
146 
147 
148 
149 
150 
151 
152 
subroutine writeflucellmap(global)
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
int status() const
Obtain the status of the attribute.
Definition: Attribute.h:240
**********************************************************************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
j indices j
Definition: Indexing.h:6
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine deregisterfunction(global)
Definition: ModError.F90:469