OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
split_cfd_solide.F File Reference
#include "implicit_f.inc"
#include "com01_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine split_cfd_solide (numels, ale_connectivity, ixs, ale_elm, size_ale_elm)
subroutine deallocate_split_cfd_solide (ale_elm)

Function/Subroutine Documentation

◆ deallocate_split_cfd_solide()

subroutine deallocate_split_cfd_solide ( type(split_cfd_type), dimension(nspmd), intent(inout) ale_elm)

Definition at line 151 of file split_cfd_solide.F.

152!$COMMENT
153! DEALLOCATE_SPLIT_CFD_SOLIDE description :
154! DEALLOCATE_SPLIT_CFD_SOLIDE deallocates the
155! ALE_ELM array
156! DEALLOCATE_SPLIT_CFD_SOLIDE organization :
157! - loop over NSPMD + deallocation
158!$ENDCOMMENT
159C-----------------------------------------------
160C M o d u l e s
161C-----------------------------------------------
162 USE split_cfd_mod
163C-----------------------------------------------
164C I m p l i c i t T y p e s
165C-----------------------------------------------
166#include "implicit_f.inc"
167C-----------------------------------------------
168C C o m m o n B l o c k s
169C-----------------------------------------------
170#include "com01_c.inc"
171C-----------------------------------------------
172C D u m m y A r g u m e n t s
173C-----------------------------------------------
174 TYPE(split_cfd_type), DIMENSION(NSPMD), INTENT(INOUT) :: ALE_ELM
175! -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*
176! ALE_ELM : split_cfd_type ; dimension=NSPMD ; solid element ID used
177! during the domain splitting (ALE part)
178! -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*
179C-----------------------------------------------
180C L o c a l V a r i a b l e s
181C-----------------------------------------------
182 INTEGER :: ISPMD
183C ----------------------------------------
184 DO ispmd=1,nspmd
185 IF( ALLOCATED(ale_elm(ispmd)%SOL_ID) ) DEALLOCATE( ale_elm(ispmd)%SOL_ID )
186 ENDDO
187 RETURN

◆ split_cfd_solide()

subroutine split_cfd_solide ( integer, intent(in) numels,
type(t_ale_connectivity), intent(inout) ale_connectivity,
integer, dimension(nixs,*), intent(in) ixs,
type(split_cfd_type), dimension(nspmd), intent(inout) ale_elm,
integer, dimension(nspmd) size_ale_elm )

Definition at line 33 of file split_cfd_solide.F.

34!$COMMENT
35! SPLIT_CFD_SOLIDE description :
36! SPLIT_CFD_SOLIDE retains all the useful solid elements
37! for the splitting in DDSPLIT for each domain in order to
38! avoid a quadratic loop in DDSPLIT
39! SPLIT_CFD_SOLIDE organization :
40! - first allocation of ALE_ELM%SOL_ID array
41! - for each solid element, if a neighbouring element
42! is useful for the splitting, catch the processor list
43! - fill the ALE_ELM array and if the ALE_ELM size is not
44! sufficient, then increase the size
45!$ENDCOMMENT
46C-----------------------------------------------
47C M o d u l e s
48C-----------------------------------------------
51 use element_mod , only : nixs
52C-----------------------------------------------
53C I m p l i c i t T y p e s
54C-----------------------------------------------
55#include "implicit_f.inc"
56C-----------------------------------------------
57C C o m m o n B l o c k s
58C-----------------------------------------------
59#include "com01_c.inc"
60C-----------------------------------------------
61C D u m m y A r g u m e n t s
62C-----------------------------------------------
63 INTEGER, INTENT(IN) :: NUMELS
64 INTEGER, DIMENSION(NIXS,*), INTENT(IN) :: IXS
65 INTEGER, DIMENSION(NSPMD) :: SIZE_ALE_ELM
66 TYPE(split_cfd_type), DIMENSION(NSPMD), INTENT(INOUT) :: ALE_ELM
67 TYPE(t_ale_connectivity), INTENT(INOUT) :: ALE_CONNECTIVITY
68! -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*
69! NUMELS : integer ; number of solid element
70! NIXS : integer ; dimension of IXS array
71
72! IXS : integer ; dimension=NIXS,NUMELS ; property of solid element
73! SIZE_ALE_ELM : integer ; dimension=NSPMD ; size of ALE_ELM%SOL_ID array
74! ALE_ELM : split_cfd_type ; dimension=NSPMD ; solid element ID used
75! during the domain splitting (ALE part)
76! -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*
77C-----------------------------------------------
78C L o c a l V a r i a b l e s
79C-----------------------------------------------
80 LOGICAL, DIMENSION(NSPMD) :: BOOL
81 INTEGER :: I,J,K,L,N,NS,IAD1,LGTH
82 INTEGER :: SOLV,ISPMD,NBR_PROC,NEW_SIZE_II,MIN_SIZE
83 INTEGER, DIMENSION(NSPMD) :: ID_SPMD,II
84 INTEGER, DIMENSION(:), ALLOCATABLE :: TMP
85C ----------------------------------------
86
87 ! -----------------------------
88 ! allocation of ALE_ELM (overestimation of the size)
89 size_ale_elm(1:nspmd) = numels/nspmd+1
90 DO ispmd=1,nspmd
91 ALLOCATE( ale_elm(ispmd)%SOL_ID(size_ale_elm(ispmd)) )
92 ENDDO
93 ! -----------------------------
94 ii(1:nspmd) = 0
95 DO i=1,numels
96 ! -----------------------------
97 ! check if a neighbouring element is used
98 bool(1:nspmd)=.false.
99 iad1 = ale_connectivity%ee_connect%iad_connect(i)
100 lgth = ale_connectivity%ee_connect%iad_connect(i+1)-ale_connectivity%ee_connect%iad_connect(i)
101 DO j=1,8
102 ns = ixs(j+1,i)
103 DO k=1,lgth
104 solv = ale_connectivity%ee_connect%connected(iad1 + k - 1)
105 IF (solv>0) THEN
106 DO l=1,8
107 n = ixs(l+1,solv)
108 CALL plist_ifront(id_spmd,n,nbr_proc)
109 DO ispmd=1,nbr_proc
110 bool(id_spmd(ispmd)) = .true.
111 ENDDO
112 ENDDO
113 ENDIF
114 ENDDO
115 ENDDO
116 ! -----------------------------
117 ! fill the ALE_ELM array / increase the size
118 DO ispmd=1,nspmd
119 IF( bool(ispmd) ) THEN
120 ii(ispmd) = ii(ispmd) + 1
121 IF( ii(ispmd)>size_ale_elm(ispmd) ) THEN
122 ! need to check the size for small test, ie. when NUMELS < NSPMS
123 min_size=max(1,5* numels/ ( 4*nspmd ))
124 new_size_ii = size_ale_elm(ispmd) + min_size
125 ALLOCATE( tmp( new_size_ii ) )
126 tmp(1:size_ale_elm(ispmd)) = ale_elm(ispmd)%SOL_ID( 1:size_ale_elm(ispmd) )
127 CALL move_alloc(from=tmp,to=ale_elm(ispmd)%SOL_ID)
128 size_ale_elm(ispmd) = new_size_ii
129 ENDIF
130 ale_elm(ispmd)%SOL_ID(ii(ispmd)) = i
131 ENDIF
132 ENDDO
133 ! -----------------------------
134 ENDDO
135 ! -----------------------------
136
137 size_ale_elm(1:nspmd) = ii(1:nspmd)
138
139 RETURN
subroutine plist_ifront(tab, n, cpt)
Definition ddtools.F:153
#define max(a, b)
Definition macros.h:21