OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
geom.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!|| geom ../engine/source/ale/alemuscl/geom.F
25!||--- called by ------------------------------------------------------
26!|| ale51_gradient_reconstruction ../engine/source/ale/alemuscl/ale51_gradient_reconstruction.F
27!|| centroid3t ../engine/source/multifluid/centroid.F
28!||====================================================================
29 SUBROUTINE geom(A, B, C, CENTER_X,CENTER_Y,CENTER_Z, VOL)
30C-----------------------------------------------
31C I m p l i c i t T y p e s
32C-----------------------------------------------
33#include "implicit_f.inc"
34C-----------------------------------------------
35C D u m m y A r g u m e n t s
36C-----------------------------------------------
37 my_real, INTENT(IN) :: a(3), b(3), c(3)
38 my_real, INTENT(INOUT) :: center_x,center_y,center_z, vol
39C-----------------------------------------------
40C L o c a l V a r i a b l e s
41C-----------------------------------------------
42 my_real :: norm(3), ab, bc, ca
43C-----------------------------------------------
44C S o u r c e L i n e s
45C-----------------------------------------------
46
47 norm(1) = (b(2) - a(2)) * (c(3) - a(3)) - (b(3) - a(3)) * (c(2) - a(2))
48 norm(2) = (b(3) - a(3)) * (c(1) - a(1)) - (b(1) - a(1)) * (c(3) - a(3))
49 norm(3) = (b(1) - a(1)) * (c(2) - a(2)) - (b(2) - a(2)) * (c(1) - a(1))
50
51 vol = vol + dot_product(a, norm)
52
53 ab = dot_product(half * (a + b), half * (a + b))
54 bc = dot_product(half * (b + c), half * (b + c))
55 ca = dot_product(half * (c + a), half * (c + a))
56
57 center_x = center_x + norm(1) * (ab + bc + ca)
58 center_y = center_y + norm(2) * (ab + bc + ca)
59 center_z = center_z + norm(3) * (ab + bc + ca)
60
61C-----------------------------------------------
62 END SUBROUTINE geom
#define my_real
Definition cppsort.cpp:32
norm(diag(diag(diag(inv(mat))) -id.SOL), 2) % destroy mumps instance id.JOB
subroutine geom(a, b, c, center_x, center_y, center_z, vol)
Definition geom.F:30