OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
dsphnor.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!|| 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)
32C-----------------------------------------------
33C I m p l i c i t T y p e s
34C-----------------------------------------------
35#include "implicit_f.inc"
36C-----------------------------------------------
37C C o m m o n B l o c k s
38C-----------------------------------------------
39#include "com01_c.inc"
40#include "sphcom.inc"
41#include "task_c.inc"
42C-----------------------------------------------
43C D u m m y A r g u m e n t s
44C-----------------------------------------------
45 INTEGER KXSP(NISP,*),NNSPH
47 . x(3,*),spbuf(*)
48C-----------------------------------------------
49C L o c a l V a r i a b l e s
50C-----------------------------------------------
51 INTEGER I3000,NXX,NYY,NZZ
52 INTEGER N, J, INOD
53 INTEGER INP(NNSPH*3),CNT,LRECV
55 3 xi,yi,zi,r,nx,ny,nz,normn,
56 4 xq(3)
57C-----------------------------------------------
58 IF (numsph+maxpjet==0) GOTO 100
59C-----------------------------------------------
60 i3000 = 3000
61 cnt = 0
62C
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
71C NX= SQRT(2.)
72C NY= SQRT(2.)/SQRT(3.)
73C 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
#define my_real
Definition cppsort.cpp:32
subroutine dsphnor(kxsp, x, spbuf, nnsph)
Definition dsphnor.F:32
subroutine spmd_igath(srbuf, len, lrecv)
Definition spmd_igath.F:34
void write_s_c(int *w, int *len)