OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
inverted_group_init.F File Reference
#include "implicit_f.inc"
#include "com04_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine inverted_group_init (mode, inv_group, numsph)

Function/Subroutine Documentation

◆ inverted_group_init()

subroutine inverted_group_init ( integer, intent(in) mode,
type(invertgroup_struct_) inv_group,
integer, intent(in) numsph )

Definition at line 31 of file inverted_group_init.F.

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