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

Go to the source code of this file.

Functions/Subroutines

subroutine check_ale_comm (iparg_l, elbuf_tab, global_active_ale_element, itherm)

Function/Subroutine Documentation

◆ check_ale_comm()

subroutine check_ale_comm ( integer, dimension(nparg,ngroup), intent(in) iparg_l,
type(elbuf_struct_), dimension(ngroup), intent(in) elbuf_tab,
logical, intent(inout) global_active_ale_element,
integer, intent(in) itherm )

Definition at line 32 of file check_ale_comm.F.

33!$COMMENT
34! CHECK_ALE_COMM description
35! CHECK_ALE_COMM checks if all ALE elements are deactivated to
36! skip ALE solver
37! CHECK_ALE_COMM organization
38!$ENDCOMMENT
39 USE elbufdef_mod
40 USE spmd_mod
41C-----------------------------------------------
42C I m p l i c i t T y p e s
43C-----------------------------------------------
44#include "implicit_f.inc"
45C-----------------------------------------------
46C MPI
47C-----------------------------------------------
48#include "spmd.inc"
49C-----------------------------------------------
50C G l o b a l P a r a m e t e r s
51C-----------------------------------------------
52#include "com01_c.inc"
53#include "param_c.inc"
54C-----------------------------------------------
55C C o m m o n B l o c k s
56C-----------------------------------------------
57
58C-----------------------------------------------
59C D u m m y A r g u m e n t s
60C-----------------------------------------------
61 LOGICAL, INTENT(INOUT) :: GLOBAL_ACTIVE_ALE_ELEMENT
62 INTEGER, DIMENSION(NPARG,NGROUP), INTENT(IN) :: IPARG_L
63 INTEGER, INTENT(IN) :: ITHERM
64 TYPE(ELBUF_STRUCT_), DIMENSION(NGROUP), INTENT(IN) :: ELBUF_TAB
65C-----------------------------------------------
66C L o c a l V a r i a b l e s
67C-----------------------------------------------
68 LOGICAL :: ACTIVE_ALE_ELEMENT
69 INTEGER :: NG,I,NFT
70 INTEGER :: FIRST,LAST
71 INTEGER :: ITY,MTN,JEUL
72 my_real :: off_value
73#ifdef MPI
74 INTEGER :: IERROR
75#endif
76C-----------------------------------------------
77 ! ---------------------------------
78 IF(iale+ieuler+itherm /= 0) THEN
79 active_ale_element = .false.
80 ! -------------------
81 ! loop over the element groups to find the deactivated ALE elements
82 DO ng=1,ngroup
83 ity = iparg_l(5,ng)
84 mtn = iparg_l(1,ng)
85 IF(ity == 1 .OR. ity == 2)THEN
86 jeul = iparg_l(11,ng)
87 ELSEIF (mtn == 151 .AND. ity == 7) THEN
88 jeul = iparg_l(11,ng)
89 ELSE
90 jeul = 0
91 END IF
92 IF(iparg_l(7,ng)+jeul == 0)cycle
93 first = 1
94 last = iparg_l(2,ng)
95 nft = iparg_l(3,ng)
96 DO i=first,last
97 off_value = elbuf_tab(ng)%GBUF%OFF(i)
98 IF(off_value /= zero) THEN
99 active_ale_element = .true.
100 ENDIF
101 ENDDO
102 ENDDO
103 ! -------------------
104
105 IF(nspmd>1) THEN
106#ifdef MPI
107 CALL mpi_allreduce(active_ale_element,global_active_ale_element,1,mpi_logical,mpi_lor,spmd_comm_world,ierror)
108#endif
109 ELSE
110 global_active_ale_element = active_ale_element
111 ENDIF
112 ELSE
113 global_active_ale_element = .true.
114 ENDIF
115 ! ---------------------------------
116
117 RETURN
#define my_real
Definition cppsort.cpp:32
subroutine mpi_allreduce(sendbuf, recvbuf, cnt, datatype, operation, comm, ierr)
Definition mpi.f:103