Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
implicit_finalize.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_finalize
58 !!
59 !! FUNCTION
60 !! Finalizes BlockSolve95 and deallocates implicit variables
61 !!
62 !! INPUTS
63 !! none
64 !!
65 !! OUTPUTS
66 !! none
67 !!
68 !! USES
69 !! MPI
70 !!
71 !!****
72 
73 SUBROUTINE implicit_finalize(global )
74 
75  USE implicit_global
76 
77  IMPLICIT NONE
78 
79  TYPE(rocfrac_global) :: global
80  INTEGER :: bs95debug
81 
82  IF ( global%debug_state ) THEN
83  bs95debug = 1
84  ELSE
85  bs95debug = 0
86  END IF
87 
88  CALL bs95free(bs95debug)
89  CALL bs95finalize(bs95debug)
90 
91  DEALLOCATE(cval_m)
92  DEALLOCATE(aval_m)
93  DEALLOCATE(rp_m)
94  DEALLOCATE(cval_k)
95  DEALLOCATE(aval_k)
96  DEALLOCATE(rp_k)
97  DEALLOCATE(cval_meff)
98  DEALLOCATE(aval_meff)
99  DEALLOCATE(rp_meff)
100  DEALLOCATE(node_flag)
101  DEALLOCATE(boundary_value)
102  DEALLOCATE(local2global)
103  DEALLOCATE(global2local)
104  DEALLOCATE(nodeproc)
105  DEALLOCATE(fext_imp)
106  IF (nprocs > 1) THEN
107  DEALLOCATE(commprocs1)
108  DEALLOCATE(numcommnodes1)
109  DEALLOCATE(commnodes1)
110  DEALLOCATE(commprocsfrom1)
111  DEALLOCATE(numcommnodesfrom1)
112  DEALLOCATE(commprocs2)
113  DEALLOCATE(numcommnodes2)
114  DEALLOCATE(commnodes2)
115  DEALLOCATE(commprocsfrom2)
116  DEALLOCATE(numcommnodesfrom2)
117  ENDIF
118 
119 
120 END SUBROUTINE implicit_finalize
121 
subroutine implicit_finalize(global)