Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ModDataStruct.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: define the overall data structure related to regions
26 ! and to grid levels.
27 !
28 ! Description: none
29 !
30 ! Notes: none
31 !
32 !******************************************************************************
33 !
34 ! $Id: ModDataStruct.F90,v 1.61 2008/12/06 08:44:18 mtcampbe Exp $
35 !
36 ! Copyright: (c) 2001 by the University of Illinois
37 !
38 !******************************************************************************
39 
41 
42  USE moddatatypes
43  USE modparameters
44  USE modrandom, ONLY : t_rand_data
45  USE modbndpatch, ONLY : t_patch
46  USE modglobal, ONLY : t_global
47  USE modgrid, ONLY : t_grid
48  USE modinteract, ONLY : t_inrt_input
49  USE modmixture, ONLY : t_mixt, t_mixt_input
50 
51 #ifdef RFLO
52 #ifdef RADI
53  USE modradiation, ONLY : t_radi, t_radi_input
54 #endif
55 #ifdef PLAG
56  USE modpartlag, ONLY : t_plag, t_plag_input
57  USE modpartlag, ONLY : t_buffer_plag
58 #endif
59 #ifdef SPEC
60 ! USE ModSpecies, ONLY : t_spec, t_spec_input
61 #endif
62 #ifdef PEUL
63  USE modparteul, ONLY : t_peul, t_peul_input
64 #endif
65 #ifdef TURB
66  USE modturbulence, ONLY : t_turb, t_turb_input
67 #endif
68 #ifdef PERI
69  USE modperiodic, ONLY : t_peri, t_peri_input
70 #endif
71 #endif
72 
73 #ifdef RFLU
75  USE modpartlag, ONLY: t_plag,t_plag_input
76  USE modpartlag, ONLY: t_buffer_plag
77  USE modplotting, ONLY: t_plot
78  USE modspecies, ONLY: t_spec,t_spec_input
81 #endif
82 
83 #ifdef PETSC
84 
85 #include "include/finclude/petsc.h"
86 #include "include/finclude/petscvec.h"
87 #include "include/finclude/petscmat.h"
88 #include "include/finclude/petscsnes.h"
89 #include "include/finclude/petscis.h"
90 #include "include/finclude/petscao.h"
91 
92 #endif
93 
94  IMPLICIT NONE
95 
96 #ifdef RFLO
97 
98 ! edge & corner cells
99 
100  TYPE t_dcellsrc
101  LOGICAL :: rotate
102  INTEGER :: srcregion, srccell
103  INTEGER :: srcindexmapmat(3,4)
104 #ifdef PLAG
105  TYPE(t_buffer_plag) :: bufferexchplag
106 #endif
107  END TYPE t_dcellsrc
108 
109  TYPE t_dcell
110  LOGICAL :: interact
111  INTEGER :: degenrt, intertype
112  TYPE(t_dcellsrc), POINTER :: cells(:)
113  END TYPE t_dcell
114 
115  TYPE t_dcelltransf
116  INTEGER :: ncells, irequest
117  REAL(RFREAL), POINTER :: buff(:)
118  INTEGER :: irequestmetrics
119  REAL(RFREAL), POINTER :: buffmetrics(:)
120 #ifdef PLAG
121  INTEGER :: nbuffsizeplag, irequestplag
122  INTEGER, POINTER :: buffplagi(:)
123  REAL(RFREAL), POINTER :: buffplagr(:)
124 #endif
125  END TYPE t_dcelltransf
126 
127 ! grid level related data
128 
129  TYPE t_level
130  REAL(RFREAL), POINTER :: dt(:)
131 
132  TYPE(t_grid) :: grid, gridold, gridold2
133  TYPE(t_mixt) :: mixt
134 #ifdef TURB
135  TYPE(t_turb) :: turb
136 #endif
137 #ifdef SPEC
138 ! TYPE(t_spec) :: spec
139 #endif
140 #ifdef RADI
141  TYPE(t_radi) :: radi
142 #endif
143 #ifdef PEUL
144  TYPE(t_peul) :: peul
145 #endif
146 #ifdef PLAG
147  TYPE(t_plag) :: plag, plagtemp
148 #endif
149 #ifdef PERI
150  TYPE(t_peri) :: peri
151 #endif
152 
153  TYPE(t_patch), POINTER :: patches(:)
154 
155  TYPE(t_dcell) :: edgecells(12), cornercells(8)
156  TYPE(t_dcelltransf), POINTER :: sendeccells(:), recveccells(:)
157 #ifdef RADI
158  TYPE(t_dcelltransf), POINTER :: sndradieccells(:), rcvradieccells(:)
159 #endif
160 #ifdef TURB
161  TYPE(t_dcelltransf), POINTER :: sndturbeccells(:), rcvturbeccells(:)
162 #endif
163 #ifdef PEUL
164  TYPE(t_dcelltransf), POINTER :: sndpeuleccells(:), rcvpeuleccells(:)
165 #endif
166  END TYPE t_level
167 
168 ! region related data
169 
170  TYPE t_region
171  INTEGER :: localnumber, active, procid, iregionglobal
172  INTEGER :: ndumcells, nedgecells, npatches, ngridlevels
173  INTEGER :: startlevel, currlevel, irkstep
174  INTEGER :: blockshape
175  INTEGER :: dimwork1d, dimwork2d(2)
176 
177  REAL(RFREAL), POINTER :: work1d(:), work2d(:,:)
178 
179  TYPE(t_rand_data) :: randdata
180 
181  TYPE(t_mixt_input) :: mixtinput
182 #ifdef TURB
183  TYPE(t_turb_input) :: turbinput
184 #endif
185 #ifdef SPEC
186 ! TYPE(t_spec_input) :: specInput
187 #endif
188 #ifdef PEUL
189  TYPE(t_peul_input) :: peulinput
190 #ifndef PLAG
191  TYPE(t_inrt_input), POINTER :: inrtinput
192 #endif
193 #endif
194 #ifdef PLAG
195  TYPE(t_plag_input) :: plaginput
196  TYPE(t_inrt_input), POINTER :: inrtinput
197 #endif
198 #ifdef RADI
199  TYPE(t_radi_input) :: radiinput
200 #endif
201 #ifdef PERI
202  TYPE(t_peri_input) :: periinput
203 #endif
204  TYPE(t_level), POINTER :: levels(:)
205  TYPE(t_global), POINTER :: global
206 
207  END TYPE t_region
208 #endif
209 
210 ! *****************************************************************************
211 
212 #ifdef RFLU
213 
214 ! region-related data
215 
216  TYPE t_region
217  LOGICAL :: postactiveflag
218  LOGICAL, DIMENSION(:), POINTER :: thrustflagsglobal
219  INTEGER :: dtminloc,iregionglobal,irkstep
220  INTEGER :: fieldflagcoord,fieldflaggmdisp,fieldflaggmrhs,fieldflagmixt, &
221  fieldflagspec
222  INTEGER :: dimwork1d, dimwork2d(2)
223 
224  REAL(RFREAL):: dtmin
225  REAL(RFREAL), DIMENSION(:), POINTER :: dt
226  REAL(RFREAL), DIMENSION(:,:), POINTER :: masscoeffsglobal, &
227  specimpulseglobal, &
228  specimpulsevacglobal, &
229  thrustglobal, &
230  thrustvacglobal
231  REAL(RFREAL), DIMENSION(:,:,:), POINTER :: forcecoeffsglobal, &
232  forcevaccoeffsglobal, &
233  momentcoeffsglobal
234 
235  TYPE(t_rand_data) :: randdata
236 
237  TYPE(t_grid) :: grid,gridold,gridold2
238  TYPE(t_mixt) :: mixt
239  TYPE(t_turb) :: turb
240  TYPE(t_spec) :: spec
241  TYPE(t_radi) :: radi
242 ! TYPE(t_peul) :: peul
243  TYPE(t_peri) :: peri
244  TYPE(t_plag) :: plag,plagtemp
245  TYPE(t_plot) :: plot
246 
247  TYPE(t_patch), DIMENSION(:), POINTER :: patches
248  TYPE(t_global), POINTER :: global
249  TYPE(t_region), POINTER :: pregion
250 
251  TYPE(t_mixt_input) :: mixtinput
252  TYPE(t_turb_input) :: turbinput
253  TYPE(t_spec_input) :: specinput
254 ! TYPE(t_peul_input) :: peulInput
255  TYPE(t_plag_input) :: plaginput
256  TYPE(t_radi_input) :: radiinput
257  TYPE(t_peri_input) :: periinput
258  TYPE(t_inrt_input), POINTER :: inrtinput
259 
260 #ifndef NO_TECPLOT
261  REAL(RFREAL), DIMENSION(:,:), POINTER :: varcelltec,varverttec
262 #endif
263 
264 ! TEMPORARY
265 ! PetscFortranAddr :: poissonInfoPETSc(RFLU_PETSC_POISSON_INFO_BEG: &
266 ! RFLU_PETSC_POISSON_INFO_END)
267 ! END TEMPORARY
268 
269 #ifdef PETSC
270  vec :: x, r
271  mat :: a, prea
272  snes :: snes
273  matfdcoloring :: fdcolor
274  ao :: ao
275 #endif
276 
277  END TYPE t_region
278 
279 ! level-related data
280 
281  TYPE t_level
282  TYPE(t_region), DIMENSION(:), POINTER :: regions
283  END TYPE t_level
284 
285  TYPE(t_level), DIMENSION(:), ALLOCATABLE :: levels
286 #endif
287 
288 END MODULE moddatastruct
289 
290 !******************************************************************************
291 !
292 ! RCS Revision history:
293 !
294 ! $Log: ModDataStruct.F90,v $
295 ! Revision 1.61 2008/12/06 08:44:18 mtcampbe
296 ! Updated license.
297 !
298 ! Revision 1.60 2008/11/19 22:17:29 mtcampbe
299 ! Added Illinois Open Source License/Copyright
300 !
301 ! Revision 1.59 2007/03/19 21:46:49 haselbac
302 ! Added t_plot, cosmetics
303 !
304 ! Revision 1.58 2006/10/21 04:15:21 mparmar
305 ! Rearranged variables
306 !
307 ! Revision 1.57 2006/10/20 21:29:04 mparmar
308 ! Added Global thrustFlags, forceVac, massCoeffs, specImpulse, specImpulseVac, thrust, thrustVac
309 !
310 ! Revision 1.56 2006/03/04 04:32:52 wasistho
311 ! added blockShape in rocflo data structure
312 !
313 ! Revision 1.55 2006/02/15 21:06:39 wasistho
314 ! defined inrt_input in peul if not plag
315 !
316 ! Revision 1.54 2006/02/13 21:50:48 wasistho
317 ! added ifdefs for phys modules in RFLO
318 !
319 ! Revision 1.53 2006/02/08 21:01:58 hdewey2
320 ! Added gridOld2
321 !
322 ! Revision 1.52 2005/08/17 20:15:26 hdewey2
323 ! Added PETSc Application Ordering context
324 !
325 ! Revision 1.51 2005/08/02 18:16:07 hdewey2
326 ! Added PETSc variables, uncommented PETSC include statements
327 !
328 ! Revision 1.50 2005/06/29 22:49:33 wasistho
329 ! added interType in dCell type
330 !
331 ! Revision 1.49 2005/01/13 21:47:19 haselbac
332 ! Comment out changes for now - lead to compilation error
333 !
334 ! Revision 1.48 2005/01/13 21:41:36 haselbac
335 ! Bug fix: Different declaration for PETSc info variables
336 !
337 ! Revision 1.47 2004/12/19 15:43:44 haselbac
338 ! Added poissonInfoPETSc
339 !
340 ! Revision 1.46 2004/09/27 22:29:37 wasistho
341 ! added sndRadiEcCells and rcvRadiEcCells
342 !
343 ! Revision 1.45 2004/08/21 00:28:11 wasistho
344 ! added degenrt in edge/corner data structure
345 !
346 ! Revision 1.44 2004/07/28 18:54:00 fnajjar
347 ! Added plagTemp for dynamic memory reallocation
348 !
349 ! Revision 1.43 2004/07/23 22:43:16 jferry
350 ! Integrated rocspecies into rocinteract
351 !
352 ! Revision 1.42 2004/06/16 20:00:48 haselbac
353 ! Added force coefficients and Tecplot variables
354 !
355 ! Revision 1.41 2004/03/10 23:08:34 fnajjar
356 ! Added infrastructure for MPI corner-edge cells
357 !
358 ! Revision 1.40 2004/03/02 21:44:05 jferry
359 ! Added corner and edge cell data structures and routines
360 !
361 ! Revision 1.39 2004/02/10 21:21:16 fnajjar
362 ! Added index mapping matrix for proper geometry transform
363 !
364 ! Revision 1.38 2004/01/31 03:57:21 haselbac
365 ! Changed instance of t_plag in RFLU, clean-up
366 !
367 ! Revision 1.37 2004/01/23 00:30:54 wasistho
368 ! added turb. edge/corners data structures under type t_level
369 !
370 ! Revision 1.36 2004/01/15 21:08:42 fnajjar
371 ! Included datastructure for corner-edge cells metrics
372 !
373 ! Revision 1.35 2003/11/25 21:03:08 haselbac
374 ! Added fieldFlagSpec for rocspecies support
375 !
376 ! Revision 1.34 2003/11/12 21:17:49 fnajjar
377 ! Included Corner-Edge Cells Infrastructure for PLAG
378 !
379 ! Revision 1.33 2003/10/15 02:40:49 haselbac
380 ! Added dtMinLoc and dtMin as members of region
381 !
382 ! Revision 1.32 2003/10/01 23:52:10 jblazek
383 ! Corrected bug in moving noslip wall BC and grid speeds.
384 !
385 ! Revision 1.31 2003/08/07 15:31:40 haselbac
386 ! Changed var name
387 !
388 ! Revision 1.30 2003/07/22 02:00:05 haselbac
389 ! Added pRegion
390 !
391 ! Revision 1.29 2003/06/04 22:05:17 haselbac
392 ! Added activeFlag
393 !
394 ! Revision 1.28 2003/03/31 16:13:17 haselbac
395 ! Added fieldFlagGmDisp
396 !
397 ! Revision 1.27 2003/03/29 03:27:10 wasistho
398 ! install ROCPERI
399 !
400 ! Revision 1.26 2003/03/15 17:41:40 haselbac
401 ! Added field flags for gm communication
402 !
403 ! Revision 1.25 2003/03/04 22:12:34 jferry
404 ! Initial import of Rocinteract
405 !
406 ! Revision 1.24 2003/02/18 14:57:31 jferry
407 ! Implemented portable random number generator ModRandom
408 !
409 ! Revision 1.23 2003/02/14 22:32:36 jblazek
410 ! Finished implementation of corener and edge cells.
411 !
412 ! Revision 1.22 2003/02/05 21:07:30 jblazek
413 ! Coordinated stop of a run works now for MPI.
414 !
415 ! Revision 1.21 2003/02/03 19:20:47 jblazek
416 ! Added treatment of edge and corner cells for one processor.
417 !
418 ! Revision 1.20 2002/10/25 14:03:17 f-najjar
419 ! Redefine plag without POINTER description as single-class Lagrangian
420 ! particles are considered
421 !
422 ! Revision 1.19 2002/09/27 00:57:09 jblazek
423 ! Changed makefiles - no makelinks needed.
424 !
425 ! Revision 1.18 2002/09/17 22:51:23 jferry
426 ! Removed Fast Eulerian particle type
427 !
428 ! Revision 1.17 2002/09/09 14:51:42 haselbac
429 ! Input types now under regions
430 !
431 ! Revision 1.16 2002/09/05 17:40:20 jblazek
432 ! Variable global moved into regions().
433 !
434 ! Revision 1.15 2002/08/30 19:08:58 jblazek
435 ! Dimensions of work arrays now set in derivedInputValues.
436 !
437 ! Revision 1.14 2002/06/27 15:53:25 haselbac
438 ! Added fieldFlagMixt for communication
439 !
440 ! Revision 1.13 2002/05/04 16:56:21 haselbac
441 ! Added dt and irkStep for RFLU
442 !
443 ! Revision 1.12 2002/03/01 16:39:45 haselbac
444 ! Deleted old regions, changed domains to regions
445 !
446 ! Revision 1.11 2002/02/21 23:25:05 jblazek
447 ! Blocks renamed as regions.
448 !
449 ! Revision 1.10 2002/02/08 15:05:29 haselbac
450 ! Added iDomainGlobal variable
451 !
452 ! Revision 1.9 2002/02/01 00:00:24 jblazek
453 ! Edge and corner cells defined for each level.
454 !
455 ! Revision 1.8 2002/01/31 20:23:59 jblazek
456 ! Added treatment of edge & corner cells.
457 !
458 ! Revision 1.7 2002/01/28 23:55:22 jblazek
459 ! Added flux computation (central scheme).
460 !
461 ! Revision 1.6 2002/01/23 03:51:24 jblazek
462 ! Added low-level time-stepping routines.
463 !
464 ! Revision 1.5 2002/01/11 17:20:19 jblazek
465 ! Added time stamp or iteration number to file names.
466 !
467 ! Revision 1.4 2002/01/08 22:09:16 jblazek
468 ! Added calculation of face vectors and volumes.
469 !
470 ! Revision 1.3 2002/01/02 16:20:19 jblazek
471 ! Added flow initialization and dummy cell geometry.
472 !
473 ! Revision 1.2 2001/12/21 23:01:38 haselbac
474 ! Added ROCFLU data types
475 !
476 ! Revision 1.1.1.1 2001/12/03 21:44:05 jblazek
477 ! Import of RocfluidMP
478 !
479 !******************************************************************************
480 
481 
482 
483 
484 
485 
unsigned char r() const
Definition: Color.h:68
void int int REAL * x
Definition: read.cpp:74
subroutine grid(bp)
Definition: setup_py.f90:257
CImg< T > & rotate(const float angle, const unsigned int border_conditions=3, const unsigned int interpolation=1)
Rotate an image.
Definition: CImg.h:17637
RT a() const
Definition: Line_2.h:140