OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
lecrefsta.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!|| lecrefsta ../starter/source/loads/reference_state/refsta/lecrefsta.F
25!||--- called by ------------------------------------------------------
26!|| lectur ../starter/source/starter/lectur.F
27!||--- calls -----------------------------------------------------
28!|| ancmsg ../starter/source/output/message/message.F
29!|| r2r_sys ../starter/source/coupling/rad2rad/routines_r2r.F
30!|| usr2sys ../starter/source/system/sysfus.F
31!||--- uses -----------------------------------------------------
32!|| message_mod ../starter/share/message_module/message_mod.F
33!|| reader_old_mod ../starter/share/modules1/reader_old_mod.F90
34!|| refsta_mod ../starter/share/modules1/refsta_mod.F
35!||====================================================================
36 SUBROUTINE lecrefsta(ITABM1 ,UNITAB,IXC ,IXTG ,IXS ,
37 . XYZREF ,XREFC ,XREFTG,XREFS ,TAGNOD,
38 . IDDLEVEL,TAGREF )
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)
167 END SUBROUTINE lecrefsta
#define my_real
Definition cppsort.cpp:32
subroutine lecrefsta(itabm1, unitab, ixc, ixtg, ixs, xyzref, xrefc, xreftg, xrefs, tagnod, iddlevel, tagref)
Definition lecrefsta.F:39
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