Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PLAG_ZeroRhs.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: zero out residuals.
26 !
27 ! Description: none.
28 !
29 ! Input: region = current region.
30 !
31 ! Output: region%levels%plag%rhs
32 !
33 ! Notes: none.
34 !
35 !******************************************************************************
36 !
37 ! $Id: PLAG_ZeroRhs.F90,v 1.3 2008/12/06 08:44:36 mtcampbe Exp $
38 !
39 ! Copyright: (c) 2002 by the University of Illinois
40 !
41 !******************************************************************************
42 
43 SUBROUTINE plag_zerorhs( region )
44 
45  USE moddatatypes
46  USE moddatastruct, ONLY : t_region
47  USE modglobal, ONLY : t_global
48  USE modpartlag, ONLY : t_plag, t_plag_input
49  USE modmixture, ONLY : t_mixt_input
50  USE moderror
51  USE modparameters
53  IMPLICIT NONE
54 
55 ! ... parameters
56  TYPE(t_region), INTENT(INOUT), TARGET :: region
57 
58 ! ... loop variables
59  INTEGER :: icont, ipcls
60 
61 ! ... local variables
62  CHARACTER(CHRLEN) :: rcsidentstring
63 
64 #ifdef RFLO
65  INTEGER :: ilev
66 #endif
67  INTEGER :: ncont, npcls
68 
69  REAL(RFREAL), POINTER, DIMENSION(:,:) :: prhs
70 
71  TYPE(t_plag), POINTER :: pplag
72  TYPE(t_global), POINTER :: global
73 
74 !******************************************************************************
75 
76  rcsidentstring = '$RCSfile: PLAG_ZeroRhs.F90,v $ $Revision: 1.3 $'
77 
78  global => region%global
79 
80  CALL registerfunction( global, 'PLAG_ZeroRhs',&
81  'PLAG_ZeroRhs.F90' )
82 
83 ! Get dimensions --------------------------------------------------------------
84 
85 #ifdef RFLO
86  ilev = region%currLevel
87  npcls = region%levels(ilev)%plag%nPcls
88 #endif
89 #ifdef RFLU
90  npcls = region%plag%nPcls
91 #endif
92  ncont = region%plagInput%nCont
93 
94 ! Set pointers ----------------------------------------------------------------
95 
96 #ifdef RFLO
97  pplag => region%levels(ilev)%plag
98 #endif
99 #ifdef RFLU
100  pplag => region%plag
101 #endif
102 
103  prhs => pplag%rhs
104 
105 ! Zero out residuals ----------------------------------------------------------
106 
107  DO ipcls = 1, npcls
108  prhs(:,ipcls) = 0.0_rfreal
109  END DO ! iPcls
110 
111 ! finalize --------------------------------------------------------------------
112 
113  CALL deregisterfunction( global )
114 
115 END SUBROUTINE plag_zerorhs
116 
117 !******************************************************************************
118 !
119 ! RCS Revision history:
120 !
121 ! $Log: PLAG_ZeroRhs.F90,v $
122 ! Revision 1.3 2008/12/06 08:44:36 mtcampbe
123 ! Updated license.
124 !
125 ! Revision 1.2 2008/11/19 22:17:48 mtcampbe
126 ! Added Illinois Open Source License/Copyright
127 !
128 ! Revision 1.1 2004/12/01 20:58:23 fnajjar
129 ! Initial revision after changing case
130 !
131 ! Revision 1.4 2004/03/25 21:16:43 jferry
132 ! fixed Vapor Energy bug
133 !
134 ! Revision 1.3 2004/02/06 21:18:20 fnajjar
135 ! Initial Integration of Rocpart with Rocflu
136 !
137 ! Revision 1.2 2003/01/16 20:27:58 f-najjar
138 ! Removed iRegionGlobal
139 !
140 ! Revision 1.1 2002/10/25 14:20:32 f-najjar
141 ! Initial Import of Rocpart
142 !
143 !******************************************************************************
144 
145 
146 
147 
148 
149 
150 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine deregisterfunction(global)
Definition: ModError.F90:469
subroutine plag_zerorhs(region)