OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
s4volume.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!|| s4volume ../engine/source/elements/solid/solide4/s4volume.F
25!||--- called by ------------------------------------------------------
26!|| eloff ../engine/source/elements/eloff.F
27!|| fixflux ../engine/source/constraints/thermic/fixflux.F
28!||====================================================================
29 SUBROUTINE s4volume(X, VOL, NEL, NC1, NC2, NC3, NC4)
30C-----------------------------------------------
31C I m p l i c i t T y p e s
32C-----------------------------------------------
33#include "implicit_f.inc"
34C-----------------------------------------------
35C G l o b a l P a r a m e t e r s
36C-----------------------------------------------
37#include "mvsiz_p.inc"
38C-----------------------------------------------
39C D u m m y A r g u m e n t s
40C-----------------------------------------------
41 INTEGER NEL, NC1(*), NC2(*), NC3(*), NC4(*)
42C
44 . x(3,*),vol(*)
45C-----------------------------------------------
46C C o m m o n B l o c k s
47C-----------------------------------------------
48C
49C-----------------------------------------------
50C L o c a l V a r i a b l e s
51C-----------------------------------------------
52 INTEGER I
53C 12
55 . x41, y41, z41, x42, y42, z42, x43, y43, z43
57 . b1(mvsiz), c1(mvsiz), d1(mvsiz),
58 . x1(mvsiz), x2(mvsiz), x3(mvsiz), x4(mvsiz),
59 . y1(mvsiz), y2(mvsiz), y3(mvsiz), y4(mvsiz),
60 . z1(mvsiz), z2(mvsiz), z3(mvsiz), z4(mvsiz)
61C---------------------------------------------------
62C NODAL COORDINATES
63C----------------------------
64 DO i=1,nel
65 x1(i)=x(1,nc1(i))
66 y1(i)=x(2,nc1(i))
67 z1(i)=x(3,nc1(i))
68 x2(i)=x(1,nc2(i))
69 y2(i)=x(2,nc2(i))
70 z2(i)=x(3,nc2(i))
71 x3(i)=x(1,nc3(i))
72 y3(i)=x(2,nc3(i))
73 z3(i)=x(3,nc3(i))
74 x4(i)=x(1,nc4(i))
75 y4(i)=x(2,nc4(i))
76 z4(i)=x(3,nc4(i))
77 ENDDO
78C----------------------------
79C TETRAHEDRON VOLUME
80C----------------------------
81 DO i=1,nel
82 x43 = x4(i) - x3(i)
83 y43 = y4(i) - y3(i)
84 z43 = z4(i) - z3(i)
85 x41 = x4(i) - x1(i)
86 y41 = y4(i) - y1(i)
87 z41 = z4(i) - z1(i)
88 x42 = x4(i) - x2(i)
89 y42 = y4(i) - y2(i)
90 z42 = z4(i) - z2(i)
91C
92 b1(i) = y43*z42 - y42*z43
93 c1(i) = z43*x42 - z42*x43
94 d1(i) = x43*y42 - x42*y43
95C
96 vol(i)= (x41*b1(i) + y41*c1(i) + z41*d1(i))*one_over_6
97 ENDDO
98C
99 RETURN
100 END
#define my_real
Definition cppsort.cpp:32
subroutine s4volume(x, vol, nel, nc1, nc2, nc3, nc4)
Definition s4volume.F:30