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