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