Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLU_UpdateBoundaryValues.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: Update boundary values.
26 !
27 ! Description: None.
28 !
29 ! Input:
30 ! region Data of current region
31 ! istage Current RK stage
32 !
33 ! Output:
34 ! None.
35 !
36 ! Notes: None.
37 !
38 ! ******************************************************************************
39 !
40 ! $Id: RFLU_UpdateBoundaryValues.F90,v 1.6 2008/12/06 08:44:30 mtcampbe Exp $
41 !
42 ! Copyright: (c) 2003-2005 by the University of Illinois
43 !
44 ! ******************************************************************************
45 
46 SUBROUTINE rflu_updateboundaryvalues(region,istage)
47 
48  USE moddatatypes
49  USE moddatastruct, ONLY: t_region
50  USE modglobal, ONLY: t_global
51  USE moderror
52  USE modmpi
53  USE modparameters
54 
55 #ifdef GENX
58  updatetbc
59 #endif
60 
61  IMPLICIT NONE
62 
63 #ifdef GENX
64  include 'roccomf90.h'
65 #endif
66 
67 ! ******************************************************************************
68 ! Definitions and declarations
69 ! ******************************************************************************
70 
71 ! ==============================================================================
72 ! Arguments
73 ! ==============================================================================
74 
75  INTEGER :: istage
76  TYPE(t_region) :: region
77 
78 ! ==============================================================================
79 ! Locals
80 ! ==============================================================================
81 
82  CHARACTER(CHRLEN) :: rcsidentstring
83  REAL(RFREAL) :: subdt,time
84  REAL(RFREAL) :: trk(5)
85  TYPE(t_global), POINTER :: global
86 
87 #ifdef GENX
88  DOUBLE PRECISION :: alpha
89 #endif
90 
91 ! ******************************************************************************
92 ! Start
93 ! ******************************************************************************
94 
95  rcsidentstring = '$RCSfile: RFLU_UpdateBoundaryValues.F90,v $ $Revision: 1.6 $'
96 
97  global => region%global
98 
99  CALL registerfunction(global,'RFLU_UpdateBoundaryValues',&
100  'RFLU_UpdateBoundaryValues.F90')
101 
102  trk(:) = region%mixtInput%trk(:)
103 
104 ! ******************************************************************************
105 ! Compute time
106 ! ******************************************************************************
107 
108  time = global%currentTime + global%dtMin*trk(istage)
109 
110 #ifdef GENX
111 ! ******************************************************************************
112 ! Fill incoming buffers
113 ! ******************************************************************************
114 
115  alpha = (time-global%timeStamp)/global%dTimeSystem
116 
117  CALL com_call_function(global%genxHandleBc,2,alpha,1)
118  CALL rflu_putboundaryvaluesalpha(region)
119  CALL com_call_function(global%genxHandleBc,2,alpha,2)
120  CALL rflu_getboundaryvalues(region)
121 #endif
122 
123 ! ******************************************************************************
124 ! Fill in time-dependent boundary condition data
125 ! ******************************************************************************
126 
127  IF ( istage > 1 ) THEN
128  subdt = global%dtMin*(trk(istage) - trk(istage-1))
129  ELSE
130  subdt = 0.0_rfreal
131  END IF ! istage
132 
133  CALL updatetbc(region,time,subdt,istage==global%nrkSteps)
134 
135 ! ******************************************************************************
136 ! End
137 ! ******************************************************************************
138 
139  CALL deregisterfunction(global)
140 
141 END SUBROUTINE rflu_updateboundaryvalues
142 
143 ! ******************************************************************************
144 !
145 ! RCS Revision history:
146 !
147 ! $Log: RFLU_UpdateBoundaryValues.F90,v $
148 ! Revision 1.6 2008/12/06 08:44:30 mtcampbe
149 ! Updated license.
150 !
151 ! Revision 1.5 2008/11/19 22:17:43 mtcampbe
152 ! Added Illinois Open Source License/Copyright
153 !
154 ! Revision 1.4 2005/04/15 15:07:28 haselbac
155 ! Removed Charm/FEM stuff, cosmetics
156 !
157 ! Revision 1.3 2004/01/22 16:04:34 haselbac
158 ! Changed declaration to eliminate warning on ALC
159 !
160 ! Revision 1.2 2003/11/25 21:07:44 haselbac
161 ! Temporarily disable UpdateTbc - leads to core dump
162 !
163 ! Revision 1.1 2003/10/03 20:48:52 haselbac
164 ! Initial revision
165 !
166 ! ******************************************************************************
167 
168 
169 
170 
171 
172 
173 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine rflu_putboundaryvaluesalpha(region)
subroutine updatetbc(region, t, dt, final)
Definition: UpdateTbc.F90:43
subroutine rflu_updateboundaryvalues(region, istage)
subroutine rflu_getboundaryvalues(region)
unsigned char alpha() const
Definition: Color.h:75
subroutine deregisterfunction(global)
Definition: ModError.F90:469