OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
alloc_subset_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_subset_str ../engine/source/groups/alloc_subset_str.F
25!||--- called by ------------------------------------------------------
26!|| subset_ini ../engine/source/groups/subset_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_subset_str(SUBSET)
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 "com04_c.inc"
48#include "scr17_c.inc"
49#include "tabsiz_c.inc"
50C-----------------------------------------------
51C D u m m y A r g u m e n t s
52C-----------------------------------------------
53 TYPE (SUBSET_) , DIMENSION(NSUBS) :: SUBSET
54C-----------------------------------------------
55C L o c a l V a r i a b l e s
56C-----------------------------------------------
57 INTEGER I,J,ID,ISU,NCHILD,NBPART,NBTPART,ICHILD,IPART,IPARTTOT,
58 . PARENT,LEVEL,TH_PART,L_SUB,ERR,ITITLE(LTITR),THIAD,IVARTH,
59 . LEN
60 CHARACTER(LEN=LTITR) :: TITR,NEW_TITLE(NSUBS)
61 INTEGER, ALLOCATABLE, DIMENSION (:) :: ISUB
62!=======================================================================
63 DO isu=1,nsubs
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(isu) = titr(1:len)
71 ENDDO ! DO ISU=1,NSUBS
72!!------ Allocate and read subset data from restart
73 ALLOCATE (isub(lensubs) ,stat=err)
74 CALL read_i_c(isub, lensubs)
75!=======================================================================
76!
77 l_sub = 0
78!
79 DO isu=1,nsubs
80 id = isub(l_sub+1)
81 l_sub = l_sub+1
82 nchild = isub(l_sub+1)
83 l_sub = l_sub+1
84 nbpart = isub(l_sub+1)
85 l_sub = l_sub+1
86 nbtpart = isub(l_sub+1)
87 l_sub = l_sub+1
88 parent = isub(l_sub+1)
89 l_sub = l_sub+1
90 level = isub(l_sub+1)
91 l_sub = l_sub+1
92 thiad = isub(l_sub+1)
93 l_sub = l_sub+1
94!! TH_FLAG = ISUB(L_SUB+1)
95!! L_SUB = L_SUB+1
96!! ICHAR(TITR) = ISUB(L_SUB+1)
97!! L_SUB = L_SUB+1
98!---
99 subset(isu)%ID = id
100 subset(isu)%NCHILD = nchild
101 subset(isu)%NPART = nbpart
102 subset(isu)%NTPART = nbtpart
103 subset(isu)%PARENT = parent
104 subset(isu)%LEVEL = level
105 subset(isu)%THIAD = thiad
106!! SUBSET(ISU)%TH_FLAG = TH_FLAG
107 subset(isu)%TITLE = new_title(isu)
108 ALLOCATE(subset(isu)%CHILD(nchild))
109 ALLOCATE(subset(isu)%PART(nbpart))
110 ALLOCATE(subset(isu)%TPART(nbtpart))
111 ALLOCATE(subset(isu)%NVARTH(10)) ! /iTH (9) + /TH (1) -> SUBSET(I)%NVARTH(ITHFLAG)
112!---
113! NOMBRE DE SUBSETS FILS
114 DO j=1,nchild
115 ichild = isub(l_sub+1)
116 l_sub = l_sub+1
117 subset(isu)%CHILD(j) = ichild
118 ENDDO
119! NOMBRE DE PARTS FILLES
120 DO j=1,nbpart
121 ipart = isub(l_sub+1)
122 l_sub = l_sub+1
123 subset(isu)%PART(j) = ipart
124 ENDDO
125! NOMBRE TOTAL DE PARTS (DESCENDANCE)
126 DO j=1,nbtpart
127 iparttot = isub(l_sub+1)
128 l_sub = l_sub+1
129 subset(isu)%TPART(j) = iparttot
130 ENDDO
131!---
132! - TIME HISTORY - /iTH (9) + /TH (1)
133!---
134 DO j=1,10
135 ivarth = isub(l_sub+1)
136 l_sub = l_sub+1
137 subset(isu)%NVARTH(j) = ivarth
138 ENDDO
139 ENDDO ! DO ISU=1,NSUBS
140!---------
141 DEALLOCATE (isub)
142!---------
143 RETURN
144 END
subroutine alloc_subset_str(subset)
subroutine fretitl2(titr, iasc, l)
Definition freform.F:804
void read_i_c(int *w, int *len)