Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RADI_InitGenxInterface.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: register radiation variables with GenX.
26 !
27 ! Description: none.
28 !
29 ! Input: regions = region (volume) variables
30 !
31 ! Output: to Roccom via RFLO_initGenxInterface.
32 !
33 ! Notes: none.
34 !
35 !******************************************************************************
36 !
37 ! $Id: RADI_InitGenxInterface.F90,v 1.3 2008/12/06 08:44:00 mtcampbe Exp $
38 !
39 ! Copyright: (c) 2002 by the University of Illinois
40 !
41 !******************************************************************************
42 
43 SUBROUTINE radi_initgenxinterface( regions,wins,winv )
44 
45  USE moddatatypes
46  USE modglobal, ONLY : t_global
47 #ifdef RFLO
48  USE moddatastruct, ONLY : t_region
50 #include "Indexing.h"
51 #endif
52  USE moderror
53  USE modparameters
54  IMPLICIT NONE
55  include 'roccomf90.h'
56 
57 ! ... parameters
58  CHARACTER(CHRLEN) :: wins, winv
59  TYPE(t_region), POINTER :: regions(:)
60 
61 ! ... loop variables
62  INTEGER :: ireg, ipatch
63 
64 ! ... local variables
65  INTEGER :: ilev, ibc, iec, pid, icount, errorflag, ilb
66  INTEGER :: icoff, ijcoff, idcbeg, idcend, jdcbeg, jdcend, kdcbeg, kdcend
67 
68  TYPE(t_global), POINTER :: global
69 
70 !******************************************************************************
71 
72  global => regions(1)%global
73 
74  CALL registerfunction( global,'RADI_InitGenxInterface',&
75  'RADI_InitGenxInterface.F90' )
76 
77 ! input data (currently none) -------------------------------------------------
78 
79 ! output volume (for visualization) and/or restart data (currently none) ------
80 
81  CALL com_new_attribute( trim(winv)//'.xcof','e',com_double,1,'1/m')
82 
83 ! store pointers to variables, loop over all regions --------------------------
84 
85  DO ireg=1,global%nRegions
86  IF (regions(ireg)%procid==global%myProcid .AND. & ! region active and
87  regions(ireg)%active==active) THEN ! on my processor
88 
89  ilev = regions(ireg)%currLevel
90  icount = 0
91 
92 ! --- volume data
93 
94  pid = ireg*regoff
95 
96  CALL rflo_getdimensdummy( regions(ireg),ilev,idcbeg,idcend, &
97  jdcbeg,jdcend,kdcbeg,kdcend )
98  CALL rflo_getcelloffset( regions(ireg),ilev,icoff,ijcoff )
99  ibc = indijk(idcbeg,jdcbeg,kdcbeg,icoff,ijcoff)
100  iec = indijk(idcend,jdcend,kdcend,icoff,ijcoff)
101 
102  IF (.NOT.regions(ireg)%mixtInput%radiUsed) THEN
103  ALLOCATE( regions(ireg)%levels(ilev)%radi%radCoef(ibc:iec,2), &
104  stat=errorflag )
105  global%error = errorflag
106  IF (global%error /= 0) CALL errorstop( global,err_allocate,__line__ )
107  ENDIF
108 
109  regions(ireg)%levels(ilev)%radi%radCoef = 0._rfreal
110 
111  CALL com_set_array( trim(winv)//'.xcof',pid, &
112  regions(ireg)%levels(ilev)%radi%radCoef )
113 
114  ENDIF ! region on this processor and active
115  ENDDO ! iReg
116 
117 ! finalize --------------------------------------------------------------------
118 
119  CALL deregisterfunction( global )
120 
121 END SUBROUTINE radi_initgenxinterface
122 
123 !******************************************************************************
124 !
125 ! RCS Revision history:
126 !
127 ! $Log: RADI_InitGenxInterface.F90,v $
128 ! Revision 1.3 2008/12/06 08:44:00 mtcampbe
129 ! Updated license.
130 !
131 ! Revision 1.2 2008/11/19 22:17:14 mtcampbe
132 ! Added Illinois Open Source License/Copyright
133 !
134 ! Revision 1.1 2004/12/01 21:23:46 haselbac
135 ! Initial revision after changing case
136 !
137 ! Revision 1.8 2004/06/30 04:05:43 wasistho
138 ! moved Genx related parameter REGOFF to ModParameters
139 !
140 ! Revision 1.7 2004/06/29 23:53:15 wasistho
141 ! migrated to Roccom-3
142 !
143 ! Revision 1.6 2003/11/20 16:40:33 mdbrandy
144 ! Backing out RocfluidMP changes from 11-17-03
145 !
146 ! Revision 1.3 2003/09/10 21:11:37 jblazek
147 ! Setting variables to zero.
148 !
149 ! Revision 1.2 2003/08/14 20:06:58 jblazek
150 ! Corrected bug associated with radiation flux qr.
151 !
152 ! Revision 1.1 2003/08/09 02:09:26 wasistho
153 ! added TURB and RADI_initGenxInterface
154 !
155 !******************************************************************************
156 
157 
158 
159 
160 
161 
162 
**********************************************************************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 idcend
subroutine radi_initgenxinterface(regions, wins, winv)
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine rflo_getdimensdummy(region, iLev, idcbeg, idcend, jdcbeg, jdcend, kdcbeg, kdcend)
**********************************************************************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 kdcbeg
subroutine rflo_getcelloffset(region, iLev, iCellOffset, ijCellOffset)
**********************************************************************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 idcbeg
**********************************************************************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 jdcend
**********************************************************************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 jdcbeg
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine deregisterfunction(global)
Definition: ModError.F90:469