FrontISTR 5.2.0
Large-scale structural analysis program with finit element method
Loading...
Searching...
No Matches
hecmw_dist_free_f.f90
Go to the documentation of this file.
1!-------------------------------------------------------------------------------
2! Copyright (c) 2019 FrontISTR Commons
3! This software is released under the MIT License, see LICENSE.txt
4!-------------------------------------------------------------------------------
6
8 use hecmw_util
9 implicit none
10
11 public :: hecmw_dist_free
12
13contains
14
15 subroutine hecmw_dist_free(mesh)
16 type(hecmwst_local_mesh) :: mesh
17
18 call free_etc(mesh)
19 call free_node(mesh)
20 call free_elem(mesh)
21 call free_comm(mesh)
22 call free_adapt(mesh)
23 call free_sect(mesh%section)
24 call free_mat(mesh%material)
25 call free_mpc(mesh%mpc)
26 call free_amp(mesh%amp)
27 call free_ngrp(mesh%node_group)
28 call free_egrp(mesh%elem_group)
29 call free_sgrp(mesh%surf_group)
30 call free_cpair(mesh%contact_pair)
31 call free_reforg(mesh%refine_origin)
32 end subroutine hecmw_dist_free
33
34
35 subroutine free_etc(mesh)
36 type(hecmwst_local_mesh) :: mesh
37
38 if(associated(mesh%files)) deallocate(mesh%files)
39 end subroutine free_etc
40
41
42 subroutine free_node(mesh)
43 type(hecmwst_local_mesh) :: mesh
44
45 if(associated(mesh%node)) deallocate(mesh%node)
46 if(associated(mesh%node_ID)) deallocate(mesh%node_ID)
47 if(associated(mesh%global_node_ID)) deallocate(mesh%global_node_ID)
48 if(associated(mesh%node_val_index)) deallocate(mesh%node_val_index)
49 if(associated(mesh%node_val_item)) deallocate(mesh%node_val_item)
50 if(associated(mesh%node_dof_index)) deallocate(mesh%node_dof_index)
51 if(associated(mesh%node_dof_item)) deallocate(mesh%node_dof_item)
52 if(associated(mesh%node_init_val_index)) deallocate(mesh%node_init_val_index)
53 if(associated(mesh%node_init_val_item)) deallocate(mesh%node_init_val_item)
54 if(associated(mesh%node_internal_list)) deallocate(mesh%node_internal_list)
55 end subroutine free_node
56
57
58 subroutine free_elem(mesh)
59 type(hecmwst_local_mesh) :: mesh
60
61 if(associated(mesh%elem_type_index)) deallocate(mesh%elem_type_index)
62 if(associated(mesh%elem_type_item)) deallocate(mesh%elem_type_item)
63 if(associated(mesh%elem_type)) deallocate(mesh%elem_type)
64 if(associated(mesh%section_ID)) deallocate(mesh%section_ID)
65 if(associated(mesh%elem_mat_ID_index)) deallocate(mesh%elem_mat_ID_index)
66 if(associated(mesh%elem_mat_ID_item)) deallocate(mesh%elem_mat_ID_item)
67 if(associated(mesh%elem_node_index)) deallocate(mesh%elem_node_index)
68 if(associated(mesh%elem_node_item)) deallocate(mesh%elem_node_item)
69 if(associated(mesh%elem_ID)) deallocate(mesh%elem_ID)
70 if(associated(mesh%global_elem_ID)) deallocate(mesh%global_elem_ID)
71 if(associated(mesh%elem_internal_list)) deallocate(mesh%elem_internal_list)
72 if(associated(mesh%elem_mat_int_index)) deallocate(mesh%elem_mat_int_index)
73 if(associated(mesh%elem_mat_int_val)) deallocate(mesh%elem_mat_int_val)
74 if(associated(mesh%elem_val_index)) deallocate(mesh%elem_val_index)
75 if(associated(mesh%elem_val_item)) deallocate(mesh%elem_val_item)
76 end subroutine free_elem
77
78
79 subroutine free_comm(mesh)
80 type(hecmwst_local_mesh) :: mesh
81
82 if(associated(mesh%neighbor_pe)) deallocate(mesh%neighbor_pe)
83 if(associated(mesh%import_index)) deallocate(mesh%import_index)
84 if(associated(mesh%import_item)) deallocate(mesh%import_item)
85 if(associated(mesh%export_index)) deallocate(mesh%export_index)
86 if(associated(mesh%export_item)) deallocate(mesh%export_item)
87 if(associated(mesh%shared_index)) deallocate(mesh%shared_index)
88 if(associated(mesh%shared_item)) deallocate(mesh%shared_item)
89 end subroutine free_comm
90
91
92 subroutine free_adapt(mesh)
93 type(hecmwst_local_mesh) :: mesh
94
95 if(associated(mesh%when_i_was_refined_node)) deallocate(mesh%when_i_was_refined_node)
96 if(associated(mesh%when_i_was_refined_elem)) deallocate(mesh%when_i_was_refined_elem)
97 if(associated(mesh%adapt_parent_type)) deallocate(mesh%adapt_parent_type)
98 if(associated(mesh%adapt_type)) deallocate(mesh%adapt_type)
99 if(associated(mesh%adapt_level)) deallocate(mesh%adapt_level)
100 if(associated(mesh%adapt_parent)) deallocate(mesh%adapt_parent)
101 if(associated(mesh%adapt_children_index)) deallocate(mesh%adapt_children_index)
102 if(associated(mesh%adapt_children_item)) deallocate(mesh%adapt_children_item)
103 end subroutine free_adapt
104
105
106 subroutine free_sect(sect)
107 type(hecmwst_section) :: sect
108
109 if(associated(sect%sect_type)) deallocate(sect%sect_type)
110 if(associated(sect%sect_opt)) deallocate(sect%sect_opt)
111 if(associated(sect%sect_mat_ID_index)) deallocate(sect%sect_mat_ID_index)
112 if(associated(sect%sect_mat_ID_item)) deallocate(sect%sect_mat_ID_item)
113 if(associated(sect%sect_I_index)) deallocate(sect%sect_I_index)
114 if(associated(sect%sect_I_item)) deallocate(sect%sect_I_item)
115 if(associated(sect%sect_R_index)) deallocate(sect%sect_R_index)
116 if(associated(sect%sect_R_item)) deallocate(sect%sect_R_item)
117 if(associated(sect%sect_orien_ID)) deallocate(sect%sect_orien_ID)
118 end subroutine free_sect
119
120
121 subroutine free_mat(mat)
122 type(hecmwst_material) :: mat
123
124 if(associated(mat%mat_name)) deallocate(mat%mat_name)
125 if(associated(mat%mat_item_index)) deallocate(mat%mat_item_index)
126 if(associated(mat%mat_subitem_index)) deallocate(mat%mat_subitem_index)
127 if(associated(mat%mat_table_index)) deallocate(mat%mat_table_index)
128 if(associated(mat%mat_val)) deallocate(mat%mat_val)
129 if(associated(mat%mat_temp)) deallocate(mat%mat_temp)
130 end subroutine free_mat
131
132
133 subroutine free_mpc(mpc)
134 type(hecmwst_mpc) :: mpc
135
136 if(associated(mpc%mpc_index)) deallocate(mpc%mpc_index)
137 if(associated(mpc%mpc_item)) deallocate(mpc%mpc_item)
138 if(associated(mpc%mpc_dof)) deallocate(mpc%mpc_dof)
139 if(associated(mpc%mpc_val)) deallocate(mpc%mpc_val)
140 end subroutine free_mpc
141
142
143 subroutine free_amp(amp)
144 type(hecmwst_amplitude) :: amp
145
146 if(associated(amp%amp_name)) deallocate(amp%amp_name)
147 if(associated(amp%amp_type_definition)) deallocate(amp%amp_type_definition)
148 if(associated(amp%amp_type_time)) deallocate(amp%amp_type_time)
149 if(associated(amp%amp_type_value)) deallocate(amp%amp_type_value)
150 if(associated(amp%amp_index)) deallocate(amp%amp_index)
151 if(associated(amp%amp_val)) deallocate(amp%amp_val)
152 if(associated(amp%amp_table)) deallocate(amp%amp_table)
153 end subroutine free_amp
154
155
156 subroutine free_ngrp(grp)
157 type(hecmwst_node_grp) :: grp
158
159 if(associated(grp%grp_name)) deallocate(grp%grp_name)
160 if(associated(grp%grp_index)) deallocate(grp%grp_index)
161 if(associated(grp%grp_item)) deallocate(grp%grp_item)
162 if(associated(grp%bc_grp_ID)) deallocate(grp%bc_grp_ID)
163 if(associated(grp%bc_grp_type)) deallocate(grp%bc_grp_type)
164 if(associated(grp%bc_grp_index)) deallocate(grp%bc_grp_index)
165 if(associated(grp%bc_grp_dof)) deallocate(grp%bc_grp_dof)
166 if(associated(grp%bc_grp_val)) deallocate(grp%bc_grp_val)
167 end subroutine free_ngrp
168
169
170 subroutine free_egrp(grp)
171 type(hecmwst_elem_grp) :: grp
172
173 if(associated(grp%grp_name)) deallocate(grp%grp_name)
174 if(associated(grp%grp_index)) deallocate(grp%grp_index)
175 if(associated(grp%grp_item)) deallocate(grp%grp_item)
176 if(associated(grp%bc_grp_ID)) deallocate(grp%bc_grp_ID)
177 if(associated(grp%bc_grp_type)) deallocate(grp%bc_grp_type)
178 if(associated(grp%bc_grp_index)) deallocate(grp%bc_grp_index)
179 if(associated(grp%bc_grp_val)) deallocate(grp%bc_grp_val)
180 end subroutine free_egrp
181
182
183 subroutine free_sgrp(grp)
184 type(hecmwst_surf_grp) :: grp
185
186 if(associated(grp%grp_name)) deallocate(grp%grp_name)
187 if(associated(grp%grp_index)) deallocate(grp%grp_index)
188 if(associated(grp%grp_item)) deallocate(grp%grp_item)
189 if(associated(grp%bc_grp_ID)) deallocate(grp%bc_grp_ID)
190 if(associated(grp%bc_grp_type)) deallocate(grp%bc_grp_type)
191 if(associated(grp%bc_grp_index)) deallocate(grp%bc_grp_index)
192 if(associated(grp%bc_grp_val)) deallocate(grp%bc_grp_val)
193 end subroutine free_sgrp
194
195 subroutine free_cpair(cpair)
196 type(hecmwst_contact_pair) :: cpair
197
198 if(associated(cpair%name)) deallocate(cpair%name)
199 if(associated(cpair%type)) deallocate(cpair%type)
200 if(associated(cpair%slave_grp_id)) deallocate(cpair%slave_grp_id)
201 if(associated(cpair%slave_orisgrp_id)) deallocate(cpair%slave_orisgrp_id)
202 if(associated(cpair%master_grp_id)) deallocate(cpair%master_grp_id)
203 end subroutine free_cpair
204
205 subroutine free_reforg(reforg)
206 type(hecmwst_refine_origin) :: reforg
207
208 if(associated(reforg%index)) deallocate(reforg%index)
209 if(associated(reforg%item_index)) deallocate(reforg%item_index)
210 if(associated(reforg%item_item)) deallocate(reforg%item_item)
211 end subroutine free_reforg
212
213end module hecmw_dist_free_f
214
I/O and Utility.
subroutine free_adapt(mesh)
subroutine free_node(mesh)
subroutine free_cpair(cpair)
subroutine free_amp(amp)
subroutine free_sect(sect)
subroutine free_reforg(reforg)
subroutine free_comm(mesh)
subroutine free_mat(mat)
subroutine free_etc(mesh)
subroutine, public hecmw_dist_free(mesh)
subroutine free_elem(mesh)
I/O and Utility.
Definition: hecmw_util_f.F90:7