OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
alloc_surf_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_surf_str ../engine/source/groups/alloc_surf_str.f
25!||--- called by ------------------------------------------------------
26!|| surf_ini ../engine/source/groups/surf_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!|| names_and_titles_mod ../common_source/modules/names_and_titles_mod.F
34!||====================================================================
35 SUBROUTINE alloc_surf_str(IGRSURF)
36C-----------------------------------------------
37C M o d u l e s
38C-----------------------------------------------
39 USE message_mod
40 USE groupdef_mod
42C-----------------------------------------------
43C I m p l i c i t T y p e s
44C-----------------------------------------------
45#include "implicit_f.inc"
46C-----------------------------------------------
47C C o m m o n B l o c k s
48C-----------------------------------------------
49#include "com04_c.inc"
50#include "scr17_c.inc"
51#include "tabsiz_c.inc"
52C-----------------------------------------------
53C D u m m y A r g u m e n t s
54C-----------------------------------------------
55 TYPE(surf_) ,DIMENSION(NSURF) :: IGRSURF
56C-----------------------------------------------
57C L o c a l V a r i a b l e s
58C-----------------------------------------------
59 INTEGER ISU,I,J,K,L_SURF,ID,NSEG,TYPE,ID_MADYMO,IAD_BUFR,
60 . NB_MADYMO,TYPE_MADYMO,LEVEL,TH_SURF,ISH4N3N,NSEG_R2R_ALL,
61 . NSEG_R2R_SHARE,NODE,ELTYP,ELEM,ERR,ITITLE(LTITR),LEN
62 CHARACTER(LEN=NCHARTITLE) :: TITR
63 INTEGER, ALLOCATABLE, DIMENSION (:) :: ISURFI
64!
65!=======================================================================
66 DO isu=1,nsurf
67 titr(1:nchartitle) = ' '
68 CALL read_i_c(ititle,ltitr)
69 CALL fretitl2(titr,ititle,ltitr)
70 len = 0
71 DO j=1,ltitr
72 IF (titr(j:j) /= ' ') len = j
73 ENDDO
74 igrsurf(isu)%TITLE = titr
75 ENDDO ! DO ISU=1,NSURF
76!!------ Allocate and read subset data from restart
77!
78 ALLOCATE (isurfi(lenisurf) ,stat=err)
79 CALL read_i_c(isurfi, lenisurf)
80!=======================================================================
81 l_surf = 0
82!
83 DO isu=1,nsurf
84 id = isurfi(l_surf+1)
85 l_surf = l_surf+1
86 nseg = isurfi(l_surf+1)
87 l_surf = l_surf+1
88 TYPE = isurfi(l_surf+1)
89 l_surf = l_surf+1
90 id_madymo = isurfi(l_surf+1)
91 l_surf = l_surf+1
92 iad_bufr = isurfi(l_surf+1)
93 l_surf = l_surf+1
94 nb_madymo = isurfi(l_surf+1)
95 l_surf = l_surf+1
96 type_madymo = isurfi(l_surf+1)
97 l_surf = l_surf+1
98 level = isurfi(l_surf+1)
99 l_surf = l_surf+1
100 th_surf = isurfi(l_surf+1)
101 l_surf = l_surf+1
102 ish4n3n = isurfi(l_surf+1)
103 l_surf = l_surf+1
104 nseg_r2r_all = isurfi(l_surf+1)
105 l_surf = l_surf+1
106 nseg_r2r_share = isurfi(l_surf+1)
107 l_surf = l_surf+1
108!
109! ICHAR(TITR) = ISURFI(L_SURF+1)
110! L_SURF = L_SURF+1
111!---
112 igrsurf(isu)%ID = id
113 igrsurf(isu)%NSEG = nseg
114 igrsurf(isu)%TYPE = TYPE
115 igrsurf(isu)%ID_MADYMO = id_madymo
116 igrsurf(isu)%IAD_BUFR = iad_bufr
117 igrsurf(isu)%NB_MADYMO = nb_madymo
118 igrsurf(isu)%TYPE_MADYMO = type_madymo
119 igrsurf(isu)%LEVEL = level
120 igrsurf(isu)%TH_SURF = th_surf
121 igrsurf(isu)%ISH4N3N = ish4n3n
122 igrsurf(isu)%NSEG_R2R_ALL = nseg_r2r_all
123 igrsurf(isu)%NSEG_R2R_SHARE = nseg_r2r_share
124!
125! SURF ENTITIES (NODES, ELTYP, ELEM)
126!
127 ALLOCATE(igrsurf(isu)%NODES(nseg,4))
128 ALLOCATE(igrsurf(isu)%ELTYP(nseg))
129 ALLOCATE(igrsurf(isu)%ELEM(nseg))
130!
131 DO j=1,nseg
132 DO k=1,4
133 node = isurfi(l_surf+1)
134 l_surf = l_surf+1
135 igrsurf(isu)%NODES(j,k) = node
136 ENDDO
137 eltyp = isurfi(l_surf+1)
138 l_surf = l_surf+1
139 igrsurf(isu)%ELTYP(j) = eltyp
140 elem = isurfi(l_surf+1)
141 l_surf = l_surf+1
142 igrsurf(isu)%ELEM(j) = elem
143 ENDDO
144 ENDDO ! DO ISU=1,NSURF
145!---------
146 DEALLOCATE (isurfi)
147!---------
148 RETURN
149 END
subroutine alloc_surf_str(igrsurf)
integer, parameter nchartitle
subroutine fretitl2(titr, iasc, l)
Definition freform.F:804
void read_i_c(int *w, int *len)