OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
set_admesh.F File Reference
#include "implicit_f.inc"
#include "param_c.inc"
#include "com04_c.inc"
#include "scr17_c.inc"
#include "units_c.inc"
#include "remesh_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine set_admesh (ipart, ipadmesh, padmesh, unitab, lsubmodel)

Function/Subroutine Documentation

◆ set_admesh()

subroutine set_admesh ( integer, dimension(lipart1,*) ipart,
integer, dimension(kipadmesh,*) ipadmesh,
padmesh,
type (unit_type_), intent(in) unitab,
type(submodel_data), dimension(*) lsubmodel )

Definition at line 39 of file set_admesh.F.

40C============================================================================
41C M o d u l e s
42C-----------------------------------------------
43 USE message_mod
45 USE submodel_mod
46 USE unitab_mod
48C----------------------------------------------------------
49C-----------------------------------------------
50C I m p l i c i t T y p e s
51C-----------------------------------------------
52#include "implicit_f.inc"
53C-----------------------------------------------
54C C o m m o n B l o c k s
55C-----------------------------------------------
56#include "param_c.inc"
57#include "com04_c.inc"
58#include "scr17_c.inc"
59#include "units_c.inc"
60#include "remesh_c.inc"
61C-----------------------------------------------
62C D u m m y A r g u m e n t s
63C-----------------------------------------------
64 INTEGER IPART(LIPART1,*), IPADMESH(KIPADMESH,*)
65C REAL
67 . padmesh(kpadmesh,*)
68 TYPE(SUBMODEL_DATA) LSUBMODEL(*)
69 TYPE (UNIT_TYPE_),INTENT(IN) ::UNITAB
70C-----------------------------------------------
71C L o c a l V a r i a b l e s
72C-----------------------------------------------
73 INTEGER ID, N,IP,I,J,INILEV,NPART_ADM,ID_IP
74 my_real angl,angldegr,thkerr
75 CHARACTER MESS*40
76 CHARACTER(LEN=NCHARTITLE) :: TITR
77 CHARACTER(LEN=NCHARKEY) :: KEY,KEY2
78
79 LOGICAL IS_AVAILABLE
80C-----------------------------------------------
81 DATA mess /'OPTIONS FOR ADAPTIVE MESHING DEFINITION '/
82C-----------------------------------------------
83 WRITE(iout,1000)
84C------
85C--------------------------------------------------
86C READING /ADMESH/GLOBAL
87C--------------------------------------------------
88
89C--------* START BROWSING MODEL ADMESH OPTIONS *------
90C
91 CALL hm_option_start('/ADMESH/GLOBAL')
92
93 DO n =1,nadmeshg
94 titr = ''
95
96 CALL hm_option_read_key(lsubmodel,
97 . option_titr = titr,
98 . keyword2 = key,
99 . keyword3 = key2)
100
101C
102 is_available = .false.
103
104 CALL hm_get_intv('LEVEL',levelmax,is_available,lsubmodel)
105 CALL hm_get_intv('Iadmrule',iadmrule,is_available,lsubmodel)
106 CALL hm_get_intv('Istatcnd',istatcnd,is_available,lsubmodel)
107C
108C--------* EXTRACT DATAS (REAL VALUES) *------
109C
110 CALL hm_get_floatv('Tdelay',dtadmesh,is_available,lsubmodel,unitab)
111C
112
113 ENDDO
114C------
115
116 WRITE(iout,1100) levelmax,iadmrule,dtadmesh,istatcnd
117C------
118 WRITE(iout,1200)
119
120C--------------------------------------------------
121C READING /ADMESH/SET
122C--------------------------------------------------
123
124 CALL hm_option_start('/ADMESH/SET')
125
126 DO n =1,nadmeshset
127 titr = ''
128
129 CALL hm_option_read_key(lsubmodel,
130 . option_id = id,
131 . option_titr = titr,
132 . keyword2 = key)
133
134C
135 is_available = .false.
136
137 CALL hm_get_intv('LEVEL',inilev,is_available,lsubmodel)
138 CALL hm_get_intv('NIP',npart_adm,is_available,lsubmodel)
139C
140C--------* EXTRACT DATAS (REAL VALUES) *------
141C
142 CALL hm_get_floatv('ANGLE2',angldegr,is_available,lsubmodel,unitab)
143 CALL hm_get_floatv('Thkerr',thkerr,is_available,lsubmodel,unitab)
144C
145C
146 IF(angldegr <= zero .OR.angldegr >= hundred80)THEN
147 CALL ancmsg(msgid=649,
148 . msgtype=msgerror,
149 . anmode=aninfo,
150 . i1=id,
151 . c1=titr)
152 END IF
153 angl=angldegr*pi/hundred80
154C
155C pour creer les structures LSH4UPL, PSH4UPL, LSH3UPL, PSH3UPL
156 IF(thkerr > zero) iadmerrt=1
157 IF(thkerr == zero)thkerr=ep30
158C
159C
160 DO i=1,npart_adm
161
162 CALL hm_get_int_array_index('PartIds1',id_ip,i,is_available,lsubmodel)
163
164 IF(id_ip/=0)THEN
165 ip=0
166 DO j=1,npart
167 IF(ipart(4,j)==id_ip)THEN
168 ip=j
169 GOTO 50
170 END IF
171 END DO
172 50 CONTINUE
173C
174 IF(ip/=0)THEN
175 IF(ipart(10,ip)/=0)THEN
176 CALL ancmsg(msgid=644,
177 . msgtype=msgerror,
178 . anmode=aninfo,
179 . i1=ipart(4,ip))
180 END IF
181 ipart(10,ip) =levelmax
182 ipadmesh(1,ip)=min(inilev,levelmax)
183 padmesh(1,ip) =cos(angl)
184 padmesh(2,ip) =thkerr
185
186 WRITE(iout,1250) ipart(4,ip),
187 . ipadmesh(1,ip),
188 . angldegr,thkerr
189
190 ELSE
191 CALL ancmsg(msgid=646,
192 . msgtype=msgerror,
193 . anmode=aninfo,
194 . i1=id,
195 . c1=titr,
196 . i2=id_ip)
197 END IF
198 END IF
199
200 ENDDO
201
202 ENDDO
203C
204
205 RETURN
206C-------------------------------------
207
208 1000 FORMAT( /1x,' ADAPTIVE MESHING ' /
209 . 1x,' -------------------- '// )
210 1100 FORMAT(//
211 . ' GLOBAL PARAMETERS FOR ADAPTIVE MESHING ' //
212 . ' ====================================== ' //
213 . ' NUMBER OF MAXIMUM LEVELS . . . . . . . . ',i5/,
214 . ' TWO TO ONE ADAPTIVE RULE (0:NO/1:YES) . . ',i5/,
215 . ' TIME BETWEEN 2 CHECKS FOR ADAPTATION. . . ',1pg20.13/,
216 . ' TIME STEP BASED ON THE COARSE MESH (0:NO/1:YES). . ',i5)
217 1200 FORMAT(//
218 . ' SETTINGS PER PART FOR ADAPTIVE MESHING ' //
219 . ' ====================================== ' //)
220 1250 FORMAT(
221 . ' part id . . . . . . . . . . . . . . . . ',I5/,
222 . ' initial number of levels . . . . . . . . ',I5/,
223 . ' angle criteria . . . . . . . . . . . . . ',1PG20.13/,
224 . ' criteria on thickness error . . . . . . . ',1PG20.13/)
225 RETURN
#define my_real
Definition cppsort.cpp:32
subroutine hm_get_floatv(name, rval, is_available, lsubmodel, unitab)
subroutine hm_get_int_array_index(name, ival, index, is_available, lsubmodel)
subroutine hm_get_intv(name, ival, is_available, lsubmodel)
subroutine hm_option_start(entity_type)
#define min(a, b)
Definition macros.h:20
initmumps id
integer, parameter nchartitle
integer, parameter ncharkey
subroutine ancmsg(msgid, msgtype, anmode, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, r1, r2, r3, r4, r5, r6, r7, r8, r9, c1, c2, c3, c4, c5, c6, c7, c8, c9, prmode)
Definition message.F:889