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