Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLU_ReadIntegrals1245OLES.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: Read optimal LES integrals in ASCII ROCFLU format.
26 !
27 ! Description: None.
28 !
29 ! Input:
30 ! pRegion Pointer to region
31 !
32 ! Output: None.
33 !
34 ! Notes:
35 ! 1. No checking of section strings.
36 !
37 !******************************************************************************
38 !
39 ! $Id: RFLU_ReadIntegrals1245OLES.F90,v 1.6 2008/12/06 08:44:30 mtcampbe Exp $
40 !
41 ! Copyright: (c) 2001 by the University of Illinois
42 !
43 !******************************************************************************
44 
45 SUBROUTINE rflu_readintegrals1245oles(pRegion)
46 
47  USE modglobal, ONLY: t_global
48  USE moddatatypes
49  USE modparameters
50  USE moderror
51  USE modbndpatch, ONLY: t_patch
52  USE modgrid, ONLY: t_grid
53  USE moddatastruct, ONLY: t_region
54  USE modmpi
55 
56  USE rflu_modoles
57 
58  IMPLICIT NONE
59 
60 ! ******************************************************************************
61 ! Declarations and definitions
62 ! ******************************************************************************
63 
64 ! ==============================================================================
65 ! Local variables
66 ! ==============================================================================
67 
68  INTEGER :: errorflag,hloc,i,ic1l,ic2l,ic3l,ic4l,icmp,ifcp,ifile,ifun,j,k,l, &
69  m,ncells,vloc
70  CHARACTER(CHRLEN) :: ifilename,sectionstring,rcsidentstring
71  TYPE(t_grid), POINTER :: pgrid
72  TYPE(t_global), POINTER :: global
73 
74 ! ==============================================================================
75 ! Arguments
76 ! ==============================================================================
77 
78  TYPE(t_region), POINTER :: pregion
79 
80 ! ******************************************************************************
81 ! Start, set pointer
82 ! ******************************************************************************
83 
84  rcsidentstring = '$RCSfile: RFLU_ReadIntegrals1245OLES.F90,v $ $Revision: 1.6 $'
85 
86  pgrid => pregion%grid
87 
88 ! ******************************************************************************
89 ! Open file
90 ! ******************************************************************************
91 
92  global => pregion%global
93 
94  CALL registerfunction(global,'RFLU_ReadIntegrals1245OLES',&
95  'RFLU_ReadIntegrals1245OLES.F90')
96 
97  ncells = SIZE(pgrid%fsOLES,1)
98 
99  IF ( global%myProcid == masterproc .AND. &
100  global%verbLevel > verbose_none ) THEN
101  WRITE(stdout,'(A)') solver_name
102  WRITE(stdout,'(A,1X,A)') solver_name,'Reading optimal LES integrals...'
103  END IF ! global%verbLevel
104 
105  WRITE(ifilename,'(A,I1)') trim(global%inDir)// &
106  trim(global%casename)//'.int_',ncells
107 
108  ifile = if_integ_oles
109  OPEN(ifile,file=ifilename,form="FORMATTED",status="OLD", &
110  iostat=errorflag)
111  global%error = errorflag
112  IF ( global%error /= err_none ) THEN
113  CALL errorstop(global,err_file_open,__line__,ifilename)
114  END IF ! global%error
115 
116 ! ==============================================================================
117 ! Integral 1
118 ! ==============================================================================
119 
120  IF ( global%myProcid == masterproc .AND. &
121  global%verbLevel > verbose_low ) THEN
122  WRITE(stdout,'(A,3X,A)') solver_name,'Integral 1...'
123  END IF ! global%verbLevel
124 
125  READ(ifile,'(A)') sectionstring
126 
127 ! DO icmp = 1,3
128 ! DO ifcp = 1,3
129 ! DO i = 1,3*nCells
130 ! READ(iFile,'(E15.6)') pGrid%int1OLES(icmp,ifcp,i)
131 ! END DO ! i
132 ! END DO ! ifcp
133 ! END DO ! icmp
134 
135  DO ifcp = 1,3
136  DO ic1l = 1,ncells
137  DO ifun = 1,9
138  CALL rflu_mapk2ij(ifun,l,i)
139  vloc = rflu_geti1posoles(l,ic1l)
140 
141  READ(ifile,'(E15.6)') pgrid%int1OLES(i,ifcp,vloc)
142  END DO ! iFun
143  END DO ! ic1l
144  END DO ! ifcp
145 
146 ! ==============================================================================
147 ! Integral 2
148 ! ==============================================================================
149 
150  IF ( global%myProcid == masterproc .AND. &
151  global%verbLevel > verbose_low ) THEN
152  WRITE(stdout,'(A,3X,A)') solver_name,'Integral 2...'
153  END IF ! global%verbLevel
154 
155  READ(ifile,'(A)') sectionstring
156 
157 ! DO ifcp = 1,3
158 ! DO i = 1,3*nCells
159 ! DO j = 1,3*nCells
160 ! READ(iFile,'(2(E15.6,1X))') pGrid%int20OLES(ifcp,i,j), &
161 ! pGrid%int21OLES(ifcp,i,j)
162 ! END DO ! j
163 ! END DO ! i
164 ! END DO ! ifcp
165 
166  DO ifcp = 1,3
167  DO ic1l = 1,ncells
168  DO ic2l = 1,ncells
169  DO ifun = 1,9
170  CALL rflu_mapk2ij(ifun,l,j)
171  vloc = rflu_geti1posoles(l,ic1l)
172  hloc = rflu_getlposoles(j,ic2l)
173 
174  READ(ifile,'(2(E15.6,1X))') pgrid%int20OLES(ifcp,vloc,hloc), &
175  pgrid%int21OLES(ifcp,vloc,hloc)
176  END DO ! iFun
177  END DO ! ic2l
178  END DO ! ic1l
179  END DO ! ifcp
180 
181 ! ==============================================================================
182 ! Integral 4
183 ! ==============================================================================
184 
185  IF ( global%myProcid == masterproc .AND. &
186  global%verbLevel > verbose_low ) THEN
187  WRITE(stdout,'(A,3X,A)') solver_name,'Integral 4...'
188  END IF ! global%verbLevel
189 
190  READ(ifile,'(A)') sectionstring
191 
192 ! DO icmp = 1,3
193 ! DO ifcp = 1,3
194 ! DO i = 1,9*nCells*nCells
195 ! READ(iFile,'(3(E15.6,1X))') pGrid%int40OLES(icmp,ifcp,i), &
196 ! pGrid%int41OLES(icmp,ifcp,i), &
197 ! pGrid%int42OLES(icmp,ifcp,i)
198 ! END DO ! i
199 ! END DO ! ifcp
200 ! END DO ! icmp
201 
202  DO ifcp = 1,3
203  DO ic1l = 1,ncells
204  DO ic2l = 1,ncells
205  DO ifun = 1,27
206  CALL rflu_mapl2ijk(ifun,l,m,i)
207  vloc = rflu_geti4posoles(l,m,ic1l,ic2l,ncells)
208 
209  READ(ifile,'(3(E15.6,1X))') pgrid%int40OLES(i,ifcp,vloc), &
210  pgrid%int41OLES(i,ifcp,vloc), &
211  pgrid%int42OLES(i,ifcp,vloc)
212  END DO ! iFun
213  END DO ! ic2l
214  END DO ! ic1l
215  END DO ! ifcp
216 
217 ! ==============================================================================
218 ! Integral 5
219 ! ==============================================================================
220 
221  IF ( global%myProcid == masterproc .AND. &
222  global%verbLevel > verbose_low ) THEN
223  WRITE(stdout,'(A,3X,A)') solver_name,'Integral 5...'
224  END IF ! global%verbLevel
225 
226  READ(ifile,'(A)') sectionstring
227 
228 ! DO ifcp = 1,3
229 ! DO i = 1,9*nCells*nCells
230 ! DO j = 1,9*nCells*nCells
231 ! READ(iFile,'(3(E15.6,1X))') pGrid%int50OLES(ifcp,i,j), &
232 ! pGrid%int51OLES(ifcp,i,j), &
233 ! pGrid%int52OLES(ifcp,i,j)
234 ! END DO ! j
235 ! END DO ! i
236 ! END DO ! ifcp
237 
238  DO ifcp = 1,3
239  DO ic1l = 1,ncells
240  DO ic2l = 1,ncells
241  DO ic3l = 1,ncells
242  DO ic4l = 1,ncells
243  DO ifun = 1,81
244  CALL rflu_mapm2ijkl(ifun,l,m,j,k)
245  vloc = rflu_getqposoles(j,k,ic3l,ic4l,ncells)
246  hloc = rflu_geti4posoles(l,m,ic1l,ic2l,ncells)
247 
248  READ(ifile,'(3(E15.6,1X))') pgrid%int50OLES(ifcp,vloc,hloc), &
249  pgrid%int51OLES(ifcp,vloc,hloc), &
250  pgrid%int52OLES(ifcp,vloc,hloc)
251  END DO ! iFun
252  END DO ! ic4l
253  END DO ! ic3l
254  END DO ! ic2l
255  END DO ! ic1l
256  END DO ! ifcp
257 
258 ! ==============================================================================
259 ! Close file
260 ! ==============================================================================
261 
262  CLOSE(ifile,iostat=errorflag)
263  global%error = errorflag
264  IF ( global%error /= err_none ) THEN
265  CALL errorstop(global,err_file_close,__line__,ifilename)
266  END IF ! global%error
267 
268  IF ( global%myProcid == masterproc .AND. &
269  global%verbLevel > verbose_none ) THEN
270  WRITE(stdout,'(A,1X,A)') solver_name,'Reading optimal LES integrals done.'
271  END IF ! global%verbLevel
272 
273  CALL deregisterfunction(global)
274 
275 ! ******************************************************************************
276 ! End
277 ! ******************************************************************************
278 
279 END SUBROUTINE rflu_readintegrals1245oles
280 
281 
282 ! ******************************************************************************
283 !
284 ! RCS Revision history:
285 !
286 ! $Log: RFLU_ReadIntegrals1245OLES.F90,v $
287 ! Revision 1.6 2008/12/06 08:44:30 mtcampbe
288 ! Updated license.
289 !
290 ! Revision 1.5 2008/11/19 22:17:43 mtcampbe
291 ! Added Illinois Open Source License/Copyright
292 !
293 ! Revision 1.4 2004/01/22 16:04:33 haselbac
294 ! Changed declaration to eliminate warning on ALC
295 !
296 ! Revision 1.3 2002/10/08 15:49:29 haselbac
297 ! {IO}STAT=global%error replaced by {IO}STAT=errorFlag - SGI problem
298 !
299 ! Revision 1.2 2002/10/05 19:30:30 haselbac
300 ! GENX integration: added outDir to file name
301 !
302 ! Revision 1.1 2002/09/09 16:28:02 haselbac
303 ! Initial revision
304 !
305 ! ******************************************************************************
306 
307 
308 
309 
310 
311 
312 
FT m(int i, int j) const
j indices k indices k
Definition: Indexing.h:6
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
int status() const
Obtain the status of the attribute.
Definition: Attribute.h:240
INTEGER function, public rflu_geti1posoles(l, d)
INTEGER function, public rflu_getlposoles(j, a)
subroutine, public rflu_mapk2ij(k, i, j)
blockLoc i
Definition: read.cpp:79
**********************************************************************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
subroutine, public rflu_mapm2ijkl(m, i, j, k, l)
INTEGER function, public rflu_geti4posoles(l, m, d, e, nCells)
j indices j
Definition: Indexing.h:6
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine, public rflu_mapl2ijk(l, i, j, k)
subroutine rflu_readintegrals1245oles(pRegion)
INTEGER function, public rflu_getqposoles(j, k, b, g, nCells)
subroutine deregisterfunction(global)
Definition: ModError.F90:469