OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
i22xsave.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!|| i22xsave ../engine/source/interfaces/intsort/i22xsave.F
25!||--- called by ------------------------------------------------------
26!|| i22main_tri ../engine/source/interfaces/intsort/i22main_tri.F
27!||====================================================================
28 SUBROUTINE i22xsave(
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)
33C saving xsav and computing the domain bounds
34C-----------------------------------------------
35C I m p l i c i t T y p e s
36C-----------------------------------------------
37#include "implicit_f.inc"
38#include "comlock.inc"
39C-----------------------------------------------
40C C o m m o n B l o c k s
41C-----------------------------------------------
42#include "com04_c.inc"
43#include "task_c.inc"
44C-----------------------------------------------
45C D u m m y A r g u m e n t s
46C-----------------------------------------------
47 INTEGER NSN,NMN,ITASK, ICURV, NRTM_T,
48 . NSV(*),MSR(*), IRECT(4,*)
49 my_real
50 . XMAX, YMAX, ZMAX, XMIN, YMIN, ZMIN, C_MAX,
51 . x(3,*), xsav(3,*), curv_max(*)
52C-----------------------------------------------
53C L o c a l V a r i a b l e s
54C-----------------------------------------------
55 INTEGER NSNF,NMNF,NSNL,NMNL,I, J, II
56C-----------------------------------------------
57C S o u r c e L i n e s
58C-----------------------------------------------
59C
60C description: calculation of the dimensions of the lagrangian domain of the local domain.
61C Each thread calculates its dimensions, we dive the dimension of the domain in i22main_tri.
62
63
64 nsnf=1+itask*nsn/nthread
65 nsnl=(itask+1)*nsn/nthread
66 nmnf=1+itask*nmn/nthread
67 nmnl=(itask+1)*nmn/nthread
68C
69 xmin=ep30
70 xmax=-ep30
71 ymin=ep30
72 ymax=-ep30
73 zmin=ep30
74 zmax=-ep30
75C
76 IF(nsn+nmn < numnod)THEN
77 DO i=nsnf,nsnl
78 j=nsv(i)
79 IF(j>0)THEN
80 xsav(1,i)=x(1,j)
81 xsav(2,i)=x(2,j)
82 xsav(3,i)=x(3,j)
83 END IF
84 END DO
85 DO i=nmnf,nmnl
86 ii = i+nsn
87 j=msr(i)
88C msr < 0 <=> shooting nodes
89 IF(j>0) THEN
90 xmin= min(xmin,x(1,j))
91 ymin= min(ymin,x(2,j))
92 zmin= min(zmin,x(3,j))
93 xmax= max(xmax,x(1,j))
94 ymax= max(ymax,x(2,j))
95 zmax= max(zmax,x(3,j))
96 xsav(1,ii)=x(1,j)
97 xsav(2,ii)=x(2,j)
98 xsav(3,ii)=x(3,j)
99 ENDIF
100 END DO
101 ELSE
102C
103 DO i=nsnf,nsnl
104 j=nsv(i)
105 IF(j>0)THEN
106 xsav(1,j)=x(1,j)
107 xsav(2,j)=x(2,j)
108 xsav(3,j)=x(3,j)
109 END IF
110 END DO
111 DO i=nmnf,nmnl
112 j=msr(i)
113C msr < 0 <=> shooting nodes
114 IF(j>0) THEN
115 xmin= min(xmin,x(1,j))
116 ymin= min(ymin,x(2,j))
117 zmin= min(zmin,x(3,j))
118 xmax= max(xmax,x(1,j))
119 ymax= max(ymax,x(2,j))
120 zmax= max(zmax,x(3,j))
121 xsav(1,j)=x(1,j)
122 xsav(2,j)=x(2,j)
123 xsav(3,j)=x(3,j)
124 END IF
125 END DO
126 ENDIF
127C
128 c_max = zero
129
130 DO i=1,nrtm_t
131 curv_max(i)=zero
132 ENDDO
133
134 RETURN
135 END
subroutine i22xsave(x, nsv, msr, nsn, nmn, itask, xsav, xmin, ymin, zmin, xmax, ymax, zmax, c_max, curv_max, icurv, irect, nrtm_t)
Definition i22xsave.F:33
#define min(a, b)
Definition macros.h:20
#define max(a, b)
Definition macros.h:21