75 TYPE(t_region
) :: region
76 INTEGER,
INTENT(IN) ::
icbeg,
icend,istage,ivbeg,ivend,vartype
77 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: cv,cvold,
rhs,rhssum
84 CHARACTER(CHRLEN) :: rcsidentstring
89 REAL(RFREAL) :: adtv,fac,volrat
90 REAL(RFREAL) :: ark(5),grk(5)
91 REAL(RFREAL),
DIMENSION(:),
POINTER :: vol,volold
98 rcsidentstring =
'$RCSfile: RkUpdateGeneric.F90,v $ $Revision: 1.4 $'
100 global => region%global
103 'RkUpdateGeneric.F90')
109 ark(:) = region%mixtInput%ark(:)
110 grk(:) = region%mixtInput%grk(:)
116 IF ( vartype == var_type_cell )
THEN
117 movegrid = region%mixtInput%moveGrid
120 ilev = region%currLevel
122 vol => region%levels(ilev)%grid%vol
124 IF ( movegrid .EQV. .true. )
THEN
125 volold => region%levels(ilev)%gridOld%vol
130 vol => region%grid%vol
132 IF ( movegrid .EQV. .true. )
THEN
133 volold => region%gridOld%vol
142 fac = ark(istage)*global%dtMin
144 SELECT CASE ( vartype )
151 CASE ( var_type_cell )
157 IF ( movegrid .EQV. .true. )
THEN
158 SELECT CASE ( global%rkScheme )
159 CASE ( rk_scheme_4_classical )
160 IF ( istage == 1 )
THEN
163 volrat = volold(
ic)/vol(
ic)
166 cv(iv,
ic) = volrat*cvold(iv,
ic) - adtv*
rhs(iv,
ic)
170 ELSE IF ( istage == global%nrkSteps )
THEN
173 volrat = volold(
ic)/vol(
ic)
176 cv(iv,
ic) = volrat*cvold(iv,
ic) &
177 - adtv*(
rhs(iv,
ic)+rhssum(iv,
ic))
183 volrat = volold(
ic)/vol(
ic)
186 cv(iv,
ic) = volrat*cvold(iv,
ic) - adtv*
rhs(iv,
ic)
187 rhssum(iv,
ic) = rhssum(iv,
ic) + grk(istage)*
rhs(iv,
ic)
191 CASE ( rk_scheme_3_wray )
192 IF ( istage == 1 )
THEN
195 volrat = volold(
ic)/vol(
ic)
198 cv(iv,
ic) = volrat*cvold(iv,
ic) - adtv*
rhs(iv,
ic)
202 ELSE IF ( istage == 2 )
THEN
205 volrat = volold(
ic)/vol(
ic)
208 cv(iv,
ic) = volrat*cvold(iv,
ic) &
209 - adtv*(
rhs(iv,
ic) - grk(istage)*rhssum(iv,
ic))
216 volrat = volold(
ic)/vol(
ic)
219 cv(iv,
ic) = volrat*cvold(iv,
ic) &
220 - adtv*(
rhs(iv,
ic) - grk(istage)*rhssum(iv,
ic))
225 CALL
errorstop(global,err_reached_default,__line__)
233 SELECT CASE ( global%rkScheme )
234 CASE ( rk_scheme_4_classical )
235 IF ( istage == 1 )
THEN
240 cv(iv,
ic) = cvold(iv,
ic) - adtv*
rhs(iv,
ic)
244 ELSE IF ( istage == global%nrkSteps )
THEN
249 cv(iv,
ic) = cvold(iv,
ic) - adtv*(
rhs(iv,
ic) + rhssum(iv,
ic))
257 cv(iv,
ic) = cvold(iv,
ic) - adtv*
rhs(iv,
ic)
258 rhssum(iv,
ic) = rhssum(iv,
ic) + grk(istage)*
rhs(iv,
ic)
262 CASE ( rk_scheme_3_wray )
263 IF ( istage == 1 )
THEN
268 cv(iv,
ic) = cvold(iv,
ic) - adtv*
rhs(iv,
ic)
272 ELSE IF ( istage == 2 )
THEN
277 cv(iv,
ic) = cvold(iv,
ic) &
278 - adtv*(
rhs(iv,
ic) - grk(istage)*rhssum(iv,
ic))
287 cv(iv,
ic) = cvold(iv,
ic) &
288 - adtv*(
rhs(iv,
ic) - grk(istage)*rhssum(iv,
ic))
293 CALL
errorstop(global,err_reached_default,__line__)
302 CASE ( var_type_point )
305 SELECT CASE ( global%rkScheme )
306 CASE ( rk_scheme_4_classical )
307 IF ( istage == 1 )
THEN
310 cv(iv,
ic) = cvold(iv,
ic) - adtv*
rhs(iv,
ic)
314 ELSE IF ( istage == global%nrkSteps )
THEN
317 cv(iv,
ic) = cvold(iv,
ic) - adtv*(
rhs(iv,
ic) + rhssum(iv,
ic))
323 cv(iv,
ic) = cvold(iv,
ic) - adtv*
rhs(iv,
ic)
324 rhssum(iv,
ic) = rhssum(iv,
ic) + grk(istage)*
rhs(iv,
ic)
328 CASE ( rk_scheme_3_wray )
329 IF ( istage == 1 )
THEN
332 cv(iv,
ic) = cvold(iv,
ic) - adtv*
rhs(iv,
ic)
336 ELSE IF ( istage == 2 )
THEN
339 cv(iv,
ic) = cvold(iv,
ic) &
340 - adtv*(
rhs(iv,
ic) - grk(istage)*rhssum(iv,
ic))
347 cv(iv,
ic) = cvold(iv,
ic) &
348 - adtv*(
rhs(iv,
ic) - grk(istage)*rhssum(iv,
ic))
353 CALL
errorstop(global,err_reached_default,__line__)
356 CALL
errorstop(global,err_reached_default,__line__)
subroutine registerfunction(global, funName, fileName)
**********************************************************************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 ic
subroutine rkupdategeneric(region, varType, iStage, icBeg, icEnd, ivBeg, ivEnd, cv, cvOld, rhs, rhsSum)
**********************************************************************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 icbeg
**********************************************************************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 icend
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)