OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
geom.F File Reference
#include "implicit_f.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine geom (a, b, c, center_x, center_y, center_z, vol)

Function/Subroutine Documentation

◆ geom()

subroutine geom ( dimension(3), intent(in) a,
dimension(3), intent(in) b,
dimension(3), intent(in) c,
intent(inout) center_x,
intent(inout) center_y,
intent(inout) center_z,
intent(inout) vol )

Definition at line 29 of file geom.F.

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-----------------------------------------------
#define my_real
Definition cppsort.cpp:32
norm(diag(diag(diag(inv(mat))) -id.SOL), 2) % destroy mumps instance id.JOB