OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_tri22vox0.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/.
23C
24!||====================================================================
25!|| spmd_tri22vox0 ../engine/source/mpi/interfaces/spmd_tri22vox0.F
26!||--- called by ------------------------------------------------------
27!|| i22main_tri ../engine/source/interfaces/intsort/i22main_tri.f
28!||--- uses -----------------------------------------------------
29!|| tri7box ../engine/share/modules/tri7box.F
30!||====================================================================
31 SUBROUTINE spmd_tri22vox0(
32 1 X ,BMINMA_FLU_L ,NBRIC , IXS , BUFBRIC,
33 2 ITASK ,ITAB ,XMINS , YMINS , ZMINS ,
34 3 XMAXS ,YMAXS ,ZMAXS , BMINMA_LAG_R ,IS_CONTACT,
35 4 BMINMA_AND )
36C-----------------------------------------------
37C D e s c r i p t i o n
38C-----------------------------------------------
39C This subroutine is marking SPMD voxel if brick is inside
40C lagrangian domain (from local domain)
41C X : Node coordinates
42C BMINMAL : Fluid Bounds for local domain
43C IXS : Brick node ids
44C BUFBRIC : Brick Group for interface for current domain
45C ITASK : Current Thread
46C CRVOXEL : SPMD Voxel
47C-----------------------------------------------
48C M o d u l e s
49C-----------------------------------------------
50 USE tri7box
51C-----------------------------------------------
52C I m p l i c i t T y p e s
53C-----------------------------------------------
54#include "implicit_f.inc"
55#include "comlock.inc"
56C-----------------------------------------------
57C C o m m o n B l o c k s
58C-----------------------------------------------
59#include "task_c.inc"
60C-----------------------------------------------
61C D u m m y A r g u m e n t s
62C-----------------------------------------------
63 INTEGER, intent(in) :: NBRIC, IXS(NIXS,*), ITAB(*)
64 my_real, intent(in) ::
65 . X(3,*),
66 . BMINMA_FLU_L(6), BMINMA_LAG_R(6)
67 my_real, intent(inout) ::
68 . bminma_and(6)
69 my_real
70 . xmaxs(nbric), ymaxs(nbric), zmaxs(nbric),
71 . xmins(nbric), ymins(nbric), zmins(nbric)
72C-----------------------------------------------
73C L o c a l V a r i a b l e s
74C-----------------------------------------------
75 INTEGER LOC_PROC,IB,NE,I,
76 . NBX,NBY,NBZ,NEDG,M1,M2,M3,M4,M5,M6,M7,M8,
77 . IX1,IY1,IZ1,IX2,IY2,IZ2,IX,IY,IZ,
78 . BUFBRIC(NBRIC),NBF,NBL,ITASK
79 my_real
80 . xmaxb,ymaxb,zmaxb,xminb,yminb,zminb,
81 . xmine,ymine,zmine,xmaxe,ymaxe,zmaxe,
82 . xx1,xx2,xx3,xx4,xx5, xx6, xx7, xx8,
83 . yy1,yy2,yy3,yy4,yy5, yy6, yy7, yy8,
84 . zz1,zz2,zz3,zz4,zz5, zz6, zz7, zz8,
85 . dx,dy,dz
86 LOGICAL :: IS_CONTACT
87C-----------------------------------------------
88C S o u r c e L i n e s
89C-----------------------------------------------
90C
91C=======================================================================
92C tag des boites contenant des facettes
93C et creation des candidats
94C=======================================================================
95
96 loc_proc = ispmd + 1
97
98 nbx = lrvoxel
99 nby = lrvoxel
100 nbz = lrvoxel
101
102 ! Pour chercher les facettes candidats distante,
103 ! On regarde dans l intersection du domaine fluide local avec les domaines lagrangien remote
104 ! Cest ce domaine que l on voxelise pour rechercher les facettes remotes
105 xmaxb = min( bminma_flu_l(1), bminma_lag_r(1) )
106 ymaxb = min( bminma_flu_l(2), bminma_lag_r(2) )
107 zmaxb = min( bminma_flu_l(3), bminma_lag_r(3) )
108 xminb = max( bminma_flu_l(4), bminma_lag_r(4) )
109 yminb = max ( bminma_flu_l(5), bminma_lag_r(5) )
110 zminb = max( bminma_flu_l(6), bminma_lag_r(6) )
111
112 dx = xmaxb-xminb
113 dy = ymaxb-yminb
114 dz = zmaxb-zminb
115
116 !test interection entre domaines (FLUIDE LOCAL / LAG DISTANTS)
117 IF ( (dx<=zero).OR.(dy<=zero).OR.(dz<=zero) ) THEN
118 is_contact = .false.
119 RETURN
120 ELSE
121 is_contact = .true.
122 END IF
123
124 bminma_and(1)=xmaxb
125 bminma_and(2)=ymaxb
126 bminma_and(3)=zmaxb
127 bminma_and(4)=xminb
128 bminma_and(5)=yminb
129 bminma_and(6)=zminb
130
131 nbf = 1+itask*nbric/nthread
132 nbl = (itask+1)*nbric/nthread
133
134 DO ib=nbf,nbl
135 !-------------------------------------------!
136 ! VOXEL OCCUPIED BY THE BRICK !
137 !-------------------------------------------!
138 !Voxel_lower_left_bound for this element---+
139 ix1=int(nbx*(xmins(ib)-xminb)/dx)
140 iy1=int(nby*(ymins(ib)-yminb)/dy)
141 iz1=int(nbz*(zmins(ib)-zminb)/dz)
142 ix1=max(ix1,0) !pos for ibset must be correctly defined
143 iy1=max(iy1,0) !CRVOXEL (0:LRVOXEL,...
144 iz1=max(iz1,0) !CRVOXEL (0:LRVOXEL,...
145 !Voxel_upper_right_bound for this element---+
146 ix2=int(nbx*(xmaxs(ib)-xminb)/dx)
147 iy2=int(nby*(ymaxs(ib)-yminb)/dy)
148 iz2=int(nbz*(zmaxs(ib)-zminb)/dz)
149 ix2=min(ix2,nbx) !pos for ibset must be correctly defined
150 iy2=min(iy2,nby) !CRVOXEL (0:LRVOXEL,...
151 iz2=min(iz2,nbz) !CRVOXEL (0:LRVOXEL,...
152 !------------------------------------------------------!
153 ! VOXEL MARKING TO SPOT BRIC LOCATIONS (LOCAL DOMAIN) !
154 !------------------------------------------------------!
155#include "lockon.inc"
156 DO iz = iz1, iz2
157 DO iy = iy1, iy2
158 DO ix = ix1, ix2
159 crvoxel(iy,iz,loc_proc)=ibset(crvoxel(iy,iz,loc_proc),ix)
160 END DO
161 END DO
162 END DO
163#include "lockoff.inc"
164 ENDDO !IB=NBF,NBL
165
166C
167 RETURN
168 END
subroutine i22main_tri(timers, ipari, x, v, ms, nin, itask, mwag, weight, isendto, ircvfrom, retri, iad_elem, fr_elem, itab, kinet, temp, nrtm_t, renum, nsnfiold, eshift, num_imp, ind_imp, nodnx_sms, ixs, igrbric, ale_connectivity, intbuf_tab, count_remslv, h3d_data, multi_fvm, nodadt_therm)
Definition i22main_tri.F:65
#define min(a, b)
Definition macros.h:20
#define max(a, b)
Definition macros.h:21
integer, dimension(0:lrvoxel, 0:lrvoxel) crvoxel
Definition tri7box.F:56
integer lrvoxel
Definition tri7box.F:54
subroutine spmd_tri22vox0(x, bminma_flu_l, nbric, ixs, bufbric, itask, itab, xmins, ymins, zmins, xmaxs, ymaxs, zmaxs, bminma_lag_r, is_contact, bminma_and)