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_routines.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
52 INTEGER N, INOD
53 INTEGER INP(NNSPH*3),CNT,LRECV
55 3 xi,yi,zi,nx,ny,nz,normn
56C-----------------------------------------------
57 IF (numsph+maxpjet==0) GOTO 100
58C-----------------------------------------------
59 i3000 = 3000
60 cnt = 0
61C
62 DO 200 n=1,numsph+maxpjet
63 inod=kxsp(3,n)
64 xi =x(1,inod)
65 yi =x(2,inod)
66 zi =x(3,inod)
67 nx= one
68 ny=-one
69 nz=-one
70C NX= SQRT(2.)
71C NY= SQRT(2.)/SQRT(3.)
72C NZ=-1./SQRT(3.)
73 normn=sqrt(nx**2+ny**2+nz**2)
74 IF (normn==zero) THEN
75 nx=three1000
76 ny=three1000
77 nz=three1000
78 ELSE
79 nx=three1000*nx/normn
80 ny=three1000*ny/normn
81 nz=three1000*nz/normn
82 ENDIF
83 cnt = cnt + 1
84 inp(cnt) = nint(nx)
85 cnt = cnt + 1
86 inp(cnt) = nint(ny)
87 cnt = cnt + 1
88 inp(cnt) = nint(nz)
89 nx=-one
90 ny= one
91 nz=-one
92 normn=sqrt(nx**2+ny**2+nz**2)
93 IF (normn==zero) THEN
94 nx=three1000
95 ny=three1000
96 nz=three1000
97 ELSE
98 nx=three1000*nx/normn
99 ny=three1000*ny/normn
100 nz=three1000*nz/normn
101 ENDIF
102 cnt = cnt + 1
103 inp(cnt) = nint(nx)
104 cnt = cnt + 1
105 inp(cnt) = nint(ny)
106 cnt = cnt + 1
107 inp(cnt) = nint(nz)
108 nx=-one
109 ny=-one
110 nz= one
111 normn=sqrt(nx**2+ny**2+nz**2)
112 IF (normn==zero) THEN
113 nx=three1000
114 ny=three1000
115 nz=three1000
116 ELSE
117 nx=three1000*nx/normn
118 ny=three1000*ny/normn
119 nz=three1000*nz/normn
120 ENDIF
121 cnt = cnt + 1
122 inp(cnt) = nint(nx)
123 cnt = cnt + 1
124 inp(cnt) = nint(ny)
125 cnt = cnt + 1
126 inp(cnt) = nint(nz)
127 nx= one
128 ny= one
129 nz= one
130 normn=sqrt(nx**2+ny**2+nz**2)
131 IF (normn==zero) THEN
132 nx=three1000
133 ny=three1000
134 nz=three1000
135 ELSE
136 nx=three1000*nx/normn
137 ny=three1000*ny/normn
138 nz=three1000*nz/normn
139 ENDIF
140 cnt = cnt + 1
141 inp(cnt) = nint(nx)
142 cnt = cnt + 1
143 inp(cnt) = nint(ny)
144 cnt = cnt + 1
145 inp(cnt) = nint(nz)
146 200 CONTINUE
147 100 CONTINUE
148 IF (nspmd > 1) THEN
149 CALL spmd_igath(inp,cnt,lrecv)
150 ELSE
151 lrecv = cnt
152 END IF
153 IF (ispmd==0) THEN
154 CALL write_s_c(inp,lrecv)
155 ENDIF
156
157 RETURN
158 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)