Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLU_ScalarInitRhs.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 residual for scalar variables.
26 !
27 ! Description: None.
28 !
29 ! Input:
30 ! pRegion Pointer to region data
31 ! nVarScal Number of scalar variables
32 ! dissScal Residual due to dissipative scalar fluxes
33 !
34 ! Output:
35 ! resScal Total residual of scalar fluxes
36 !
37 ! Notes: None.
38 !
39 !******************************************************************************
40 !
41 ! $Id: RFLU_ScalarInitRhs.F90,v 1.4 2008/12/06 08:44:13 mtcampbe Exp $
42 !
43 ! Copyright: (c) 2003 by the University of Illinois
44 !
45 !******************************************************************************
46 
47 SUBROUTINE rflu_scalarinitrhs(pRegion,nVarScal,dissScal,resScal)
48 
49  USE moddatatypes
50  USE modglobal, ONLY: t_global
51  USE moddatastruct, ONLY: t_region
52  USE modgrid, ONLY: t_grid
53  USE moderror
54  USE modparameters
55 
56  IMPLICIT NONE
57 
58 ! *****************************************************************************
59 ! Definitions and declarations
60 ! *****************************************************************************
61 
62 ! =============================================================================
63 ! Arguments
64 ! =============================================================================
65 
66  INTEGER, INTENT(IN) :: nvarscal
67  REAL(RFREAL), DIMENSION(:,:), INTENT(IN) :: dissscal
68  REAL(RFREAL), DIMENSION(:,:), INTENT(OUT) :: resscal
69  TYPE(t_region), POINTER :: pregion
70 
71 ! =============================================================================
72 ! Locals
73 ! =============================================================================
74 
75  CHARACTER(CHRLEN) :: rcsidentstring
76  INTEGER :: icg,ivarscal
77  TYPE(t_global), POINTER :: global
78  TYPE(t_grid), POINTER :: pgrid
79 
80 ! *****************************************************************************
81 ! Start
82 ! *****************************************************************************
83 
84  rcsidentstring = '$RCSfile: RFLU_ScalarInitRhs.F90,v $ $Revision: 1.4 $'
85 
86  global => pregion%global
87 
88  CALL registerfunction(global,'RFLU_ScalarInitRhs',&
89  'RFLU_ScalarInitRhs.F90')
90 
91 ! *****************************************************************************
92 ! Set dimensions and pointers
93 ! *****************************************************************************
94 
95  pgrid => pregion%grid
96 
97 ! *****************************************************************************
98 ! Initialize residual
99 ! *****************************************************************************
100 
101  DO icg = 1,pgrid%nCellsTot
102  DO ivarscal = 1,nvarscal
103  resscal(ivarscal,icg) = -dissscal(ivarscal,icg)
104  END DO ! iVarScal
105  END DO ! icg
106 
107 ! *****************************************************************************
108 ! End
109 ! *****************************************************************************
110 
111  CALL deregisterfunction(global)
112 
113 END SUBROUTINE rflu_scalarinitrhs
114 
115 !******************************************************************************
116 !
117 ! RCS Revision history:
118 !
119 ! $Log: RFLU_ScalarInitRhs.F90,v $
120 ! Revision 1.4 2008/12/06 08:44:13 mtcampbe
121 ! Updated license.
122 !
123 ! Revision 1.3 2008/11/19 22:17:26 mtcampbe
124 ! Added Illinois Open Source License/Copyright
125 !
126 ! Revision 1.2 2006/04/07 15:19:16 haselbac
127 ! Removed tabs
128 !
129 ! Revision 1.1 2003/11/25 21:02:58 haselbac
130 ! Initial revision
131 !
132 !******************************************************************************
133 
134 
135 
136 
137 
138 
139 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine rflu_scalarinitrhs(pRegion, nVarScal, dissScal, resScal)
subroutine deregisterfunction(global)
Definition: ModError.F90:469