Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ZeroResidualsMP.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: Set residuals to zero.
26 !
27 ! Description: None.
28 !
29 ! Input:
30 ! region Data of current region.
31 !
32 ! Output: None.
33 !
34 ! Notes: None.
35 !
36 !******************************************************************************
37 !
38 ! $Id: ZeroResidualsMP.F90,v 1.3 2008/12/06 08:44:11 mtcampbe Exp $
39 !
40 ! Copyright: (c) 2003 by the University of Illinois
41 !
42 !******************************************************************************
43 
44 SUBROUTINE zeroresidualsmp(region)
45 
46  USE moddatatypes
47  USE moderror
48  USE modparameters
49  USE moddatastruct, ONLY: t_region
50  USE modglobal, ONLY: t_global
51 
52  IMPLICIT NONE
53 
54 ! ******************************************************************************
55 ! Definitions and declarations
56 ! ******************************************************************************
57 
58 ! ==============================================================================
59 ! Arguments
60 ! ==============================================================================
61 
62  TYPE(t_region), TARGET :: region
63 
64 ! ==============================================================================
65 ! Locals
66 ! ==============================================================================
67 
68  INTEGER :: ivar
69  TYPE(t_global), POINTER :: global
70 
71 ! ******************************************************************************
72 ! Start
73 ! ******************************************************************************
74 
75  global => region%global
76 
77  CALL registerfunction(global,'ZeroResidualsMP',&
78  'ZeroResidualsMP.F90')
79 
80 ! ******************************************************************************
81 ! Zero residuals
82 ! ******************************************************************************
83 
84 #ifdef SPEC
85 ! ==============================================================================
86 ! Species
87 ! ==============================================================================
88 
89  IF ( global%specUsed .EQV. .true. ) THEN
90  DO ivar = 1,region%specInput%nSpecies
91  IF ( region%specInput%specType(ivar)%frozenFlag .EQV. .true. ) THEN
92  region%spec%rhs(ivar,:) = 0.0_rfreal
93  END IF ! region%specInput%specType
94  END DO ! iVar
95  END IF ! global%specUsed
96 #endif
97 
98 ! ******************************************************************************
99 ! End
100 ! ******************************************************************************
101 
102  CALL deregisterfunction( global )
103 
104 END SUBROUTINE zeroresidualsmp
105 
106 !******************************************************************************
107 !
108 ! RCS Revision history:
109 !
110 ! $Log: ZeroResidualsMP.F90,v $
111 ! Revision 1.3 2008/12/06 08:44:11 mtcampbe
112 ! Updated license.
113 !
114 ! Revision 1.2 2008/11/19 22:17:24 mtcampbe
115 ! Added Illinois Open Source License/Copyright
116 !
117 ! Revision 1.1 2004/12/01 16:52:35 haselbac
118 ! Initial revision after changing case
119 !
120 ! Revision 1.3 2004/12/01 00:06:31 wasistho
121 ! added StatBuildVersionString
122 !
123 ! Revision 1.2 2004/07/28 15:29:18 jferry
124 ! created global variable for spec use
125 !
126 ! Revision 1.1 2003/11/25 21:01:50 haselbac
127 ! Initial revision
128 !
129 !******************************************************************************
130 
131 
132 
133 
134 
135 
136 
subroutine zeroresidualsmp(region)
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine deregisterfunction(global)
Definition: ModError.F90:469