Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
implicit_global.f90
Go to the documentation of this file.
1 !*********************************************************************
2 !* Illinois Open Source License *
3 !* *
4 !* University of Illinois/NCSA *
5 !* Open Source License *
6 !* *
7 !* Copyright@2008, University of Illinois. All rights reserved. *
8 !* *
9 !* Developed by: *
10 !* *
11 !* Center for Simulation of Advanced Rockets *
12 !* *
13 !* University of Illinois *
14 !* *
15 !* www.csar.uiuc.edu *
16 !* *
17 !* Permission is hereby granted, free of charge, to any person *
18 !* obtaining a copy of this software and associated documentation *
19 !* files (the "Software"), to deal with the Software without *
20 !* restriction, including without limitation the rights to use, *
21 !* copy, modify, merge, publish, distribute, sublicense, and/or *
22 !* sell copies of the Software, and to permit persons to whom the *
23 !* Software is furnished to do so, subject to the following *
24 !* conditions: *
25 !* *
26 !* *
27 !* @ Redistributions of source code must retain the above copyright *
28 !* notice, this list of conditions and the following disclaimers. *
29 !* *
30 !* @ Redistributions in binary form must reproduce the above *
31 !* copyright notice, this list of conditions and the following *
32 !* disclaimers in the documentation and/or other materials *
33 !* provided with the distribution. *
34 !* *
35 !* @ Neither the names of the Center for Simulation of Advanced *
36 !* Rockets, the University of Illinois, nor the names of its *
37 !* contributors may be used to endorse or promote products derived *
38 !* from this Software without specific prior written permission. *
39 !* *
40 !* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
41 !* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
42 !* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *
43 !* NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR *
44 !* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
45 !* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
46 !* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
47 !* USE OR OTHER DEALINGS WITH THE SOFTWARE. *
48 !*********************************************************************
49 !* Please acknowledge The University of Illinois Center for *
50 !* Simulation of Advanced Rockets in works and publications *
51 !* resulting from this software or its derivatives. *
52 !*********************************************************************
53 
54 !!****
55 !!
56 !! NAME
57 !! implicit_global
58 !!
59 !! FUNCTION
60 !! The variables within this module are used throughout the program.
61 !! Many of them are communications arrays initialized with InitComm1
62 !! and InitComm2. Others are local and global mappings and numbers
63 !! of nodes, which are both initialized when the mesh is read in.
64 !!
65 !! INPUTS
66 !! none
67 !!
68 !! OUTPUTS
69 !! none
70 !!
71 !! USES
72 !! none
73 !!
74 !!****
75 
77 
78  USE precision
79  USE rocstar_rocfrac
80 
81  IMPLICIT NONE
82 
83 !
84 ! Node Numbering
85 !
86  INTEGER :: LNumNp ! Number of local nodes
87  INTEGER :: GNumNp ! Number of global nodes
88  INTEGER, ALLOCATABLE, DIMENSION(:) :: Local2Global ! Local to global mapping of node numbers
89  INTEGER, ALLOCATABLE, DIMENSION(:) :: Global2Local ! Global to local mapping of node numbers
90 
91 !
92 ! Communication Constructs
93 !
94  INTEGER, ALLOCATABLE, DIMENSION(:) :: NodeProc ! Assignment of nodes to a processor
95  INTEGER :: NumCommProcs1, NumCommProcs2 ! Number of processors that must be communicated with
96  INTEGER, ALLOCATABLE, DIMENSION(:) :: CommProcs1, CommProcs2 ! Processors that must be communicated with
97  INTEGER, ALLOCATABLE, DIMENSION(:) :: NumCommNodes1, NumCommNodes2 ! Number of nodes that need to be communicated to a processor
98  INTEGER, ALLOCATABLE, DIMENSION(:,:) :: CommNodes1, CommNodes2 ! Nodes to be communicated to a processor
99  INTEGER :: MaxNumCommNodes1, MaxNumCommNodes2 ! Maximum number of nodes to be sent to a processor
100  INTEGER :: NumCommProcsFrom1, NumCommProcsFrom2 ! Number of procs to recieve data from
101  INTEGER, ALLOCATABLE, DIMENSION(:) :: CommProcsFrom1, CommProcsFrom2 ! Procs to recieve data from
102  INTEGER, ALLOCATABLE, DIMENSION(:) :: NumCommNodesFrom1, NumCommNodesFrom2 ! Number of nodes to be received from processors
103 
104 !
105 ! MPI Communication Variables
106 !
107  INTEGER :: myid ! this processor's ID
108  INTEGER :: nprocs ! number of procs available
109  INTEGER :: ierr ! MPI error code
110  TYPE(rcv_buf), ALLOCATABLE, DIMENSION(:) :: frmproc ! multi-proc receive buffer
111  INTEGER,ALLOCATABLE,DIMENSION(:) :: req_rcv, req_snd ! send and receive requests
112  INTEGER,ALLOCATABLE,DIMENSION(:,:) :: stat_rcv, stat_snd ! send and receive statuses
113 
114 !
115 ! Nodal BC Flags for each DOF
116 !
117  INTEGER,ALLOCATABLE,DIMENSION(:,:) :: node_flag
118  REAL(wp),ALLOCATABLE,DIMENSION(:,:) :: boundary_value
119 
120 
121 !!!!!!!!!!!!!!!!!!!!!!! ... Structural Solver Data Structure ... !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
122 
123 !
124 ! External forces from input file
125 !
126  REAL(wp),ALLOCATABLE,DIMENSION(:) :: fext_imp
127 
128 !
129 ! Storage for matrices and associated variables
130 !
131 
132  INTEGER :: nstart_km, nrows_km ! Dimensions of parts of M and K matrices
133 
134  INTEGER :: nnz_m ! Number of nonzeros in the mass matrix
135  REAL(kind=wp),ALLOCATABLE,DIMENSION(:) :: aval_m ! M matrix in compressed row storage
136  INTEGER,ALLOCATABLE,DIMENSION(:) :: rp_m, cval_m ! M matrix in compressed row storage
137 
138  INTEGER :: nnz_k ! number of nonzeros in the K matrix
139  REAL(kind=wp),ALLOCATABLE,DIMENSION(:) :: aval_k ! K matrix in compressed row storage
140  INTEGER,ALLOCATABLE,DIMENSION(:) :: rp_k, cval_k ! K matrix in compressed row storage
141 
142  REAL(kind=wp),ALLOCATABLE,DIMENSION(:) :: aval_meff ! Effective M matrix in compressed row storage
143  INTEGER,ALLOCATABLE,DIMENSION(:) :: cval_meff, rp_meff ! Effective M matrix in compressed row storage
144  INTEGER :: nnz_meff, nstart_meff, nrows_meff ! Dimensions of parts of effective M matrix
145 
146 !
147 ! Keep track of whether the initial acceleration has been solved for
148 !
149 
150  LOGICAL :: initAccel
151 
152 !!!!!!!!!!!!!!!!!!!!!!! ... Thermal Solver Data Structure ... !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
153 
154  ! ... External thermal loads from input file
155  REAL(wp),ALLOCATABLE,DIMENSION(:) :: rext_imp
156 
157  ! ... Thermal load vector from previous timestep
158  ! ... for use in the beta method in thermal_soln.f90
159  REAL(kind=wp),ALLOCATABLE,DIMENSION(:) :: r_old
160 
161  ! ... Storage for matrices and associated variables
162 
163  ! ... Dimensions of parts of the thermal stiffness [Kt] and thermal capacitance [C] matrices
164  INTEGER :: nstart_ktc, nrows_ktc
165 
166  ! ... Thermal Capacitance Matrix [C]
167  ! ... Number of nonzeros in the thermal capacitance matrix
168  INTEGER :: nnz_c
169  ! ... Capacitance matix in compressed row storage
170  REAL(kind=wp),ALLOCATABLE,DIMENSION(:) :: aval_c
171  INTEGER,ALLOCATABLE,DIMENSION(:) :: rp_c, cval_c
172 
173  ! ... Thermal Stiffness Matrix [Kt]
174  ! ... Number of nonzeros in the thermal stiffness matrix
175  INTEGER :: nnz_kt
176  ! ... Thermal stiffness matix in compressed row storage
177  REAL(kind=wp),ALLOCATABLE,DIMENSION(:) :: aval_kt
178  INTEGER,ALLOCATABLE,DIMENSION(:) :: rp_kt, cval_kt
179 
180  ! ... Effective Thermal Capacitance Matrix [C_eff]
181  ! ... Number of nonzeros in the effective capacitance matrix
182  REAL(kind=wp),ALLOCATABLE,DIMENSION(:) :: aval_ceff
183  ! ... Effective capacitance matrix in compressed row storage
184  INTEGER,ALLOCATABLE,DIMENSION(:) :: cval_ceff, rp_ceff
185  INTEGER :: nnz_ceff, nstart_ceff, nrows_ceff
186 
187  REAL, ALLOCATABLE, DIMENSION(:) :: Ceff_fpTP
188 
189 END MODULE implicit_global