OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
array_mod.F
Go to the documentation of this file.
1Copyright> OpenRadioss
2Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3Copyright>
4Copyright> This program is free software: you can redistribute it and/or modify
5Copyright> it under the terms of the GNU Affero General Public License as published by
6Copyright> the Free Software Foundation, either version 3 of the License, or
7Copyright> (at your option) any later version.
8Copyright>
9Copyright> This program is distributed in the hope that it will be useful,
10Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12Copyright> GNU Affero General Public License for more details.
13Copyright>
14Copyright> You should have received a copy of the GNU Affero General Public License
15Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16Copyright>
17Copyright>
18Copyright> Commercial Alternative: Altair Radioss Software
19Copyright>
20Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21Copyright> software under a commercial license. Contact Altair to discuss further if the
22Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23!||====================================================================
24!|| array_mod ../common_source/modules/array_mod.F
25!||--- called by ------------------------------------------------------
26!|| ale_box_coloration ../starter/source/initial_conditions/inivol/ale_box_coloration.F
27!|| check_remote_surface_state ../engine/source/interfaces/interf/check_remote_surface_state.F
28!|| domain_decomposition_pcyl ../starter/source/loads/general/load_pcyl/domain_decomposition_pcyl.F
29!|| get_neighbour_surface ../engine/source/interfaces/interf/get_neighbour_surface.F90
30!|| get_neighbour_surface_from_remote_proc ../engine/source/interfaces/interf/get_neighbour_surface_from_remote_proc.F90
31!|| i18main_kine_1 ../engine/source/interfaces/int18/i18main_kine.F
32!|| i25sto ../engine/source/interfaces/intsort/i25sto.F
33!|| i25trivox1 ../starter/source/interfaces/inter3d1/i25trivox1.F
34!|| i7trivox1 ../starter/source/interfaces/inter3d1/i7trivox1.F
35!|| igrsurf_split ../starter/source/spmd/igrsurf_split.F
36!|| init_inivol ../starter/source/initial_conditions/inivol/init_inivol.F90
37!|| init_inivol_2d_polygons ../starter/source/initial_conditions/inivol/init_inivol_2D_polygons.F90
38!|| init_nodal_state ../engine/source/interfaces/interf/init_nodal_state.F
39!|| initia ../starter/source/elements/initia/initia.F
40!|| int18_alloc ../engine/source/interfaces/int18/int18_alloc.F
41!|| inter_init_node_color ../engine/source/interfaces/generic/inter_init_node_color.F90
42!|| inter_save_candidate ../starter/source/interfaces/inter3d1/inter_save_candidate.F90
43!|| intfop2 ../engine/source/interfaces/interf/intfop2.F
44!|| resol ../engine/source/engine/resol.F
45!|| spmd_exch_deleted_surf_edge ../engine/source/mpi/interfaces/spmd_exch_deleted_surf_edge.F
46!|| spmd_exch_inter_18 ../engine/source/mpi/interfaces/spmd_exch_inter_18.F
47!|| spmd_exch_neighbour_segment ../engine/source/mpi/interfaces/spmd_exch_neighbour_segment.F90
48!|| spmd_xv_inter_type1 ../engine/source/mpi/nodes/spmd_sd_xv_inter1.F90
49!|| update_neighbour_segment ../engine/source/interfaces/interf/update_neighbour_segment.F90
50!||====================================================================
51 MODULE array_mod
52#include "my_real.inc"
53!$COMMENT
54! ARRAY_MOD description
55! allocation & dealloaction of arrays (1d/2d/3d)
56! ARRAY_MOD organization
57! DO NOT ALLOCATE LARGE ARRAYS OF TYPE(array_type) if only a few elements are needed
58! SIZE(array_type) == 1248 bytes (ifx) or 1152 bytes (gfortran)
59!$ENDCOMMENT
60
62 INTEGER :: size_int_array_1d
63 INTEGER, DIMENSION(2) :: size_int_array_2d
64 INTEGER, DIMENSION(3) :: size_int_array_3d
65 INTEGER, DIMENSION(:), ALLOCATABLE :: int_array_1d
66 INTEGER, DIMENSION(:,:), ALLOCATABLE :: int_array_2d
67 INTEGER, DIMENSION(:,:,:), ALLOCATABLE :: int_array_3d
68
69 INTEGER :: size_my_real_array_1d
70 INTEGER, DIMENSION(2) :: size_my_real_array_2d
71 INTEGER, DIMENSION(3) :: size_my_real_array_3d
72 my_real, DIMENSION(:), ALLOCATABLE :: my_real_array_1d
73 my_real, DIMENSION(:,:), ALLOCATABLE :: my_real_array_2d
74 my_real, DIMENSION(:,:,:), ALLOCATABLE :: my_real_array_3d
75
76 INTEGER :: size_db_array_1d
77 INTEGER, DIMENSION(2) :: size_db_array_2d
78 INTEGER, DIMENSION(3) :: size_db_array_3d
79 REAL(kind=8), dimension(:), ALLOCATABLE :: db_array_1d
80 REAL(kind=8), dimension(:,:), ALLOCATABLE :: db_array_2d
81 REAL(kind=8), dimension(:,:,:), ALLOCATABLE :: db_array_3d
82
83 INTEGER :: size_sp_array_1d
84 INTEGER, DIMENSION(2) :: size_sp_array_2d
85 INTEGER, DIMENSION(3) :: size_sp_array_3d
86 REAL(kind=4), dimension(:), ALLOCATABLE :: sp_array_1d
87 REAL(kind=4), dimension(:,:), ALLOCATABLE :: sp_array_2d
88 REAL(kind=4), dimension(:,:,:), ALLOCATABLE :: sp_array_3d
89 END TYPE array_type
91 INTEGER :: size_int_array_1d
92 INTEGER, DIMENSION(:), ALLOCATABLE :: int_array_1d
93 END TYPE array_type_int_1d
94
96 MODULE PROCEDURE alloc_1d_array_full
97 MODULE PROCEDURE alloc_int_1d_array
98 end interface
100 MODULE PROCEDURE dealloc_1d_array_full
101 MODULE PROCEDURE dealloc_int_1d_array
102 end interface
103
104
105 CONTAINS
106 ! ----------------------------
107!||====================================================================
108!|| alloc_1d_array_full ../common_source/modules/array_mod.F
109!||====================================================================
110 SUBROUTINE alloc_1d_array_full(THIS)
111 IMPLICIT NONE
112
113 TYPE(array_type), INTENT(inout) :: THIS
114
115 ALLOCATE( this%INT_ARRAY_1D( this%SIZE_INT_ARRAY_1D ) )
116
117 RETURN
118 END SUBROUTINE
119
120!||====================================================================
121!|| alloc_int_1d_array ../common_source/modules/array_mod.F
122!||--- called by ------------------------------------------------------
123!|| inter_init_node_color ../engine/source/interfaces/generic/inter_init_node_color.F90
124!||====================================================================
125 SUBROUTINE alloc_int_1d_array(THIS)
126 IMPLICIT NONE
127
128 TYPE(array_type_int_1d), INTENT(inout) :: THIS
129
130 ALLOCATE( this%INT_ARRAY_1D( this%SIZE_INT_ARRAY_1D ) )
131
132 RETURN
133 END SUBROUTINE
134
135 ! ----------------------------
136!||====================================================================
137!|| alloc_2d_array ../common_source/modules/array_mod.F
138!||--- called by ------------------------------------------------------
139!|| check_remote_surface_state ../engine/source/interfaces/interf/check_remote_surface_state.F
140!||====================================================================
141 SUBROUTINE alloc_2d_array(THIS)
142 IMPLICIT NONE
143
144 TYPE(array_type), INTENT(inout) :: THIS
145
146 ALLOCATE( this%INT_ARRAY_2D( this%SIZE_INT_ARRAY_2D(1),this%SIZE_INT_ARRAY_2D(2) ) )
147
148 RETURN
149 END SUBROUTINE
150 ! ----------------------------
151!||====================================================================
152!|| alloc_3d_array ../common_source/modules/array_mod.F
153!||--- called by ------------------------------------------------------
154!|| ale_box_coloration ../starter/source/initial_conditions/inivol/ale_box_coloration.F
155!||====================================================================
156 SUBROUTINE alloc_3d_array(THIS)
157 IMPLICIT NONE
158
159 TYPE(array_type), INTENT(inout) :: THIS
160
161 ALLOCATE( this%INT_ARRAY_3D( this%SIZE_INT_ARRAY_3D(1),
162 . this%SIZE_INT_ARRAY_3D(2),
163 . this%SIZE_INT_ARRAY_3D(3) ) )
164
165 RETURN
166 END SUBROUTINE
167 ! ----------------------------
168!||====================================================================
169!|| dealloc_1d_array_full ../common_source/modules/array_mod.F
170!||====================================================================
171 SUBROUTINE dealloc_1d_array_full(THIS)
172 IMPLICIT NONE
173
174 TYPE(array_type), INTENT(inout) :: THIS
175
176 DEALLOCATE( this%INT_ARRAY_1D )
177
178 RETURN
179 END SUBROUTINE
180 ! ----------------------------
181!||====================================================================
182!|| dealloc_int_1d_array ../common_source/modules/array_mod.F
183!||====================================================================
184 SUBROUTINE dealloc_int_1d_array(THIS)
185 IMPLICIT NONE
186
187 TYPE(array_type_int_1d), INTENT(inout) :: THIS
188
189 DEALLOCATE( this%INT_ARRAY_1D )
190
191 RETURN
192 END SUBROUTINE
193
194!||====================================================================
195!|| dealloc_2d_array ../common_source/modules/array_mod.F
196!||--- called by ------------------------------------------------------
197!|| check_remote_surface_state ../engine/source/interfaces/interf/check_remote_surface_state.F
198!||====================================================================
199 SUBROUTINE dealloc_2d_array(THIS)
200 IMPLICIT NONE
201
202 TYPE(array_type), INTENT(inout) :: THIS
203
204 DEALLOCATE( this%INT_ARRAY_2D )
205
206 RETURN
207 END SUBROUTINE
208 ! ----------------------------
209!||====================================================================
210!|| dealloc_3d_array ../common_source/modules/array_mod.F
211!||--- called by ------------------------------------------------------
212!|| init_inivol ../starter/source/initial_conditions/inivol/init_inivol.F90
213!||====================================================================
214 SUBROUTINE dealloc_3d_array(THIS)
215 IMPLICIT NONE
216
217 TYPE(array_type), INTENT(inout) :: THIS
218
219 DEALLOCATE( this%INT_ARRAY_3D )
220
221 RETURN
222 END SUBROUTINE
223 ! ----------------------------
224!||====================================================================
225!|| alloc_my_real_1d_array ../common_source/modules/array_mod.f
226!||--- called by ------------------------------------------------------
227!|| get_neighbour_surface ../engine/source/interfaces/interf/get_neighbour_surface.F90
228!|| get_neighbour_surface_from_remote_proc ../engine/source/interfaces/interf/get_neighbour_surface_from_remote_proc.F90
229!|| spmd_exch_inter_18 ../engine/source/mpi/interfaces/spmd_exch_inter_18.F
230!|| spmd_exch_neighbour_segment ../engine/source/mpi/interfaces/spmd_exch_neighbour_segment.F90
231!||====================================================================
232 SUBROUTINE alloc_my_real_1d_array(THIS)
233#include "implicit_f.inc"
234
235 TYPE(array_type), INTENT(inout) :: THIS
236
237 ALLOCATE( this%MY_REAL_ARRAY_1D( this%SIZE_MY_REAL_ARRAY_1D ) )
238
239 RETURN
240 END SUBROUTINE alloc_my_real_1d_array
241 ! ----------------------------
242 ! ----------------------------
243!||====================================================================
244!|| dealloc_my_real_1d_array ../common_source/modules/array_mod.F
245!||--- called by ------------------------------------------------------
246!|| get_neighbour_surface ../engine/source/interfaces/interf/get_neighbour_surface.F90
247!|| get_neighbour_surface_from_remote_proc ../engine/source/interfaces/interf/get_neighbour_surface_from_remote_proc.f90
248!|| spmd_exch_inter_18 ../engine/source/mpi/interfaces/spmd_exch_inter_18.f
249!||====================================================================
251#include "implicit_f.inc"
252
253 TYPE(array_type), INTENT(inout) :: THIS
254
255 DEALLOCATE( this%MY_REAL_ARRAY_1D )
256
257 RETURN
258 END SUBROUTINE dealloc_my_real_1d_array
259 ! ----------------------------
260
261
262
263!||====================================================================
264!|| alloc_my_real_2d_array ../common_source/modules/array_mod.F
265!||--- called by ------------------------------------------------------
266!|| spmd_xv_inter_type1 ../engine/source/mpi/nodes/spmd_sd_xv_inter1.F90
267!||====================================================================
268 SUBROUTINE alloc_my_real_2d_array(THIS)
269#include "implicit_f.inc"
270
271 TYPE(array_type), INTENT(inout) :: THIS
272
273 ALLOCATE( this%MY_REAL_ARRAY_2D( this%SIZE_MY_REAL_ARRAY_2D(1),this%SIZE_MY_REAL_ARRAY_2D(2) ) )
274
275 RETURN
276 END SUBROUTINE alloc_my_real_2d_array
277 ! ----------------------------
278 ! ----------------------------
279!||====================================================================
280!|| dealloc_my_real_2d_array ../common_source/modules/array_mod.F
281!||--- called by ------------------------------------------------------
282!|| spmd_xv_inter_type1 ../engine/source/mpi/nodes/spmd_sd_xv_inter1.F90
283!||====================================================================
285#include "implicit_f.inc"
286
287 TYPE(array_type), INTENT(inout) :: THIS
288
289 DEALLOCATE( this%MY_REAL_ARRAY_2D )
290
291 RETURN
292 END SUBROUTINE dealloc_my_real_2d_array
293 ! ----------------------------
294
295
296 END MODULE array_mod
#define my_real
Definition cppsort.cpp:32
subroutine alloc_my_real_1d_array(this)
Definition array_mod.F:233
subroutine alloc_my_real_2d_array(this)
Definition array_mod.F:269
subroutine dealloc_3d_array(this)
Definition array_mod.F:215
subroutine alloc_3d_array(this)
Definition array_mod.F:157
subroutine dealloc_my_real_1d_array(this)
Definition array_mod.F:251
subroutine dealloc_my_real_2d_array(this)
Definition array_mod.F:285
subroutine alloc_1d_array_full(this)
Definition array_mod.F:111
subroutine dealloc_2d_array(this)
Definition array_mod.F:200
subroutine dealloc_int_1d_array(this)
Definition array_mod.F:185
subroutine alloc_int_1d_array(this)
Definition array_mod.F:126
subroutine dealloc_1d_array_full(this)
Definition array_mod.F:172
subroutine alloc_2d_array(this)
Definition array_mod.F:142
subroutine spmd_exch_inter_18(ninter, nspmd, number_inter18, sxcell, inter18_list, xcell, multi_fvm, xcell_remote, intbuf_tab, ale_connectivity)