Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RkInitPointScalar.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 particle velocity computations.
26 !
27 ! Description: None.
28 !
29 ! Input:
30 ! region Region data
31 ! iStage Runge-Kutta stage
32 ! ivBeg Beginning index for variable update
33 ! ivEnd Ending index for variable update
34 ! var Conserved variables
35 ! varOld Old variables
36 !
37 ! Output:
38 ! varOld Old variables
39 !
40 ! Notes: None.
41 !
42 !******************************************************************************
43 !
44 ! $Id: RkInitPointScalar.F90,v 1.3 2008/12/06 08:44:10 mtcampbe Exp $
45 !
46 ! Copyright: (c) 2005 by the University of Illinois
47 !
48 ! ******************************************************************************
49 
50 SUBROUTINE rkinitpointscalar(region,iStage,ivBeg,ivEnd,var,varOld)
51 
52  USE moddatatypes
53  USE moddatastruct, ONLY: t_region
54  USE modglobal, ONLY: t_global
55  USE moderror
56  USE modparameters
57 
58  IMPLICIT NONE
59 
60 ! *****************************************************************************
61 ! Definitions and declarations
62 ! *****************************************************************************
63 
64 ! =============================================================================
65 ! Arguments
66 ! =============================================================================
67 
68  INTEGER, INTENT(IN) :: istage,ivbeg,ivend
69  REAL(RFREAL), DIMENSION(:), POINTER :: var,varold
70  TYPE(t_region) :: region
71 
72 ! =============================================================================
73 ! Locals
74 ! =============================================================================
75 
76  CHARACTER(CHRLEN) :: rcsidentstring
77  INTEGER :: iv
78  TYPE(t_global), POINTER :: global
79 
80 ! *****************************************************************************
81 ! Start
82 ! *****************************************************************************
83 
84  global => region%global
85 
86  CALL registerfunction(global,'RkInitPointScalar',&
87  'RkInitPointScalar.F90')
88 
89 ! *****************************************************************************
90 ! Initialize Runge-Kutta scheme
91 ! *****************************************************************************
92 
93  SELECT CASE ( global%rkScheme )
94  CASE ( rk_scheme_4_classical )
95  IF ( istage == 1 ) THEN
96  DO iv = ivbeg,ivend
97  varold(iv) = var(iv)
98  END DO ! iv
99  END IF ! iStage
100  CASE ( rk_scheme_3_wray )
101  DO iv = ivbeg,ivend
102  varold(iv) = var(iv)
103  END DO ! iv
104  CASE default
105  CALL errorstop(global,err_reached_default,__line__)
106  END SELECT ! global%rkScheme
107 
108 ! *****************************************************************************
109 ! End
110 ! *****************************************************************************
111 
112  CALL deregisterfunction(global)
113 
114 END SUBROUTINE rkinitpointscalar
115 
116 ! ******************************************************************************
117 !
118 ! RCS Revision history:
119 !
120 ! $Log: RkInitPointScalar.F90,v $
121 ! Revision 1.3 2008/12/06 08:44:10 mtcampbe
122 ! Updated license.
123 !
124 ! Revision 1.2 2008/11/19 22:17:23 mtcampbe
125 ! Added Illinois Open Source License/Copyright
126 !
127 ! Revision 1.1 2006/08/19 15:37:30 mparmar
128 ! Initial revision
129 !
130 ! ******************************************************************************
131 
132 
133 
134 
135 
136 
137 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine rkinitpointscalar(region, iStage, ivBeg, ivEnd, var, varOld)
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine deregisterfunction(global)
Definition: ModError.F90:469