OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
lecrefsta.F File Reference
#include "implicit_f.inc"
#include "scr03_c.inc"
#include "scr17_c.inc"
#include "com04_c.inc"
#include "r2r_c.inc"
#include "units_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine lecrefsta (itabm1, unitab, ixc, ixtg, ixs, xyzref, xrefc, xreftg, xrefs, tagnod, iddlevel, tagref)

Function/Subroutine Documentation

◆ lecrefsta()

subroutine lecrefsta ( integer, dimension(*) itabm1,
type (unit_type_), intent(in) unitab,
integer, dimension(nixc,*) ixc,
integer, dimension(nixtg,*) ixtg,
integer, dimension(nixs,*) ixs,
xyzref,
xrefc,
xreftg,
xrefs,
integer, dimension(*) tagnod,
integer iddlevel,
integer, dimension(*) tagref )

Definition at line 36 of file lecrefsta.F.

39C-----------------------------------------------
40C M o d u l e s
41C-----------------------------------------------
42 USE reader_old_mod , ONLY : irec, nslash
43 USE unitab_mod
44 USE message_mod
45 USE refsta_mod , ONLY : rs0_fmt
46 USE reader_old_mod , ONLY : line
47C-----------------------------------------------
48C I m p l i c i t T y p e s
49C-----------------------------------------------
50#include "implicit_f.inc"
51C-----------------------------------------------
52C G l o b a l P a r a m e t e r s
53C-----------------------------------------------
54#include "scr03_c.inc"
55#include "scr17_c.inc"
56#include "com04_c.inc"
57#include "r2r_c.inc"
58C-----------------------------------------------
59C C o m m o n B l o c k s
60C-----------------------------------------------
61#include "units_c.inc"
62C-----------------------------------------------
63C D u m m y A r g u m e n t s
64C-----------------------------------------------
65 TYPE (UNIT_TYPE_),INTENT(IN) ::UNITAB
66 INTEGER ITABM1(*),IXC(NIXC,*),IXTG(NIXTG,*),IXS(NIXS,*),TAGNOD(*)
67 INTEGER IDDLEVEL,TAGREF(*)
68 my_real xrefc(4,3,*),xreftg(3,3,*),xrefs(8,3,*),xyzref(3,*)
69C-----------------------------------------------
70C L o c a l V a r i a b l e s
71C-----------------------------------------------
72 INTEGER I,J,IE,IN,ID,NN,IFLAGUNIT,NNOD
73 my_real xx,yy,zz,fac_l
74 CHARACTER MESS*40
75 DATA mess/'REFSTA'/
76C-----------------------------------------------
77C E x t e r n a l F u n c t i o n s
78C-----------------------------------------------
79 INTEGER USR2SYS,R2R_SYS
80C=======================================================================
81C--------------------------------------
82C LECTURE DES NOEUDS ETAT DE REFERENCE
83C--------------------------------------
84 IF(iddlevel == 0) THEN
85 WRITE(iout,1000)
86 IF(ipri >= 5) WRITE(iout,'(8X,A7,3(18X,A2))') 'NODE-ID',' X',' Y',' Z'
87 ENDIF
88 nnod=0
89 DO
90 READ(iin6,fmt='(A)',END=799,ERR=798)line
91 IF (line(1:1) == '#') cycle
92 IF (rs0_fmt == 1)THEN
93 READ(line,'(I8,3F16.0)', err=797) id,xx,yy,zz
94 ELSE
95 READ(line,'(I10,3F20.0)',err=797) id,xx,yy,zz
96 ENDIF
97 IF (id <= 0) cycle
98 IF (nsubdom == 0) nn = usr2sys(id,itabm1,mess,0)
99 IF (nsubdom > 0) THEN
100 nn = r2r_sys(id,itabm1,mess)
101 IF (nn == 0) cycle
102 ENDIF
103 tagref(nn) = 1
104 IF (tagnod(nn) == 0) THEN
105 nnod=nnod+1
106 IF(iddlevel == 0.AND.ipri >= 5) WRITE(iout,'(5X,I10,5X,1P3G20.13)') id,xx,yy,zz
107 xyzref(1,nn) = xx
108 xyzref(2,nn) = yy
109 xyzref(3,nn) = zz
110 ELSEIF(iddlevel == 0) THEN
111C ERROR : THIS NODE IS ALSO DEFINED IN XREF
112 CALL ancmsg(msgid=1034,
113 . msgtype=msgerror,anmode=aninfo,
114 . i1=id)
115 ENDIF
116 ENDDO
117C-------------
118 797 CONTINUE
119 CALL ancmsg(msgid=733,
120 . msgtype=msgerror,
121 . anmode=aninfo,
122 . c1=line)
123 798 CONTINUE
124 CALL ancmsg(msgid=734,
125 . msgtype=msgerror,
126 . anmode=aninfo)
127 799 CONTINUE
128 IF(iddlevel == 0.AND.ipri < 5) WRITE(iout,1010) nnod
129C-------------
130 DO ie=1,numelc
131 DO in=1,4
132 nn = ixc(in+1,ie)
133 IF (tagnod(nn) == 0)THEN
134 xrefc(in,1,ie) = xyzref(1,nn)
135 xrefc(in,2,ie) = xyzref(2,nn)
136 xrefc(in,3,ie) = xyzref(3,nn)
137 ENDIF
138 ENDDO
139 ENDDO
140 DO ie=1,numeltg
141 DO in=1,3
142 nn = ixtg(in+1,ie)
143 IF (tagnod(nn) == 0)THEN
144 xreftg(in,1,ie) = xyzref(1,nn)
145 xreftg(in,2,ie) = xyzref(2,nn)
146 xreftg(in,3,ie) = xyzref(3,nn)
147 ENDIF
148 ENDDO
149 ENDDO
150 DO ie=1,numels8
151 DO in=1,8
152 nn = ixs(in+1,ie)
153 IF (tagnod(nn) == 0)THEN
154 xrefs(in,1,ie) = xyzref(1,nn)
155 xrefs(in,2,ie) = xyzref(2,nn)
156 xrefs(in,3,ie) = xyzref(3,nn)
157 ENDIF
158 ENDDO
159 ENDDO
160C-----------
161 RETURN
162 1000 FORMAT(//
163 & 5x,' REFERENCE STATE (REFSTA) ',/
164 & 5x,' ------------------------ ',/)
165 1010 FORMAT(
166 & 5x,'NUMBER OF NODES . . . . . . . . =',i10)
#define my_real
Definition cppsort.cpp:32
initmumps id
integer rs0_fmt
Definition refsta_mod.F:38
integer function r2r_sys(iu, itabm1, mess)
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
integer function usr2sys(iu, itabm1, mess, id)
Definition sysfus.F:160
subroutine tagnod(ix, nix, nix1, nix2, numel, iparte, tagbuf, npart)
Definition tagnod.F:29