OpenRadioss
2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
dsphnor.F
Go to the documentation of this file.
1
Copyright> OpenRadioss
2
Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3
Copyright>
4
Copyright> This program is free software: you can redistribute it and/or modify
5
Copyright> it under the terms of the GNU Affero General Public License as published by
6
Copyright> the Free Software Foundation, either version 3 of the License, or
7
Copyright> (at your option) any later version.
8
Copyright>
9
Copyright> This program is distributed in the hope that it will be useful,
10
Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11
Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
Copyright> GNU Affero General Public License for more details.
13
Copyright>
14
Copyright> You should have received a copy of the GNU Affero General Public License
15
Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16
Copyright>
17
Copyright>
18
Copyright> Commercial Alternative: Altair Radioss Software
19
Copyright>
20
Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21
Copyright> software under a commercial license. Contact Altair to discuss further if the
22
Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23
!||====================================================================
24
!|| dsphnor ../engine/source/output/anim/generate/dsphnor.F
25
!||--- called by ------------------------------------------------------
26
!|| genani ../engine/source/output/anim/generate/genani.F
27
!||--- calls -----------------------------------------------------
28
!|| spmd_igath ../engine/source/mpi/anim/spmd_igath.F
29
!|| write_s_c ../common_source/tools/input_output/write_routtines.c
30
!||====================================================================
31
SUBROUTINE
dsphnor
(KXSP,X,SPBUF,NNSPH)
32
C-----------------------------------------------
33
C I m p l i c i t T y p e s
34
C-----------------------------------------------
35
#include "implicit_f.inc"
36
C-----------------------------------------------
37
C C o m m o n B l o c k s
38
C-----------------------------------------------
39
#include "com01_c.inc"
40
#include "sphcom.inc"
41
#include "task_c.inc"
42
C-----------------------------------------------
43
C D u m m y A r g u m e n t s
44
C-----------------------------------------------
45
INTEGER
KXSP(NISP,*),NNSPH
46
my_real
47
. x(3,*),spbuf(*)
48
C-----------------------------------------------
49
C L o c a l V a r i a b l e s
50
C-----------------------------------------------
51
INTEGER
I3000,NXX,NYY,NZZ
52
INTEGER
N, J, INOD
53
INTEGER
INP(NNSPH*3),CNT,LRECV
54
my_real
55
3 xi,yi,zi,r,nx,ny,nz,normn,
56
4 xq(3)
57
C-----------------------------------------------
58
IF
(numsph+maxpjet==0)
GOTO
100
59
C-----------------------------------------------
60
i3000 = 3000
61
cnt = 0
62
C
63
DO
200 n=1,numsph+maxpjet
64
inod=kxsp(3,n)
65
xi =x(1,inod)
66
yi =x(2,inod)
67
zi =x(3,inod)
68
nx= one
69
ny=-one
70
nz=-one
71
C NX= SQRT(2.)
72
C NY= SQRT(2.)/SQRT(3.)
73
C NZ=-1./SQRT(3.)
74
normn=sqrt(nx**2+ny**2+nz**2)
75
IF
(normn==zero)
THEN
76
nx=three1000
77
ny=three1000
78
nz=three1000
79
ELSE
80
nx=three1000*nx/normn
81
ny=three1000*ny/normn
82
nz=three1000*nz/normn
83
ENDIF
84
cnt = cnt + 1
85
inp(cnt) = nint(nx)
86
cnt = cnt + 1
87
inp(cnt) = nint(ny)
88
cnt = cnt + 1
89
inp(cnt) = nint(nz)
90
nx=-one
91
ny= one
92
nz=-one
93
normn=sqrt(nx**2+ny**2+nz**2)
94
IF
(normn==zero)
THEN
95
nx=three1000
96
ny=three1000
97
nz=three1000
98
ELSE
99
nx=three1000*nx/normn
100
ny=three1000*ny/normn
101
nz=three1000*nz/normn
102
ENDIF
103
cnt = cnt + 1
104
inp(cnt) = nint(nx)
105
cnt = cnt + 1
106
inp(cnt) = nint(ny)
107
cnt = cnt + 1
108
inp(cnt) = nint(nz)
109
nx=-one
110
ny=-one
111
nz= one
112
normn=sqrt(nx**2+ny**2+nz**2)
113
IF
(normn==zero)
THEN
114
nx=three1000
115
ny=three1000
116
nz=three1000
117
ELSE
118
nx=three1000*nx/normn
119
ny=three1000*ny/normn
120
nz=three1000*nz/normn
121
ENDIF
122
cnt = cnt + 1
123
inp(cnt) = nint(nx)
124
cnt = cnt + 1
125
inp(cnt) = nint(ny)
126
cnt = cnt + 1
127
inp(cnt) = nint(nz)
128
nx= one
129
ny= one
130
nz= one
131
normn=sqrt(nx**2+ny**2+nz**2)
132
IF
(normn==zero)
THEN
133
nx=three1000
134
ny=three1000
135
nz=three1000
136
ELSE
137
nx=three1000*nx/normn
138
ny=three1000*ny/normn
139
nz=three1000*nz/normn
140
ENDIF
141
cnt = cnt + 1
142
inp(cnt) = nint(nx)
143
cnt = cnt + 1
144
inp(cnt) = nint(ny)
145
cnt = cnt + 1
146
inp(cnt) = nint(nz)
147
200
CONTINUE
148
100
CONTINUE
149
IF
(nspmd > 1)
THEN
150
CALL
spmd_igath
(inp,cnt,lrecv)
151
ELSE
152
lrecv = cnt
153
END IF
154
IF
(ispmd==0)
THEN
155
CALL
write_s_c
(inp,lrecv)
156
ENDIF
157
158
RETURN
159
END
my_real
#define my_real
Definition
cppsort.cpp:32
dsphnor
subroutine dsphnor(kxsp, x, spbuf, nnsph)
Definition
dsphnor.F:32
spmd_igath
subroutine spmd_igath(srbuf, len, lrecv)
Definition
spmd_igath.F:34
write_s_c
void write_s_c(int *w, int *len)
Definition
write_routtines.c:687
engine
source
output
anim
generate
dsphnor.F
Generated by
1.15.0