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

Go to the source code of this file.

Functions/Subroutines

subroutine weight0 (xi, yi, zi, xj, yj, zj, h, w)
subroutine weight1 (xi, yi, zi, xj, yj, zj, h, w, wgrad)

Function/Subroutine Documentation

◆ weight0()

subroutine weight0 ( xi,
yi,
zi,
xj,
yj,
zj,
h,
w )

Definition at line 33 of file weight.F.

34C-------------------------------------------------------------------------
35C-----------------------------------------------
36C I m p l i c i t T y p e s
37C-----------------------------------------------
38#include "implicit_f.inc"
39C----------------------------------------------------------
40C D u m m y A r g u m e n t s a n d F u n c t i o n
41C----------------------------------------------------------
43 . xi,yi,zi,xj,yj,zj,h,w
44C----------------------------------------------------------
46 . r,rh,rh2,rh3,rhm,rhm3
47C=======================================================================
48 IF (h==zero) stop
49C-----
50 r =sqrt((xi-xj)*(xi-xj)+(yi-yj)*(yi-yj)+(zi-zj)*(zi-zj))
51C-----
52 IF (r<=h) THEN
53 rh =r/h
54 rh2 =rh*rh
55 rh3 =rh2*rh
56 w =(one - three_half*rh2+three_over_4*rh3)*invpi/(h*h*h)
57 ELSEIF (r<=two*h) THEN
58 rhm =two-r/h
59 rhm =rhm/h
60 rhm3=rhm*rhm*rhm
61 w =fourth*rhm3*invpi
62 ELSE
63 w =zero
64 ENDIF
65 RETURN
#define my_real
Definition cppsort.cpp:32

◆ weight1()

subroutine weight1 ( xi,
yi,
zi,
xj,
yj,
zj,
h,
w,
wgrad )

Definition at line 78 of file weight.F.

79C-------------------------------------------------------------------------
80C-----------------------------------------------
81C I m p l i c i t T y p e s
82C-----------------------------------------------
83#include "implicit_f.inc"
84C----------------------------------------------------------
85C D u m m y A r g u m e n t s a n d F u n c t i o n
86C----------------------------------------------------------
88 . xi,yi,zi,xj,yj,zj,h,w,wgrad(3)
89C----------------------------------------------------------
91 . r,rh,rh2,rh3,ih3,rhm,rhm2,rhm3,wprimr
92C=======================================================================
93 IF (h==zero) stop
94C-----
95 r =sqrt((xi-xj)*(xi-xj)+(yi-yj)*(yi-yj)+(zi-zj)*(zi-zj))
96C-----
97 IF (r<=h) THEN
98 rh =r/h
99 rh2 =rh*rh
100 rh3 =rh2*rh
101 ih3 =invpi/(h*h*h)
102 w =(one - three_half*rh2+three_over_4*rh3)*ih3
103 wprimr =(-three+twop25*rh)*ih3/(h*h)
104 ELSEIF (r<=two*h) THEN
105 rhm =two - r/h
106 rhm =rhm/h
107 rhm2=rhm*rhm*invpi
108 rhm3=rhm2*rhm
109 w = fourth*rhm3
110 wprimr =-three_over_4*rhm2/(h*h*r)
111 ELSE
112 w =zero
113 wprimr =zero
114 ENDIF
115 wgrad(1)=wprimr*(xi-xj)
116 wgrad(2)=wprimr*(yi-yj)
117 wgrad(3)=wprimr*(zi-zj)
118 RETURN