Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RkInitGeneric.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: Initialize Runge-Kutta scheme.
26 !
27 ! Description: None.
28 !
29 ! Input:
30 ! region Region data
31 ! iStage Runge-Kutta stage
32 ! icBeg Beginning index for cell update
33 ! icEnd Ending index for cell update
34 ! ivBeg Beginning index for variable update
35 ! ivEnd Ending index for variable update
36 ! cv Conserved variables
37 ! cvOld Old conserved variables
38 ! diss Dissipation residual
39 !
40 ! Output:
41 ! cvOld Old conserved variables
42 ! diss Dissipation residual
43 !
44 ! Notes: None.
45 !
46 !******************************************************************************
47 !
48 ! $Id: RkInitGeneric.F90,v 1.4 2008/12/06 08:44:10 mtcampbe Exp $
49 !
50 ! Copyright: (c) 2003 by the University of Illinois
51 !
52 !******************************************************************************
53 
54 SUBROUTINE rkinitgeneric(region,iStage,icBeg,icEnd,ivBeg,ivEnd,cv,cvOld,diss)
55 
56  USE moddatatypes
57  USE moddatastruct, ONLY: t_region
58  USE modglobal, ONLY: t_global
59  USE moderror
60  USE modparameters
61 
62  IMPLICIT NONE
63 
64 ! *****************************************************************************
65 ! Definitions and declarations
66 ! *****************************************************************************
67 
68 ! =============================================================================
69 ! Arguments
70 ! =============================================================================
71 
72  INTEGER, INTENT(IN) :: icbeg,icend,istage,ivbeg,ivend
73  REAL(RFREAL), DIMENSION(:,:), POINTER :: cv,cvold,diss
74  TYPE(t_region) :: region
75 
76 ! =============================================================================
77 ! Locals
78 ! =============================================================================
79 
80  CHARACTER(CHRLEN) :: rcsidentstring
81  INTEGER :: ic,iv
82  TYPE(t_global), POINTER :: global
83 
84 ! *****************************************************************************
85 ! Start
86 ! *****************************************************************************
87 
88  rcsidentstring = '$RCSfile: RkInitGeneric.F90,v $ $Revision: 1.4 $'
89 
90  global => region%global
91 
92  CALL registerfunction(global,'RkInitGeneric',&
93  'RkInitGeneric.F90')
94 
95 ! *****************************************************************************
96 ! Initialize Runge-Kutta scheme
97 ! *****************************************************************************
98 
99  SELECT CASE ( global%rkScheme )
100  CASE ( rk_scheme_4_classical )
101  IF ( istage == 1 ) THEN
102  DO ic = icbeg,icend
103  DO iv = ivbeg,ivend
104  cvold(iv,ic) = cv(iv,ic)
105  diss(iv,ic) = 0.0_rfreal
106  END DO ! iv
107  END DO ! ic
108  ELSE
109  DO ic = icbeg,icend
110  DO iv = ivbeg,ivend
111  diss(iv,ic) = 0.0_rfreal
112  END DO ! iv
113  END DO ! ic
114  END IF ! iStage
115  CASE ( rk_scheme_3_wray )
116  DO ic = icbeg,icend
117  DO iv = ivbeg,ivend
118  cvold(iv,ic) = cv(iv,ic)
119  diss(iv,ic) = 0.0_rfreal
120  END DO ! iv
121  END DO ! ic
122  CASE default
123  CALL errorstop(global,err_reached_default,__line__)
124  END SELECT ! global%rkScheme
125 
126 ! *****************************************************************************
127 ! End
128 ! *****************************************************************************
129 
130  CALL deregisterfunction(global)
131 
132 END SUBROUTINE rkinitgeneric
133 
134 !******************************************************************************
135 !
136 ! RCS Revision history:
137 !
138 ! $Log: RkInitGeneric.F90,v $
139 ! Revision 1.4 2008/12/06 08:44:10 mtcampbe
140 ! Updated license.
141 !
142 ! Revision 1.3 2008/11/19 22:17:23 mtcampbe
143 ! Added Illinois Open Source License/Copyright
144 !
145 ! Revision 1.2 2006/04/07 15:19:15 haselbac
146 ! Removed tabs
147 !
148 ! Revision 1.1 2004/12/01 16:51:02 haselbac
149 ! Initial revision after changing case
150 !
151 ! Revision 1.2 2004/11/17 16:23:40 haselbac
152 ! Added initialization for RK3
153 !
154 ! Revision 1.1 2003/11/25 21:01:50 haselbac
155 ! Initial revision
156 !
157 !******************************************************************************
158 
159 
160 
161 
162 
163 
164 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
**********************************************************************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
**********************************************************************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)
Definition: ModError.F90:483
subroutine rkinitgeneric(region, iStage, icBeg, icEnd, ivBeg, ivEnd, cv, cvOld, diss)
subroutine deregisterfunction(global)
Definition: ModError.F90:469