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 32 of file spmd_tri22vox0.F.

37C-----------------------------------------------
38C D e s c r i p t i o n
39C-----------------------------------------------
40C This subroutine is marking SPMD voxel if brick is inside
41C lagrangian domain (from local domain)
42C X : Node coordinates
43C BMINMAL : Fluid Bounds for local domain
44C IXS : Brick node ids
45C BUFBRIC : Brick Group for interface for current domain
46C ITASK : Current Thread
47C CRVOXEL : SPMD Voxel
48C-----------------------------------------------
49C M o d u l e s
50C-----------------------------------------------
51 USE tri7box
52 use element_mod , only :nixs
53C-----------------------------------------------
54C I m p l i c i t T y p e s
55C-----------------------------------------------
56#include "implicit_f.inc"
57#include "comlock.inc"
58C-----------------------------------------------
59C C o m m o n B l o c k s
60C-----------------------------------------------
61#include "task_c.inc"
62C-----------------------------------------------
63C D u m m y A r g u m e n t s
64C-----------------------------------------------
65 INTEGER, intent(in) :: NBRIC, IXS(NIXS,*), ITAB(*)
66 my_real, intent(in) ::
67 . x(3,*),
68 . bminma_flu_l(6), bminma_lag_r(6)
69 my_real, intent(inout) ::
70 . bminma_and(6)
72 . xmaxs(nbric), ymaxs(nbric), zmaxs(nbric),
73 . xmins(nbric), ymins(nbric), zmins(nbric)
74C-----------------------------------------------
75C L o c a l V a r i a b l e s
76C-----------------------------------------------
77 INTEGER LOC_PROC,IB,
78 . NBX,NBY,NBZ,
79 . IX1,IY1,IZ1,IX2,IY2,IZ2,IX,IY,IZ,
80 . BUFBRIC(NBRIC),NBF,NBL,ITASK
82 . xmaxb,ymaxb,zmaxb,xminb,yminb,zminb,
83 .
84 .
85 .
86 .
87 . dx,dy,dz
88 LOGICAL :: IS_CONTACT
89C-----------------------------------------------
90C S o u r c e L i n e s
91C-----------------------------------------------
92C
93C=======================================================================
94C tag of boxes containing facets
95C and creation of candidates
96C=======================================================================
97
98 loc_proc = ispmd + 1
99
100 nbx = lrvoxel
101 nby = lrvoxel
102 nbz = lrvoxel
103
104 ! to search for distant candidate facets,
105 ! we look at the intersection of the local fluid domain with the remote lagrangian domains
106 ! this is the domain that we voxelize to search for the remote facets
107 xmaxb = min( bminma_flu_l(1), bminma_lag_r(1) )
108 ymaxb = min( bminma_flu_l(2), bminma_lag_r(2) )
109 zmaxb = min( bminma_flu_l(3), bminma_lag_r(3) )
110 xminb = max( bminma_flu_l(4), bminma_lag_r(4) )
111 yminb = max( bminma_flu_l(5), bminma_lag_r(5) )
112 zminb = max( bminma_flu_l(6), bminma_lag_r(6) )
113
114 dx = xmaxb-xminb
115 dy = ymaxb-yminb
116 dz = zmaxb-zminb
117
118 !Test Interaction between domains (local / distant fluid)
119 IF ( (dx<=zero).OR.(dy<=zero).OR.(dz<=zero) ) THEN
120 is_contact = .false.
121 RETURN
122 ELSE
123 is_contact = .true.
124 END IF
125
126 bminma_and(1)=xmaxb
127 bminma_and(2)=ymaxb
128 bminma_and(3)=zmaxb
129 bminma_and(4)=xminb
130 bminma_and(5)=yminb
131 bminma_and(6)=zminb
132
133 nbf = 1+itask*nbric/nthread
134 nbl = (itask+1)*nbric/nthread
135
136 DO ib=nbf,nbl
137 !-------------------------------------------!
138 ! VOXEL OCCUPIED BY THE BRICK !
139 !-------------------------------------------!
140 !Voxel_lower_left_bound for this element---+
141 ix1=int(nbx*(xmins(ib)-xminb)/dx)
142 iy1=int(nby*(ymins(ib)-yminb)/dy)
143 iz1=int(nbz*(zmins(ib)-zminb)/dz)
144 ix1=max(ix1,0) !pos for ibset must be correctly defined
145 iy1=max(iy1,0) !CRVOXEL (0:LRVOXEL,...
146 iz1=max(iz1,0) !CRVOXEL (0:LRVOXEL,...
147 !Voxel_upper_right_bound for this element---+
148 ix2=int(nbx*(xmaxs(ib)-xminb)/dx)
149 iy2=int(nby*(ymaxs(ib)-yminb)/dy)
150 iz2=int(nbz*(zmaxs(ib)-zminb)/dz)
151 ix2=min(ix2,nbx) !pos for ibset must be correctly defined
152 iy2=min(iy2,nby) !CRVOXEL (0:LRVOXEL,...
153 iz2=min(iz2,nbz) !CRVOXEL (0:LRVOXEL,...
154 !------------------------------------------------------!
155 ! VOXEL MARKING TO SPOT BRIC LOCATIONS (LOCAL DOMAIN) !
156 !------------------------------------------------------!
157#include "lockon.inc"
158 DO iz = iz1, iz2
159 DO iy = iy1, iy2
160 DO ix = ix1, ix2
161 crvoxel(iy,iz,loc_proc)=ibset(crvoxel(iy,iz,loc_proc),ix)
162 END DO
163 END DO
164 END DO
165#include "lockoff.inc"
166 ENDDO !IB=NBF,NBL
167
168C
169 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