OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
weight.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!|| weight0 ../engine/source/elements/sph/weight.F
25!||--- called by ------------------------------------------------------
26!|| spcompl ../engine/source/elements/sph/spcompl.F
27!|| spgauge ../engine/source/elements/sph/spgauge.F
28!|| splissv ../engine/source/elements/sph/splissv.F
29!|| spmd_sphgetd ../engine/source/mpi/elements/spmd_sph.F
30!|| sponfv ../engine/source/elements/sph/sponfv.F
31!|| spstabw ../engine/source/elements/sph/spstab.F
32!||====================================================================
33 SUBROUTINE weight0(XI,YI,ZI,XJ,YJ,ZJ,H,W)
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
66 END
67!||====================================================================
68!|| weight1 ../engine/source/elements/sph/weight.F
69!||--- called by ------------------------------------------------------
70!|| spcompl ../engine/source/elements/sph/spcompl.f
71!|| spdens ../engine/source/elements/sph/spdens.F
72!|| spforcp ../engine/source/elements/sph/spforcp.F
73!|| spgradt ../engine/source/elements/sph/sptemp.F
74!|| splaplt ../engine/source/elements/sph/sptemp.F
75!|| spmd_sphgetd ../engine/source/mpi/elements/spmd_sph.F
76!|| sponfv ../engine/source/elements/sph/sponfv.F
77!||====================================================================
78 SUBROUTINE weight1(XI,YI,ZI,XJ,YJ,ZJ,H,W,WGRAD)
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
119 END
120
#define my_real
Definition cppsort.cpp:32
subroutine spcompl(x, v, ms, spbuf, itab, kxsp, ixsp, nod2sp, ispsym, xspsym, vspsym, iparg, wacomp, ispcond, xframe, wsmcomp, geo, ipart, ipartsp, waspact, itask, sph_iord1, numgeo, ncycle, mcheck)
Definition spcompl.F:40
subroutine weight1(xi, yi, zi, xj, yj, zj, h, w, wgrad)
Definition weight.F:79
subroutine weight0(xi, yi, zi, xj, yj, zj, h, w)
Definition weight.F:34