OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
sectarea.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! SUBROUTINE SECTAREA(IXS,X,IBUF,NELE,ISOLNOD,AREA)
25!||====================================================================
26!|| sectarea ../starter/source/loads/bolt/sectarea.F
27!||--- called by ------------------------------------------------------
28!|| hm_read_preload ../starter/source/loads/general/preload/hm_read_preload.f
29!||====================================================================
30 SUBROUTINE sectarea(IXS,IXS10,X,IBUF,NELE,ISOLNOD,AREA,ITAB)
31C-----------------------------------------------
32C I m p l i c i t T y p e s
33C-----------------------------------------------
34#include "implicit_f.inc"
35C-----------------------------------------------
36C C o m m o n B l o c k s
37C-----------------------------------------------
38#include "com04_c.inc"
39C-----------------------------------------------
40C D u m m y A r g u m e n t s
41C-----------------------------------------------
42 INTEGER IXS(NIXS,*),IXS10(6,*),IBUF(2,*),ISOLNOD(*) ,ITAB(*)
43 INTEGER NELE
45 . area,x(3,*)
46C-----------------------------------------------
47C L o c a l V a r i a b l e s
48C-----------------------------------------------
49 INTEGER IE,II,I,J,IN1,IN2,IN3,IJ,I10
50 INTEGER NODE(10)
52 . x1,y1,z1,x2,y2,z2,x3,y3,z3,n3
53C=======================================================================
54
55 area = zero
56 DO ie=1,nele
57 j=0
58 ii=ibuf(1,ie)
59 node(1:10) = 0
60 IF(ii<=numels8)THEN
61 IF(isolnod(ii) == 4) THEN ! Cas du tetra4
62 DO i=0,6,2
63 IF(btest(ibuf(2,ie),i)) THEN
64 j=j+1
65 node(j)=ixs(i+2,ii)
66 ENDIF
67 ENDDO
68 ELSE IF (isolnod(ii) == 8) THEN
69 DO i=0,7
70 IF(btest(ibuf(2,ie),i)) THEN
71 j=j+1
72 node(j)=ixs(i+2,ii)
73 ENDIF
74 ENDDO
75 ENDIF
76
77 IF(j>=3)THEN
78 in1 = node(1)
79 in2 = node(2)
80 in3 = node(3)
81 x1=x(1,in1)-x(1,in2)
82 y1=x(2,in1)-x(2,in2)
83 z1=x(3,in1)-x(3,in2)
84 x2=x(1,in3)-x(1,in2)
85 y2=x(2,in3)-x(2,in2)
86 z2=x(3,in3)-x(3,in2)
87 x3=y1*z2-z1*y2
88 y3=z1*x2-z2*x1
89 z3=x1*y2-x2*y1
90 n3=x3*x3+y3*y3+z3*z3
91 area=area+half*sqrt(n3)
92 IF(j==4)THEN
93 in2 = node(4)
94 x1=x(1,in1)-x(1,in2)
95 y1=x(2,in1)-x(2,in2)
96 z1=x(3,in1)-x(3,in2)
97 x2=x(1,in3)-x(1,in2)
98 y2=x(2,in3)-x(2,in2)
99 z2=x(3,in3)-x(3,in2)
100 x3=y1*z2-z1*y2
101 y3=z1*x2-z2*x1
102 z3=x1*y2-x2*y1
103 n3=x3*x3+y3*y3+z3*z3
104 area=area+half*sqrt(n3)
105 ENDIF
106 ENDIF
107
108 ELSE
109 i10=ii-numels8
110 IF(i10<=numels10) THEN
111 !IF(ISOLNOD(II) == 10) THEN ! Cas du tetra10
112 DO i=0,6,2
113 IF(btest(ibuf(2,ie),i)) THEN
114 j=j+1
115 node(j)=ixs(i+2,ii)
116 ENDIF
117 ENDDO
118 DO i=8,13
119 IF(btest(ibuf(2,ie),i)) THEN
120 j=j+1
121 node(j)=ixs10(i-7,i10)
122 ENDIF
123 ENDDO
124
125 IF(j==6)THEN
126 in1 = node(1)
127 in2 = node(2)
128 in3 = node(3)
129 x1=x(1,in2)-x(1,in1)
130 y1=x(2,in2)-x(2,in1)
131 z1=x(3,in2)-x(3,in1)
132 x2=x(1,in3)-x(1,in1)
133 y2=x(2,in3)-x(2,in1)
134 z2=x(3,in3)-x(3,in1)
135 x3=y1*z2-z1*y2
136 y3=z1*x2-z2*x1
137 z3=x1*y2-x2*y1
138 n3=x3*x3+y3*y3+z3*z3
139 area=area+half*sqrt(n3)
140 ENDIF
141 ENDIF
142 ENDIF
143 ENDDO
144
145 RETURN
146 END
#define my_real
Definition cppsort.cpp:32
subroutine hm_read_preload(ixs, ixs10, ipreload, preload, iflag_bpreload, nstrf, sensors, unitab, x, isolnod, itab, lsubmodel)
subroutine area(d1, x, x2, y, y2, eint, stif0)
subroutine sectarea(ixs, ixs10, x, ibuf, nele, isolnod, area, itab)
Definition sectarea.F:31
program starter
Definition starter.F:39