OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
quad_surface_buffer.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!|| quad_surface_buffer ../starter/source/model/sets/quad_surface_buffer.F
25!||--- called by ------------------------------------------------------
26!|| surface_buffer ../starter/source/model/sets/surface_buffer.F
27!||--- calls -----------------------------------------------------
28!|| surf_segment ../starter/source/model/sets/solid_surface_buffer.F
29!||--- uses -----------------------------------------------------
30!||====================================================================
32 . IXQ ,IAD_SURF ,BUFTMPSURF ,NSEG ,KNOD2ELQ ,
33 . NOD2ELQ ,IEXT ,X ,CLAUSE)
34C-----------------------------------------------
35C M o d u l e s
36C-----------------------------------------------
37 USE setdef_mod
38C-----------------------------------------------
39C I m p l i c i t T y p e s
40C-----------------------------------------------
41#include "implicit_f.inc"
42#include "com04_c.inc"
43#include "com01_c.inc"
44C-----------------------------------------------
45C D u m m y A r g u m e n t s
46C-----------------------------------------------
47 INTEGER IXQ(NIXQ,*),KNOD2ELQ(*),NOD2ELQ(*),BUFTMPSURF(*)
48 INTEGER IEXT,IAD_SURF
49 INTEGER, INTENT(INOUT) :: NSEG
51 . x(3,*)
52!
53 TYPE (SET_) :: CLAUSE
54C-----------------------------------------------
55C L o c a l V a r i a b l e s
56C-----------------------------------------------
57 INTEGER J,JQ,JJ,K,NQQ,N1,N2,ISEG,KK,KQ,N,L1,L2,L,TRUEAXE,NQQ1,NQQ2
58 INTEGER NODTAG(4),LINES(2,4),NQ(4)
59 DATA lines/1,2,
60 . 2,3,
61 . 3,4,
62 . 4,1/
64 . y1,z1,y2,z2,y3,z3,y4,z4,
65 . yg,zg,pvect,psca,dy,dz,ny,nz
66C=======================================================================
67C
68 IF(iext==1)THEN
69C
70C External surface only.
71 DO j=1,clause%NB_QUAD
72 jq = clause%QUAD(j)
73 nodtag(1:4)=1
74c NQ(N) = IXQ(JJ-1,JQ)
75 DO l=1,4
76 nq(l) = ixq(l+1,jq)
77 l1 = lines(1,l)
78 l2 = lines(2,l)
79 nqq1 = ixq(l1+1,jq)
80 nqq2 = ixq(l2+1,jq)
81 DO k=knod2elq(nqq1)+1,knod2elq(nqq1+1)
82 kq=nod2elq(k)
83 IF (kq==jq .OR. kq > numelq) cycle
84 IF (clause%QUAD(kq)==0) cycle
85 DO kk=1,4
86 IF (ixq(lines(1,kk)+1,kq)==nqq1.AND.ixq(lines(2,kk)+1,kq)==nqq2) THEN
87 nodtag(l)=0
88 ELSEIF (ixq(lines(1,kk)+1,kq)==nqq2.AND.ixq(lines(2,kk)+1,kq)==nqq1) THEN
89 nodtag(l)=0
90 ENDIF
91 ENDDO
92 ENDDO
93 ENDDO ! DO L=1,4
94C looks for the center of elements to check normal ext
95 y1 = x(2,nq(1))
96 z1 = x(3,nq(1))
97c
98 y2 = x(2,nq(2))
99 z2 = x(3,nq(2))
100c
101 y3 = x(2,nq(3))
102 z3 = x(3,nq(3))
103c
104 y4 = x(2,nq(4))
105 z4 = x(3,nq(4))
106c
107 yg = (y1+y2+y3+y4)/four
108 zg = (z1+z2+z3+z4)/four
109
110 DO l=1,4
111 l1 = lines(1,l)
112 l2 = lines(2,l)
113 trueaxe= 1
114 n1 = nq(l1)
115 n2 = nq(l2)
116 IF (n2d==1.AND.x(2,n1)<=em10.AND.x(2,n2)<=em10) THEN ! Case Axi omit nodes of revolution axe z ( y=0)
117 trueaxe= 0
118 ENDIF
119
120 IF (trueaxe==1) THEN
121 IF (nodtag(l)==1) THEN ! nodes of external lines
122 nseg=nseg+1
123C normal computation
124 dy = x(2,n2)-x(2,n1)
125 dz = x(3,n2)-x(3,n1)
126 ny = -dz
127 nz = dy
128 pvect = dy*dz
129 IF (pvect<zero) THEN
130 ny = dz
131 nz = -dy
132 ENDIF
133C check external normal
134 psca = ny*(y1-yg)+nz*(z1-zg)
135 iseg = nseg
136 IF (psca<=zero) THEN
137 CALL surf_segment(n1 ,n2 ,0 ,0 ,jq,
138 . buftmpsurf ,iad_surf ,2 )
139 ELSE
140 CALL surf_segment(n2 ,n1 ,0 ,0 ,jq,
141 . buftmpsurf ,iad_surf ,2 )
142 ENDIF ! IF (PSCA<=ZERO)
143
144 ENDIF
145
146 ENDIF
147
148 ENDDO
149
150
151 ENDDO
152 ENDIF
153C-----------
154 RETURN
155 END
#define my_real
Definition cppsort.cpp:32
subroutine quad_surface_buffer(ixq, iad_surf, buftmpsurf, nseg, knod2elq, nod2elq, iext, x, clause)
subroutine surf_segment(n1, n2, n3, n4, elem, buftmpsurf, iad_surf, eltyp)