OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
pornod.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!|| pornod ../starter/source/ale/pornod.F
25!||--- called by ------------------------------------------------------
26!|| lectur ../starter/source/starter/lectur.F
27!||--- calls -----------------------------------------------------
28!|| ancmsg ../starter/source/output/message/message.F
29!|| fretitl2 ../starter/source/starter/freform.F
30!|| ifrontplus ../starter/source/spmd/node/frontplus.F
31!||--- uses -----------------------------------------------------
32!|| message_mod ../starter/share/message_module/message_mod.f
33!||====================================================================
34 SUBROUTINE pornod(GEO ,IXS ,IXQ ,NODPOR ,ICODE ,ITAB ,NPBY ,LPBY ,IGEO)
35C-----------------------------------------------
36C D e s c r i p t i o n
37C-----------------------------------------------
38C This subroutine is marking and storing nodes related to porous option
39C-----------------------------------------------
40C M o d u l e s
41C-----------------------------------------------
42 USE message_mod
44C-----------------------------------------------
45C I m p l i c i t T y p e s
46C-----------------------------------------------
47#include "implicit_f.inc"
48C-----------------------------------------------
49C G l o b a l P a r a m e t e r s
50C-----------------------------------------------
51#include "param_c.inc"
52#include "com01_c.inc"
53#include "com04_c.inc"
54#include "scr17_c.inc"
55C-----------------------------------------------
56C D u m m y A r g u m e n t s
57C-----------------------------------------------
58 INTEGER,INTENT(IN) :: IXS(NIXS,NUMELS),IXQ(NIXQ,NUMELQ),IGEO(NPROPGI,NUMGEO)
59 INTEGER,INTENT(IN) :: ICODE(NUMNOD),ITAB(NUMNOD),NPBY(NNPBY,*),LPBY(*)
60 INTEGER,INTENT(INOUT) :: NODPOR(*)
61 my_real,INTENT(INOUT) :: geo(npropg,numgeo)
62C-----------------------------------------------
63C L o c a l V a r i a b l e s
64C-----------------------------------------------
65 INTEGER, DIMENSION(NUMNOD) :: ITAG
66 INTEGER IG,N,I,J,K,IC,IC1,IC2,IC3,IC4,JWARN,IRB,KRB,P
67 INTEGER, DIMENSION(:,:),ALLOCATABLE :: INDEX
68 INTEGER IWORK(70000),IT
69 CHARACTER(len=nchartitle) :: TITR
70C-----------------------------------------------
71C S o u r c e L i n e s
72C-----------------------------------------------
73 !--------------------!
74 ! TAGGING !
75 !--------------------!
76 numpor=0
77 DO i=1,numnod
78 itag(i)=0
79 END DO
80C-----------------------------------------------
81 DO ig=1,numgeo
82 IF(int(geo(12,ig)) /= 15)cycle !IG
83 IF(n2d == 0)THEN
84 DO i=1,numels
85 IF(ixs(10,i) /= ig)cycle !I
86 DO j=2,9
87 IF(itag(ixs(j,i)) == 0)itag(ixs(j,i))=ig
88 END DO !J=2,9
89 END DO ! I=1,NUMELS
90 ELSE
91 DO i=1,numelq
92 IF(ixq(6,i) /= ig)cycle !I
93 DO j=2,5
94 IF(itag(ixq(j,i)) == 0)itag(ixq(j,i))=ig
95 END DO ! J=2,5
96 END DO !I=1,NUMELQ
97 ENDIF
98
99 !--------------------!
100 ! COUNT AND STORE !
101 !--------------------!
102 n=0
103 jwarn=0
104 DO i=1,numnod
105 IF(itag(i) /= ig)cycle !I
106 ic=icode(i)
107 ic1=ic/512
108 ic2=(ic-512*ic1)/64
109 ic3=(ic-512*ic1-64*ic2)/8
110 ic4=ic-512*ic1-64*ic2-8*ic3
111 IF(n2d == 0)THEN
112 IF(ic4 == 7)cycle !I
113 ELSE
114 IF(ic4 >= 6)cycle !I
115 ENDIF
116 IF(int(geo(30,ig)) /= 0 .AND. ic1 /= 0)THEN
117 jwarn = jwarn+1
118 CALL fretitl2(titr,igeo(npropgi-ltitr+1,ig),ltitr)
119 CALL ancmsg(msgid=358,msgtype=msgwarning,anmode=aninfo_blind_2,i1=igeo(1,ig),c1=titr,i2=itab(i))
120 ENDIF
121 n=n+1
122 nodpor(numpor+n)=i
123 END DO !I=1,NUMNOD
124
125 !---------------------------!
126 ! Sorting nodes by porosity !
127 ! (spmd order) !
128 !---------------------------!
129 ALLOCATE(index(n,3))
130 DO i=1,n
131 index(i,3)=nodpor(numpor+i)
132 ENDDO
133 IF(n > 0) CALL my_orders(0,iwork,index(1,3),index,n,1)
134 DO i=1,n
135 it = index(i,1)
136 nodpor(numpor+i)=index(it,3)
137 ENDDO
138 DEALLOCATE(index)
139 !-----------------------------------------
140 !WARNING HONEYCOMB POROUS MEDIUM PID=',IG
141 !-----------------------------------------
142 IF(jwarn > 0) THEN
143 CALL fretitl2(titr,igeo(npropgi-ltitr+1,ig),ltitr)
144 CALL ancmsg(msgid=359,msgtype=msgwarning,anmode=aninfo,i1=igeo(1,ig),c1=titr,i2=jwarn)
145 ENDIF
146 geo(31,ig)=n+.1
147 numpor=numpor+n
148 irb=int(geo(29,ig))
149 IF(irb /= 0)THEN
150 k=1
151 DO krb=1,nrbykin
152 IF(npby(1,krb) == irb)THEN
153 geo(33,ig) = krb+ em01
154 geo(34,ig) = lpby(k)+em01
155 ENDIF
156 k=k+npby(2,krb)
157 END DO !KRB=1,NRBYKIN
158 IF(geo(33,ig) == zero)THEN
159 geo(29,ig)=em01
160 CALL fretitl2(titr,igeo(npropgi-ltitr+1,ig),ltitr)
161 CALL ancmsg(msgid=360,msgtype=msgwarning,anmode=aninfo_blind_1,i1=igeo(1,ig),c1=titr,i2=irb)
162 ELSE
163 ! main node RB replicate on all procs for SPMD calculation of porosity
164 DO p = 1, nspmd
165 CALL ifrontplus(irb,p)
166 ENDDO
167 ENDIF !IF (GEO(33,IG) == ZERO)
168 ENDIF !IF(IRB /= 0)
169 END DO !IG=1,NUMGEO
170C-----------------------------------------------
171 RETURN
172 END
#define my_real
Definition cppsort.cpp:32
subroutine ifrontplus(n, p)
Definition frontplus.F:100
void my_orders(int *mode, int *iwork, int *data, int *index, int *n, int *irecl)
Definition my_orders.c:82
integer, parameter nchartitle
subroutine pornod(geo, ixs, ixq, nodpor, icode, itab, npby, lpby, igeo)
Definition pornod.F:35
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