OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
i6pen3.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/.
23C
24!||====================================================================
25!|| i6pen3 ../starter/source/interfaces/inter3d1/i6pen3.F
26!||--- called by ------------------------------------------------------
27!|| iniend ../starter/source/interfaces/inter3d1/iniend.F
28!||--- calls -----------------------------------------------------
29!|| ancmsg ../starter/source/output/message/message.F
30!|| inist3 ../starter/source/interfaces/inter3d1/inist3.F
31!||--- uses -----------------------------------------------------
32!|| format_mod ../starter/share/modules1/format_mod.F90
33!|| message_mod ../starter/share/message_module/message_mod.F
34!||====================================================================
35 SUBROUTINE i6pen3(X ,IRECT ,MSR ,NSV ,ILOC ,
36 1 IRTL ,CST ,IRTL0 ,GAP ,NSN ,
37 2 ITAB ,IWPENE ,PENI ,ICOR ,ID ,
38 3 INACTI,TITR )
39 USE message_mod
41 USE format_mod , ONLY : fmw_7i, fmw_7i_2f
42C-----------------------------------------------
43C I m p l i c i t T y p e s
44C-----------------------------------------------
45#include "implicit_f.inc"
46C-----------------------------------------------
47C C o m m o n B l o c k s
48C-----------------------------------------------
49#include "units_c.inc"
50#include "scr03_c.inc"
51C-----------------------------------------------
52C D u m m y A r g u m e n t s
53C-----------------------------------------------
54 INTEGER NSN,IWPENE,ICOR,INACTI
55 my_real GAP,PENI
56 INTEGER IRECT(4,*), MSR(*), NSV(*), ILOC(*), IRTL(*), IRTL0(*),ITAB(*)
57 my_real x(3,*), cst(2,*)
58 INTEGER ID
59 CHARACTER(LEN=NCHARTITLE)::TITR
60C-----------------------------------------------
61C L o c a l V a r i a b l e s
62C-----------------------------------------------
63 INTEGER II, I, J, K, L, JJ, NN, IER
64 my_real N1, N2, N3, PEN, ALP
65 my_real :: XX1(4), XX2(4),XX3(4),XS1,YS1,ZS1,XC,YC,ZC
66C-----------------------------------------------
67C E x t e r n a l F u n c t i o n s
68C-----------------------------------------------
69 alp = twoem2
70 DO ii=1,nsn
71 i=nsv(ii)
72 j=iloc(ii)
73 k=msr(j)
74 l=irtl(ii)
75 DO jj=1,4
76 nn=msr(irect(jj,l))
77 xx1(jj)=x(1,nn)
78 xx2(jj)=x(2,nn)
79 xx3(jj)=x(3,nn)
80 ENDDO
81 xs1=x(1,i)
82 ys1=x(2,i)
83 zs1=x(3,i)
84 CALL inist3(n1,n2,n3,cst(1,ii),cst(2,ii),ier,alp,xx1,xx2,xx3,xs1,ys1,zs1,xc,yc,zc)
85 IF(ier==-1)THEN
86 CALL ancmsg(msgid=85,
87 . msgtype=msgerror,
88 . anmode=aninfo,
89 . i1=id,
90 . c1=titr,
91 . i2=itab(i),
92 . i3=itab(k),
93 . i4=l,
94 . i5=itab(msr(irect(1,l))),
95 . i6=itab(msr(irect(2,l))),
96 . i7=itab(msr(irect(3,l))),
97 . i8=itab(msr(irect(4,l))))
98 ELSE IF(ier==1)THEN
99 IF(ipri>=1)WRITE(iout,fmt=fmw_7i)itab(i),itab(k),l,
100 . (itab(msr(irect(jj,l))),jj=1,4)
101 ELSE
102 pen = n1*(xs1-xc)+n2*(ys1-yc)+n3*(zs1-zc) - gap
103 IF (pen<=zero) irtl0(ii)=l
104 IF (pen < zero) THEN
105 peni = min(pen,peni)
106 CALL ancmsg(msgid=346,
107 . msgtype=msgwarning,
108 . anmode=aninfo_blind_2,
109 . i1=id,i2=itab(i),
110 . c1=titr,
111 . r1=pen)
112 IF (inacti == 5) THEN
113c PEN = MIN(ZERO, PEN + GAP)
114 gap = max(zero, gap + pen) ! constant gap
115 ELSEIF (inacti == 6) THEN
116c PEN = MIN(ZERO, PEN + ZEP05 * (GAP - PEN))
117 gap = max(zero, gap + pen + zep05 * (gap + pen)) ! constant gap
118 ENDIF
119 iwpene=iwpene+1
120 ENDIF
121 IF(ipri>=1)WRITE(iout,fmt=fmw_7i_2f)
122 . itab(i),itab(k),l,
123 . (itab(msr(irect(jj,l))),jj=1,4),cst(1,ii),cst(2,ii)
124 ENDIF
125 ENDDO
126 IF (icor == 0) peni = zero
127C-----------
128 RETURN
129 END
subroutine i6pen3(x, irect, msr, nsv, iloc, irtl, cst, irtl0, gap, nsn, itab, iwpene, peni, icor, id, inacti, titr)
Definition i6pen3.F:39
subroutine inist3(n1, n2, n3, ssc, ttc, ier, alp, xx1, xx2, xx3, xs1, ys1, zs1, xc, yc, zc)
Definition inist3.F:33
#define min(a, b)
Definition macros.h:20
#define max(a, b)
Definition macros.h:21
integer, parameter nchartitle
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