Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
WriteTotalMass.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: Write total mass and related info to file.
26 !
27 ! Description: None.
28 !
29 ! Input:
30 ! regions Region data
31 !
32 ! Output: None.
33 !
34 ! Notes: None.
35 !
36 !******************************************************************************
37 !
38 ! $Id: WriteTotalMass.F90,v 1.4 2008/12/06 08:44:11 mtcampbe Exp $
39 !
40 ! Copyright: (c) 2002 by the University of Illinois
41 !
42 !******************************************************************************
43 
44 SUBROUTINE writetotalmass(regions)
45 
46  USE moddatatypes
47  USE moderror
48  USE modglobal, ONLY: t_global
49  USE modmpi
50  USE modparameters
51  USE moddatastruct, ONLY: t_region
52  IMPLICIT NONE
53 
54 ! ... parameters
55 
56  TYPE(t_region), POINTER :: regions(:)
57 
58 ! ... local variables
59  TYPE(t_global), POINTER :: global
60 
61 !******************************************************************************
62 
63  global => regions(1)%global
64 
65  CALL registerfunction(global,'WriteTotalMass',&
66  'WriteTotalMass.F90')
67 
68 ! steady flow -----------------------------------------------------------------
69 
70  IF ( global%flowType == flow_steady .AND. &
71  global%myProcid == masterproc ) THEN
72  WRITE(if_mass,'(I6,4(1X,E23.16))') global%currentIter,global%totalMass, &
73  global%massIn,global%massOut, &
74  global%totalVol
75 
76 ! unsteady flow ---------------------------------------------------------------
77 
78  ELSE IF ( global%flowType == flow_unsteady .AND. &
79  global%myProcid == masterproc ) THEN
80  WRITE(if_mass,'(5(1X,E23.16))') global%currentTime,global%totalMass, &
81  global%massIn,global%massOut, &
82  global%totalVol
83  END IF ! global%flowType
84 
85 ! finalize --------------------------------------------------------------------
86 
87  CALL deregisterfunction(global)
88 
89 END SUBROUTINE writetotalmass
90 
91 !******************************************************************************
92 !
93 ! RCS Revision history:
94 !
95 ! $Log: WriteTotalMass.F90,v $
96 ! Revision 1.4 2008/12/06 08:44:11 mtcampbe
97 ! Updated license.
98 !
99 ! Revision 1.3 2008/11/19 22:17:24 mtcampbe
100 ! Added Illinois Open Source License/Copyright
101 !
102 ! Revision 1.2 2006/04/07 15:19:15 haselbac
103 ! Removed tabs
104 !
105 ! Revision 1.1 2004/12/01 16:52:30 haselbac
106 ! Initial revision after changing case
107 !
108 ! Revision 1.4 2003/05/15 02:57:02 jblazek
109 ! Inlined index function.
110 !
111 ! Revision 1.3 2002/11/15 21:29:33 haselbac
112 ! Deleted RFLU stuff (moved elsewhere), now only write
113 !
114 ! Revision 1.2 2002/11/15 14:09:25 haselbac
115 ! Changed output format
116 !
117 ! Revision 1.1 2002/11/08 21:55:48 haselbac
118 ! Initial revision
119 !
120 !******************************************************************************
121 
122 
123 
124 
125 
126 
127 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine writetotalmass(regions)
subroutine deregisterfunction(global)
Definition: ModError.F90:469