OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_tri22vox0.F File Reference
#include "implicit_f.inc"
#include "comlock.inc"
#include "task_c.inc"
#include "lockon.inc"
#include "lockoff.inc"

Go to the source code of this file.

Functions/Subroutines

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)

Function/Subroutine Documentation

◆ spmd_tri22vox0()

subroutine spmd_tri22vox0 ( dimension(3,*), intent(in) x,
dimension(6), intent(in) bminma_flu_l,
integer, intent(in) nbric,
integer, dimension(nixs,*), intent(in) ixs,
integer, dimension(nbric) bufbric,
integer itask,
integer, dimension(*), intent(in) itab,
xmins,
ymins,
zmins,
xmaxs,
ymaxs,
zmaxs,
dimension(6), intent(in) bminma_lag_r,
logical is_contact,
dimension(6), intent(inout) bminma_and )

Definition at line 31 of file spmd_tri22vox0.F.

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)
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
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
#define my_real
Definition cppsort.cpp:32
#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