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

Go to the source code of this file.

Functions/Subroutines

subroutine sgetdir3 (nel, rx, ry, rz, tx, ty, tz, e1x, e1y, e1z, e2x, e2y, e2z, dir, dirb, irep)

Function/Subroutine Documentation

◆ sgetdir3()

subroutine sgetdir3 ( integer nel,
rx,
ry,
rz,
tx,
ty,
tz,
e1x,
e1y,
e1z,
e2x,
e2y,
e2z,
dir,
dirb,
integer irep )

Definition at line 29 of file sgetdir3.F.

31C-----------------------------------------------
32C I m p l i c i t T y p e s
33C-----------------------------------------------
34#include "implicit_f.inc"
35C-----------------------------------------------
36C G l o b a l P a r a m e t e r s
37C-----------------------------------------------
38#include "mvsiz_p.inc"
39C-----------------------------------------------
40C D u m m y A r g u m e n t s
41C-----------------------------------------------
42 INTEGER :: NEL,IREP
43C
45 . rx(*),ry(*),rz(*),tx(*),ty(*),tz(*),dir(nel,6),dirb(mvsiz,2),
46 . e1x(*),e1y(*),e1z(*),e2x(*),e2y(*),e2z(*)
47C-----------------------------------------------
48C L o c a l V a r i a b l e s
49C-----------------------------------------------
50 INTEGER I
51C
52 my_real
53 . v1,v2,v3,vr,vs,aa,bb,suma
54C-----------------------------------------------
55 IF (irep == 0) THEN
56 DO i=1,nel
57 dirb(i,1) = dir(i,1)
58 dirb(i,2) = dir(i,2)
59 ENDDO
60 ELSE
61 DO i=1,nel
62 aa = dir(i,1)
63 bb = dir(i,2)
64 v1 = aa*tx(i) + bb*rx(i)
65 v2 = aa*ty(i) + bb*ry(i)
66 v3 = aa*tz(i) + bb*rz(i)
67 vr=v1*e1x(i)+v2*e1y(i)+v3*e1z(i)
68 vs=v1*e2x(i)+v2*e2y(i)+v3*e2z(i)
69 suma=sqrt(vr*vr + vs*vs)
70 suma=one/max(em20,suma)
71 dirb(i,1) = vr*suma
72 dirb(i,2) = vs*suma
73 ENDDO
74 ENDIF
75C-----------
76 RETURN
#define my_real
Definition cppsort.cpp:32
#define max(a, b)
Definition macros.h:21