OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
check_coarse_grid.F File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine check_coarse_grid (nin, main_coarse_grid, sort_comm, itied)

Function/Subroutine Documentation

◆ check_coarse_grid()

subroutine check_coarse_grid ( integer, intent(in) nin,
integer, dimension(nb_box_coarse_grid**3), intent(in) main_coarse_grid,
type(sorting_comm_type), dimension(ninter), intent(inout) sort_comm,
integer, intent(in) itied )

Definition at line 30 of file check_coarse_grid.F.

31!$COMMENT
32! check_coarse_grid description :
33! for a given interface, check if the correct processor needs to communicate with a remote processor
34!
35! CHECK_COARSE_GRID organization :
36! loop over the processor P and :
37! * if p and the current processor ispmd colored a common cell --> ispmd and p need to communicate
38! * if P and the current processor ISPMD did not colored a common cell --> ISPMD and P don't need to communicate
39!$ENDCOMMENT
40C-----------------------------------------------
41C M o d u l e s
42C-----------------------------------------------
44C-----------------------------------------------
45C I m p l i c i t T y p e s
46C-----------------------------------------------
47#include "implicit_f.inc"
48#include "comlock.inc"
49C-----------------------------------------------
50C C o m m o n B l o c k s
51C-----------------------------------------------
52#include "com04_c.inc"
53C-----------------------------------------------
54C D u m m y A r g u m e n t s
55C-----------------------------------------------
56 INTEGER, INTENT(in) :: NIN
57 INTEGER, INTENT(in) :: ITIED
58 INTEGER, DIMENSION(NB_BOX_COARSE_GRID**3), INTENT(in) :: MAIN_COARSE_GRID
59 TYPE(sorting_comm_type), DIMENSION(NINTER), INTENT(inout) :: SORT_COMM ! structure for interface sorting comm
60C-----------------------------------------------
61C L o c a l V a r i a b l e s
62C-----------------------------------------------
63 LOGICAL :: KEEP_THIS_PROC,BREAK_
64 INTEGER :: I,J,IJK
65 INTEGER :: ID_PROC,DISPL
66! ----------------------------------------
67
68 ! allocatio of KEEP_PROC : true if need to send/rcv to proc P
69 IF(.NOT.ALLOCATED(sort_comm(nin)%KEEP_PROC)) THEN
70 ALLOCATE(sort_comm(nin)%KEEP_PROC(sort_comm(nin)%PROC_NUMBER) )
71 ENDIF
72 ! loop over the processor of the interface : keep P if at least 1 common cell between P and current proc
73 DO i=1,sort_comm(nin)%PROC_NUMBER
74 id_proc = sort_comm(nin)%PROC_LIST(i)
75 displ = sort_comm(nin)%RCV_DISPLS_COARSE_CELL(i)
76 sort_comm(nin)%KEEP_PROC(i) = .false.
77 keep_this_proc = .false.
78 break_ = .false.
79 j = 1
80 ! no cell from P --> keep = false
81 IF(sort_comm(nin)%RCV_SIZE_COARSE_CELL(i)==0) break_ = .true.
82
83 IF(.NOT.break_) THEN
84 IF(sort_comm(nin)%GLOBAL_COARSE_CELL(displ+nb_box_coarse_grid**3+1)==0) break_ = .true.
85 ENDIF
86
87 IF(.NOT.break_) THEN
88 ! loop voer the cell of P and check if 1 common cell
89 DO j=1,sort_comm(nin)%GLOBAL_COARSE_CELL(displ+nb_box_coarse_grid**3+1)
90 ijk = sort_comm(nin)%GLOBAL_COARSE_CELL(displ+j)
91 IF(main_coarse_grid(ijk)==1) keep_this_proc = .true.
92 ENDDO
93 ENDIF
94 IF(itied/=0) keep_this_proc=.true.
95 IF(keep_this_proc) sort_comm(nin)%KEEP_PROC(i) = .true.
96 ENDDO
97 ! ------------------
98 RETURN
subroutine check_coarse_grid(nin, main_coarse_grid, sort_comm, itied)
end diagonal values have been computed in the(sparse) matrix id.SOL
integer, parameter nb_box_coarse_grid