OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
i18xsave.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!|| i18xsave ../engine/source/interfaces/int18/i18xsave.F
25!||--- called by ------------------------------------------------------
26!|| i7main_tri ../engine/source/interfaces/intsort/i7main_tri.F
27!||====================================================================
28 SUBROUTINE i18xsave(
29 1 X ,NSV , MSR , NSN , NMN ,
30 2 ITASK ,XSAV , XMIN , YMIN , ZMIN ,
31 3 XMAX ,YMAX , ZMAX , C_MAX , CURV_MAX,
32 4 ICURV ,IRECT, NRTM_T, SX , SY ,
33 5 SZ ,SX2 , SY2 , SZ2 , NMN_L )
34C saving XSAV and computing domain bounds
35C-----------------------------------------------
36C I m p l i c i t T y p e s
37C-----------------------------------------------
38#include "implicit_f.inc"
39#include "comlock.inc"
40C-----------------------------------------------
41C C o m m o n B l o c k s
42C-----------------------------------------------
43#include "com04_c.inc"
44#include "task_c.inc"
45#include "impl1_c.inc"
46C-----------------------------------------------
47C D u m m y A r g u m e n t s
48C-----------------------------------------------
49 INTEGER NSN,NMN,ITASK, ICURV, NRTM_T,
50 . NSV(*),MSR(*), IRECT(4,*),NMN_L
51 my_real
52 . XMAX, YMAX, ZMAX, XMIN, YMIN, ZMIN, C_MAX,
53 . SX, SY, SZ, SX2, SY2, SZ2,
54 . x(3,*), xsav(3,*), curv_max(*)
55C-----------------------------------------------
56C L o c a l V a r i a b l e s
57C-----------------------------------------------
58 INTEGER NSNF,NMNF,NSNL,NMNL,I, J, II
59C-----------------------------------------------
60C S o u r c e L i n e s
61C-----------------------------------------------
62C
63 nsnf=1+itask*nsn/nthread
64 nsnl=(itask+1)*nsn/nthread
65 nmnf=1+itask*nmn/nthread
66 nmnl=(itask+1)*nmn/nthread
67
68 xmin=ep30
69 xmax=-ep30
70 ymin=ep30
71 ymax=-ep30
72 zmin=ep30
73 zmax=-ep30
74
75 sx=zero
76 sy=zero
77 sz=zero
78 sx2=zero
79 sy2=zero
80 sz2=zero
81 nmn_l = 0
82
83 IF(nsn+nmn < numnod)THEN
84 DO i=nsnf,nsnl
85 j=nsv(i)
86 IF(j>0.AND.inconv==1)THEN
87 xsav(1,i)=x(1,j)
88 xsav(2,i)=x(2,j)
89 xsav(3,i)=x(3,j)
90 ENDIF
91 END DO
92
93 DO i=nmnf,nmnl
94 ii = i+nsn
95 j=msr(i)
96 ! msr < 0 <=> shooting nodes
97 IF(j>0) THEN
98 xmin= min(xmin,x(1,j))
99 ymin= min(ymin,x(2,j))
100 zmin= min(zmin,x(3,j))
101 xmax= max(xmax,x(1,j))
102 ymax= max(ymax,x(2,j))
103 zmax= max(zmax,x(3,j))
104 IF (inconv==1) THEN
105 xsav(1,ii)=x(1,j)
106 xsav(2,ii)=x(2,j)
107 xsav(3,ii)=x(3,j)
108 END IF
109 sx=sx+x(1,j)
110 sy=sy+x(2,j)
111 sz=sz+x(3,j)
112 sx2=sx2+x(1,j)**2
113 sy2=sy2+x(2,j)**2
114 sz2=sz2+x(3,j)**2
115 nmn_l= nmn_l + 1
116 ENDIF
117 END DO
118 ELSE
119C
120 DO i=nsnf,nsnl
121 j=nsv(i)
122 IF(j>0.AND.inconv==1)THEN
123 xsav(1,j)=x(1,j)
124 xsav(2,j)=x(2,j)
125 xsav(3,j)=x(3,j)
126 END IF
127 END DO
128 DO i=nmnf,nmnl
129 j=msr(i)
130 ! msr < 0 <=> shooting nodes
131 IF(j>0) THEN
132 xmin= min(xmin,x(1,j))
133 ymin= min(ymin,x(2,j))
134 zmin= min(zmin,x(3,j))
135 xmax= max(xmax,x(1,j))
136 ymax= max(ymax,x(2,j))
137 zmax= max(zmax,x(3,j))
138 IF (inconv==1) THEN
139 xsav(1,j)=x(1,j)
140 xsav(2,j)=x(2,j)
141 xsav(3,j)=x(3,j)
142 END IF
143 sx=sx+x(1,j)
144 sy=sy+x(2,j)
145 sz=sz+x(3,j)
146 sx2=sx2+x(1,j)**2
147 sy2=sy2+x(2,j)**2
148 sz2=sz2+x(3,j)**2
149 nmn_l= nmn_l + 1
150 END IF
151 END DO
152 ENDIF
153C
154 c_max = zero
155 DO i=1,nrtm_t
156 curv_max(i)=zero
157 ENDDO
158C
159 RETURN
160 END
subroutine i18xsave(x, nsv, msr, nsn, nmn, itask, xsav, xmin, ymin, zmin, xmax, ymax, zmax, c_max, curv_max, icurv, irect, nrtm_t, sx, sy, sz, sx2, sy2, sz2, nmn_l)
Definition i18xsave.F:34
#define min(a, b)
Definition macros.h:20
#define max(a, b)
Definition macros.h:21