OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
rcheckmass.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!|| rcheckmass ../starter/source/elements/spring/rcheckmass.F
25!||--- called by ------------------------------------------------------
26!|| initia ../starter/source/elements/initia/initia.F
27!||--- calls -----------------------------------------------------
28!|| ancmsg ../starter/source/output/message/message.F
29!|| fretitl2 ../starter/source/starter/freform.F
30!||--- uses -----------------------------------------------------
31!|| message_mod ../starter/share/message_module/message_mod.F
32!||====================================================================
33 SUBROUTINE rcheckmass(
34 . IXR ,GEO ,PM ,MSR ,INR ,
35 . MS ,IN ,ITAB ,IGEO ,IPM ,
36 . UPARAM ,IPART ,IPARTR ,NPBY ,LPBY )
37C-----------------------------------------------
38C M o d u l e s
39C-----------------------------------------------
40 USE my_alloc_mod
41 USE message_mod
43 use element_mod , only : nixr
44C-----------------------------------------------
45C I m p l i c i t T y p e s
46C-----------------------------------------------
47#include "implicit_f.inc"
48C-----------------------------------------------
49C C o m m o n B l o c k s
50C-----------------------------------------------
51#include "param_c.inc"
52#include "com04_c.inc"
53#include "scr17_c.inc"
54C-----------------------------------------------
55C D u m m y A r g u m e n t s
56C-----------------------------------------------
57 INTEGER IXR(NIXR,*), ITAB(*),
58 . IGEO(NPROPGI,*),IPM(NPROPMI,*),IPART(LIPART1,*),IPARTR(*),
59 . NPBY(NNPBY,*),LPBY(*)
60C REAL
62 . geo(npropg,*),pm(npropm,*),uparam(*),msr(*),inr(*),ms(*),in(*)
63C-----------------------------------------------
64C L o c a l V a r i a b l e s
65C-----------------------------------------------
66 INTEGER I,NR,N1,N2,IPID,IGTYP,IMAT,MTN,IADBUF,IEQUI,IP,IPREV,
67 . K1,K11,K12,K13,K14,IERR2,N,M,NSL,IAD,NS,NERR
68 INTEGER WORK(70000)
69 INTEGER, ALLOCATABLE, DIMENSION(:) :: INDEX,ITRI,TAGSLV
70C REAL
72 . xkm, xcm, xkr, xcr
73 CHARACTER(LEN=NCHARTITLE)::TITL
74C-----------------------------------------------------
75C Check for springs with stiffness but no mass
76C-----------------------------------------------------
77 CALL my_alloc(index,2*numelr)
78 CALL my_alloc(itri ,numelr)
79C
80 CALL my_alloc(tagslv,numnod)
81 tagslv(1:numnod)=0
82 DO n=1,nrbykin
83 m =npby(1,n)
84 IF(npby(7,n)/=0.AND.ms(m)/=zero.AND.in(m)/=zero)THEN
85 ! RBODY is active <=> not a rigid body activated with sensor
86 ! A node may be secnd of several rbodies (cf /RBODY/ON, /RBODY/OFF)
87 ! Then an error could be written when starting the engine
88 nsl=npby(2,n)
89 iad=npby(11,n)
90 DO i=1,nsl
91 ns=lpby(iad+i)
92 tagslv(ns)=1
93 END DO
94 END IF
95 END DO
96C
97 DO i=1,numelr
98 itri(i)=ipartr(i)
99 END DO
100C
101 CALL my_orders( 0, work, itri, index, numelr , 1)
102C
103 iprev=0
104 nerr =0
105 DO i=1,numelr
106 nr=index(i)
107 ipid = ixr(1,nr)
108 igtyp = igeo(11,ipid)
109 imat = ixr(5,nr)
110 ip = ipartr(nr)
111 ierr2 = 0
112 IF(igtyp==23)THEN
113C
114 iadbuf = ipm(7,imat) - 1
115 mtn = ipm(2,imat)
116C
117 k1 = 4
118 k11 = 64
119 k12 = k11 + 6
120 k13 = k12 + 6
121 k14 = k13 + 6
122C
123 IF(mtn == 108) THEN
124 iequi = uparam(iadbuf+2)
125 n1 =ixr(2,nr)
126 n2 =ixr(3,nr)
127 IF((tagslv(n1)==0.AND.(ms(n1)==zero.OR.in(n1)==zero)).OR.
128 . (tagslv(n2)==0.AND.(ms(n2)==zero.OR.in(n2)==zero)))THEN
129
130 IF(ip/=iprev.AND.nerr/=0)THEN
131 iprev=ip
132C
133 CALL fretitl2(titl,ipart(lipart1-ltitr+1,ip),ltitr)
134 CALL ancmsg(msgid=1870,
135 . msgtype=msgerror,
136 . anmode=aninfo_blind_1,
137 . i1=ipart(4,ip),
138 . c1=titl)
139C
140C Depile messages...
141 CALL ancmsg(msgid=1871,
142 . msgtype=msgerror,
143 . anmode=aninfo_blind_1,
144 . prmod=msg_print)
145C
146 nerr = 0
147C
148 END IF
149 xkm= max(uparam(iadbuf + k11 + 1)*uparam(iadbuf + k1 + 1),
150 . uparam(iadbuf + k11 + 2)*uparam(iadbuf + k1 + 2),
151 . uparam(iadbuf + k11 + 3)*uparam(iadbuf + k1 + 3)) ! /XL(I)
152 xcm= max(uparam(iadbuf + k12 + 1),uparam(iadbuf + k12 + 2),uparam(iadbuf + k12 + 3))
153 xkr= max(uparam(iadbuf + k11 + 4)*uparam(iadbuf + k1 + 4),
154 . uparam(iadbuf + k11 + 5)*uparam(iadbuf + k1 + 5),
155 . uparam(iadbuf + k11 + 6)*uparam(iadbuf + k1 + 6)) ! /XL(I)
156 xcr= max(uparam(iadbuf + k12 + 4),uparam(iadbuf + k12 + 5),uparam(iadbuf + k12 + 6))
157 IF((tagslv(n1)==0.AND.ms(n1)==zero).OR.(tagslv(n2)==0.AND.ms(n2)==zero))THEN
158 IF(xkm/=zero.OR.xcm/=zero)ierr2=ierr2+1
159 END IF
160 IF((tagslv(n1)==0.AND.in(n1)==zero).OR.(tagslv(n2)==0.AND.in(n2)==zero))THEN
161 IF(xkr/=zero.OR.xcr/=zero.OR.(iequi/=0.AND.(xkm/=zero.OR.xcm/=zero)))ierr2=ierr2+1
162 END IF
163 END IF
164 END IF
165 END IF
166 IF(ierr2/=0)THEN
167 nerr=nerr+1
168 CALL ancmsg(msgid=1871,
169 . msgtype=msgerror,
170 . anmode=aninfo_blind_1,
171 . i1=ixr(nixr,nr),
172 . i2=itab(n1),
173 . i3=itab(n2),
174 . prmod=msg_cumu)
175 END IF
176 END DO
177C
178 CALL ancmsg(msgid=1871,
179 . msgtype=msgerror,
180 . anmode=aninfo_blind_1,
181 . prmod=msg_print)
182C
183 DEALLOCATE(index,itri,tagslv)
184C------------------------------------------
185 RETURN
186 END
#define my_real
Definition cppsort.cpp:32
#define max(a, b)
Definition macros.h:21
void my_orders(int *mode, int *iwork, int *data, int *index, int *n, int *irecl)
Definition my_orders.c:82
integer, parameter nchartitle
subroutine rcheckmass(ixr, geo, pm, msr, inr, ms, in, itab, igeo, ipm, uparam, ipart, ipartr, npby, lpby)
Definition rcheckmass.F:37
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
subroutine fretitl2(titr, iasc, l)
Definition freform.F:799