OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
i2rep.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!|| i2rep ../common_source/interf/i2rep.F
25!||--- called by ------------------------------------------------------
26!|| i2_dtn_25 ../starter/source/interfaces/inter3d1/i2_dtn.F
27!|| i2_dtn_27_cin ../starter/source/interfaces/inter3d1/i2_dtn_27.F
28!|| i2_dtn_27_pen ../starter/source/interfaces/inter3d1/i2_dtn_27.F
29!|| i2_dtn_28_pen ../starter/source/interfaces/inter3d1/i2_dtn_28.F
30!|| i2for25 ../engine/source/interfaces/interf/i2for25.F
31!|| i2for25p ../engine/source/interfaces/interf/i2for25p.F
32!|| i2for26 ../engine/source/interfaces/interf/i2for26.F
33!|| i2for26p ../engine/source/interfaces/interf/i2for26p.F
34!|| i2for27_cin ../engine/source/interfaces/interf/i2for27_cin.F
35!|| i2for27_pen ../engine/source/interfaces/interf/i2for27_pen.F
36!|| i2for27p_cin ../engine/source/interfaces/interf/i2for27p_cin.F
37!|| i2for27p_pen ../engine/source/interfaces/interf/i2for27p_pen.F
38!|| i2for28_pen ../engine/source/interfaces/interf/i2for28_pen.F
39!|| i2for28p_pen ../engine/source/interfaces/interf/i2for28p_pen.f
40!||====================================================================
41 SUBROUTINE i2rep(
42 . X1 ,X2 ,X3 ,X4 ,
43 . Y1 ,Y2 ,Y3 ,Y4 ,
44 . Z1 ,Z2 ,Z3 ,Z4 ,
45 . E1X ,E1Y ,E1Z ,
46 . E2X ,E2Y ,E2Z ,
47 . E3X ,E3Y ,E3Z ,NIR )
48C-----------------------------------------------
49C I m p l i c i t T y p e s
50C-----------------------------------------------
51#include "implicit_f.inc"
52C-----------------------------------------------
53C D u m m y A r g u m e n t s
54C-----------------------------------------------
55 my_real x1, x2, x3, x4, y1, y2, y3, y4, z1, z2, z3, z4, e1x, e1y, e1z, e2x,e2y, e2z, e3x, e3y, e3z
56 INTEGER NIR
57C-----------------------------------------------
58C L o c a l V a r i a b l e s
59C-----------------------------------------------
60 my_real :: SUM_,S1,S2
61C-----------------------------------------------
62
63 IF(nir==4)THEN
64 e1x = (x2 + x3 - x1 - x4)
65 e1y = (y2 + y3 - y1 - y4)
66 e1z = (z2 + z3 - z1 - z4)
67 e2x = (x3 + x4 - x1 - x2)
68 e2y = (y3 + y4 - y1 - y2)
69 e2z = (z3 + z4 - z1 - z2)
70 ELSE
71 e1x = (x2 + x3 - two * x1)
72 e1y = (y2 + y3 - two * y1)
73 e1z = (z2 + z3 - two * z1)
74 e2x = (two * x3 - x1 - x2)
75 e2y = (two * y3 - y1 - y2)
76 e2z = (two * z3 - z1 - z2)
77 END IF
78 e3x = e1y*e2z - e1z*e2y
79 e3y = e1z*e2x - e1x*e2z
80 e3z = e1x*e2y - e1y*e2x
81C
82 sum_ = e3x*e3x+e3y*e3y+e3z*e3z
83 sum_ = one / max(sqrt(sum_),em20)
84 e3x = e3x * sum_
85 e3y = e3y * sum_
86 e3z = e3z * sum_
87C
88 IF (nir == 4) THEN
89 s1 = e1x*e1x+e1y*e1y+e1z*e1z
90 s2 = e2x*e2x+e2y*e2y+e2z*e2z
91 sum_ = sqrt(s1/s2)
92 e1x = e1x + (e2y*e3z-e2z*e3y)*sum_
93 e1y = e1y + (e2z*e3x-e2x*e3z)*sum_
94 e1z = e1z + (e2x*e3y-e2y*e3x)*sum_
95 ENDIF
96C
97 sum_ = e1x*e1x+e1y*e1y+e1z*e1z
98 sum_ = one / max(sqrt(sum_),em20)
99 e1x = e1x * sum_
100 e1y = e1y * sum_
101 e1z = e1z * sum_
102C
103 e2x = e3y * e1z - e3z * e1y
104 e2y = e3z * e1x - e3x * e1z
105 e2z = e3x * e1y - e3y * e1x
106C---
107 RETURN
108 END SUBROUTINE i2rep
#define my_real
Definition cppsort.cpp:32
subroutine i2for28p_pen(x, v, vr, a, ar, ms, in, stifn, stifr, weight, nsv, irtl, crst, skew, dx, dr, fini, fsav, fncont, nsn, i0, i2size, iadi2, fskyi2, stfn, stfr, visc, penflag, irot, noint, nodnx_sms, dmint2, dt2t, neltst, ityptst, irect, indxp, iadx, h3d_data, fncontp, ftcontp)
subroutine i2rep(x1, x2, x3, x4, y1, y2, y3, y4, z1, z2, z3, z4, e1x, e1y, e1z, e2x, e2y, e2z, e3x, e3y, e3z, nir)
Definition i2rep.F:48
#define max(a, b)
Definition macros.h:21