OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
alloc_group_str.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!|| alloc_group_str ../engine/source/groups/alloc_group_str.F
25!||--- called by ------------------------------------------------------
26!|| group_ini ../engine/source/groups/group_ini.F
27!||--- calls -----------------------------------------------------
28!|| fretitl2 ../engine/source/input/freform.F
29!|| read_i_c ../common_source/tools/input_output/write_routtines.c
30!||--- uses -----------------------------------------------------
31!|| groupdef_mod ../common_source/modules/groupdef_mod.F
32!|| message_mod ../engine/share/message_module/message_mod.F
33!||====================================================================
34 SUBROUTINE alloc_group_str(IGR,NGR,LENIGR)
35C-----------------------------------------------
36C M o d u l e s
37C-----------------------------------------------
38 USE message_mod
39 USE groupdef_mod
40C-----------------------------------------------
41C I m p l i c i t T y p e s
42C-----------------------------------------------
43#include "implicit_f.inc"
44C-----------------------------------------------
45C C o m m o n B l o c k s
46C-----------------------------------------------
47#include "scr17_c.inc"
48C-----------------------------------------------
49C D u m m y A r g u m e n t s
50C-----------------------------------------------
51 INTEGER NGR,LENIGR
52!
53 TYPE(group_) ,DIMENSION(NGR) :: IGR
54C-----------------------------------------------
55C L o c a l V a r i a b l e s
56C-----------------------------------------------
57 INTEGER I,J,ID,IGU,GRTYPE,SORTED,GRPGRP,
58 . LEVEL,R2R_ALL,R2R_SHARE,ENTITY,NENTITY,L_GROUP,
59 . ITITLE(LTITR),ERR,LEN
60 CHARACTER(LEN=LTITR) :: TITR,NEW_TITLE(NGR)
61 INTEGER, ALLOCATABLE, DIMENSION (:) :: IGROUP
62C-----------------------------------------------
63 DO igu=1,ngr
64 CALL read_i_c(ititle,ltitr)
65 CALL fretitl2(titr,ititle,ltitr)
66 len = 0
67 DO j=1,ltitr
68 IF (titr(j:j) /= ' ') len = j
69 ENDDO
70 new_title(igu) = titr(1:len)
71 ENDDO ! DO IGU=1,NGR
72!------ Allocate and read subset data from restart
73 ALLOCATE (igroup(lenigr) ,stat=err)
74 CALL read_i_c(igroup, lenigr)
75!=======================================================================
76!
77 l_group = 0
78!
79 DO igu=1,ngr
80 id = igroup(l_group+1)
81 l_group = l_group+1
82 nentity = igroup(l_group+1)
83 l_group = l_group+1
84 grtype = igroup(l_group+1)
85 l_group = l_group+1
86 sorted = igroup(l_group+1)
87 l_group = l_group+1
88 grpgrp = igroup(l_group+1)
89 l_group = l_group+1
90 level = igroup(l_group+1)
91 l_group = l_group+1
92! titr = new_title(igu)
93! L_GROUP = L_GROUP+1
94 r2r_all = igroup(l_group+1)
95 l_group = l_group+1
96 r2r_share = igroup(l_group+1)
97 l_group = l_group+1
98!
99! ICHAR(TITR) = IGROUP(L_GROUP+1)
100! L_GROUP = L_GROUP+1
101!---
102 igr(igu)%ID = id
103 igr(igu)%NENTITY = nentity
104 igr(igu)%GRTYPE = grtype
105 igr(igu)%SORTED = sorted
106 igr(igu)%GRPGRP = grpgrp
107 igr(igu)%LEVEL = level
108 igr(igu)%TITLE = new_title(igu)
109 igr(igu)%R2R_ALL = r2r_all
110 igr(igu)%R2R_SHARE = r2r_share
111!---
112! GROUP ENTITIES
113!
114 ALLOCATE(igr(igu)%ENTITY(nentity))
115!
116 DO j=1,nentity
117 entity = igroup(l_group+1)
118 l_group = l_group+1
119 igr(igu)%ENTITY(j) = entity
120 ENDDO
121 ENDDO ! DO IGU=1,NGR
122!---------
123 DEALLOCATE (igroup)
124!---------
125 RETURN
126 END
subroutine alloc_group_str(igr, ngr, lenigr)
subroutine fretitl2(titr, iasc, l)
Definition freform.F:804
void read_i_c(int *w, int *len)