OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
inverted_group_init.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!|| inverted_group_init ../starter/source/model/sets/inverted_group_init.F
25!||--- called by ------------------------------------------------------
26!|| compute_connect_partelm ../starter/source/model/sets/compute_connect_partelm.F
27!|| lectur ../starter/source/starter/lectur.F
28!||--- uses -----------------------------------------------------
29!|| inverted_group_mod ../starter/share/modules1/inverted_group_mod.F
30!||====================================================================
31 SUBROUTINE inverted_group_init(MODE,INV_GROUP,NUMSPH)
32!$COMMENT
33! INVERTED_GROUP_INIT description
34! initialization of INV_GROUP structure (number of elm & part)
35!
36! INVERTED_GROUP_INIT organization :
37! 2 different modes :
38! - MODE = 0 --> first initialization
39! - MODE = 1 --> recomputation of the inverted connectivity
40! the size does not change, the structure was already allocated,
41! flush to 0 the array
42!$ENDCOMMENT
43C-----------------------------------------------
44C M o d u l e s
45C-----------------------------------------------
47C-----------------------------------------------
48C I m p l i c i t T y p e s
49C-----------------------------------------------
50#include "implicit_f.inc"
51C-----------------------------------------------
52C C o m m o n B l o c k s
53C-----------------------------------------------
54#include "com04_c.inc"
55C-----------------------------------------------
56C D u m m y A r g u m e n t s
57C-----------------------------------------------
58 INTEGER, INTENT(in) :: MODE
59 TYPE(invertgroup_struct_) :: INV_GROUP
60 INTEGER, INTENT(IN) :: NUMSPH
61C-----------------------------------------------
62C L o c a l V a r i a b l e s
63C-----------------------------------------------
64 INTEGER :: MY_SIZE
65! ----------------------------------------
66 ! ---------------
67 ! first initialization
68 IF(mode==0) THEN
69 inv_group%IS_USED = .false.
70 inv_group%ALREADY_ALLOC = .false.
71 inv_group%ALREADY_DONE = .false.
72
73 inv_group%SIZE_INDPART = npart + 1
74 inv_group%SIZE_S = numels
75 inv_group%SIZE_Q = numelq
76 inv_group%SIZE_C = numelc
77 inv_group%SIZE_T = numelt
78 inv_group%SIZE_P = numelp
79 inv_group%SIZE_TG = numeltg
80 inv_group%SIZE_TRIA= numeltria
81 inv_group%SIZE_R = numelr
82 inv_group%SIZE_SPH = numsph
83 ELSE
84 ! ---------------
85 ! recompute the inverted connectivity : flush to 0
86 inv_group%IS_USED = .true.
87 my_size = inv_group%SIZE_INDPART
88
89 inv_group%INDPARTS( 1:my_size ) = 0
90 inv_group%INDPARTQ( 1:my_size ) = 0
91 inv_group%INDPARTC( 1:my_size ) = 0
92 inv_group%INDPARTT( 1:my_size ) = 0
93 inv_group%INDPARTP( 1:my_size ) = 0
94 inv_group%INDPARTTG( 1:my_size ) = 0
95 inv_group%INDPARTTRIA( 1:my_size ) = 0
96 inv_group%INDPARTR( 1:my_size ) = 0
97 inv_group%INDPARTSPH( 1:my_size ) = 0
98
99 my_size = inv_group%SIZE_S
100 inv_group%PARTS( 1:my_size ) = 0
101
102 my_size = inv_group%SIZE_Q
103 inv_group%PARTQ( 1:my_size ) = 0
104
105 my_size = inv_group%SIZE_T
106 inv_group%PARTT( 1:my_size ) = 0
107
108 my_size = inv_group%SIZE_P
109 inv_group%PARTP( 1:my_size ) = 0
110
111 my_size = inv_group%SIZE_TG
112 inv_group%PARTTG( 1:my_size ) = 0
113
114 my_size = inv_group%SIZE_TRIA
115 inv_group%PARTTRIA( 1:my_size ) = 0
116
117 my_size = inv_group%SIZE_R
118 inv_group%PARTR( 1:my_size ) = 0
119
120 my_size = inv_group%SIZE_SPH
121 inv_group%PARTSPH( 1:my_size ) = 0
122 ! ---------------
123 ENDIF
124! ----------------------------------------
125 RETURN
126 END SUBROUTINE inverted_group_init
subroutine inverted_group_init(mode, inv_group, numsph)