OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
read_cluster.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!|| read_cluster ../engine/source/output/cluster/read_cluster.F
25!||--- called by ------------------------------------------------------
26!|| rdresb ../engine/source/output/restart/rdresb.f
27!||--- calls -----------------------------------------------------
28!|| read_db ../common_source/tools/input_output/read_db.F
29!|| read_i_c ../common_source/tools/input_output/write_routtines.c
30!||--- uses -----------------------------------------------------
31!|| cluster_mod ../engine/share/modules/cluster_mod.F
32!||====================================================================
33 SUBROUTINE read_cluster(CLUSTER)
34C-----------------------------------------------
35C M o d u l e s
36C-----------------------------------------------
37 USE cluster_mod
38C-----------------------------------------------
39C I m p l i c i t T y p e s
40C-----------------------------------------------
41#include "implicit_f.inc"
42C-----------------------------------------------
43C C o m m o n B l o c k s
44C-----------------------------------------------
45#include "com04_c.inc"
46C-----------------------------------------------
47C D u m m y A r g u m e n t s
48C-----------------------------------------------
49 TYPE (CLUSTER_) ,DIMENSION(NCLUSTER) :: CLUSTER
50C-----------------------------------------------
51C L o c a l V a r i a b l e s
52C-----------------------------------------------
53 INTEGER I,J,IL,RL,ITY,NEL,NNOD,IFAIL
54 INTEGER ILCLUSTER_MAX, RLCLUSTER_MAX
55 my_real, DIMENSION(:), ALLOCATABLE :: rcltab
56 INTEGER, DIMENSION(:), ALLOCATABLE :: ICLTAB
57 INTEGER, DIMENSION(NCLUSTER) :: ILCLUSTER,RLCLUSTER
58
59C=======================================================================
60
61 CALL read_i_c(ilcluster,ncluster)
62 CALL read_i_c(rlcluster,ncluster)
63 rlcluster_max = 0
64 ilcluster_max = 0
65 DO i = 1, ncluster
66 IF ( rlcluster_max < rlcluster(i) ) THEN
67 rlcluster_max = rlcluster(i)
68 ENDIF
69 IF ( ilcluster_max < ilcluster(i) ) THEN
70 ilcluster_max = ilcluster(i)
71 ENDIF
72 ENDDO
73
74 ALLOCATE (icltab(ilcluster_max)) ! Integer CLuster TABle
75 ALLOCATE (rcltab(rlcluster_max)) ! Real CLuster TABle
76
77 DO i = 1, ncluster
78 rcltab = zero
79 icltab = 0
80 CALL read_db(rcltab,rlcluster(i))
81 CALL read_i_c(icltab,ilcluster(i))
82 il = 0
83 rl = 0
84 cluster(i)%ID = icltab(il+1)
85 cluster(i)%TYPE = icltab(il+2)
86 cluster(i)%IFAIL = icltab(il+3)
87 cluster(i)%IGR = icltab(il+4)
88 cluster(i)%NEL = icltab(il+5)
89 cluster(i)%NNOD = icltab(il+6)
90 cluster(i)%SKEW = icltab(il+7)
91 cluster(i)%OFF = icltab(il+8)
92 il = il + 8
93 cluster(i)%FAIL = rcltab(rl+1)
94 rl = rl + 1
95 nel = cluster(i)%NEL
96 nnod = cluster(i)%NNOD
97 ifail = cluster(i)%IFAIL
98 ALLOCATE (cluster(i)%NG(nel))
99 ALLOCATE (cluster(i)%ELEM(nel))
100 ALLOCATE (cluster(i)%NOD1(nnod))
101 ALLOCATE (cluster(i)%NOD2(nnod))
102 DO j = 1, nel
103 cluster(i)%NG(j) = icltab(il + j) !element group number
104 cluster(i)%ELEM(j) = icltab(il + j+nel) !element index in the group
105 ENDDO ! J = 1,NEL
106 il = il + nel*2
107
108 DO j = 1, nnod
109 cluster(i)%NOD1(j) = icltab(il + j)
110 cluster(i)%NOD2(j) = icltab(il + j+nnod)
111 ENDDO
112
113 il = il + nnod*2
114 IF (cluster(i)%IFAIL > 0) THEN
115 ALLOCATE (cluster(i)%FMAX(2))
116 ALLOCATE (cluster(i)%MMAX(2))
117 cluster(i)%FMAX(1) = rcltab(rl + 1)
118 cluster(i)%FMAX(2) = rcltab(rl + 2)
119 cluster(i)%MMAX(1) = rcltab(rl + 3)
120 cluster(i)%MMAX(2) = rcltab(rl + 4)
121 rl = rl + 4
122 ELSE
123 ALLOCATE (cluster(i)%FMAX(2))
124 ALLOCATE (cluster(i)%MMAX(2))
125 ENDIF
126 IF (cluster(i)%IFAIL == 3) THEN
127 ALLOCATE (cluster(i)%AX(4))
128 ALLOCATE (cluster(i)%NX(4))
129 cluster(i)%AX(1) = rcltab(rl + 1)
130 cluster(i)%AX(2) = rcltab(rl + 2)
131 cluster(i)%AX(3) = rcltab(rl + 3)
132 cluster(i)%AX(4) = rcltab(rl + 4)
133 cluster(i)%NX(1) = rcltab(rl + 5)
134 cluster(i)%NX(2) = rcltab(rl + 6)
135 cluster(i)%NX(3) = rcltab(rl + 7)
136 cluster(i)%NX(4) = rcltab(rl + 8)
137 ELSE
138 ALLOCATE (cluster(i)%AX(0))
139 ALLOCATE (cluster(i)%NX(0))
140 ENDIF
141 ENDDO ! I = 1, NCLUSTER_L
142
143 DEALLOCATE (rcltab)
144 DEALLOCATE (icltab)
145
146C-----------
147 RETURN
148 END
#define my_real
Definition cppsort.cpp:32
subroutine rdresb(af, iaf, lvarrea, irunn, multi_fvm, h3d_data, pinch_data, ale_connectivity, t_monvol, sensors, ebcs_tab, dynain_data, user_windows, output, interfaces, loads, mat_elem, python, iflow, skews, rflow, liflow, lrflow, impl_s0, forneqs, unitab, stack, drape_sh4n, drape_sh3n, drapeg, ndrape, glob_therm, pblast, element, nodes, rbe3)
Definition rdresb.F:159
subroutine read_cluster(cluster)
subroutine read_db(a, n)
Definition read_db.F:88
void read_i_c(int *w, int *len)