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

Go to the source code of this file.

Functions/Subroutines

subroutine split_ebcs (proc_id, local_nebcs, list_other_ebcs, numel, cep, igrsurf, local_element_id, ebcs_tab, ebcs_tab_loc_2)

Function/Subroutine Documentation

◆ split_ebcs()

subroutine split_ebcs ( integer, intent(in) proc_id,
integer, intent(in) local_nebcs,
integer, dimension(local_nebcs), intent(in) list_other_ebcs,
integer, intent(in) numel,
integer, dimension(numel), intent(in) cep,
type (surf_), dimension(nsurf), intent(in), target igrsurf,
integer, dimension(numel), intent(in) local_element_id,
type(t_ebcs_tab), intent(inout) ebcs_tab,
type(t_ebcs_tab), intent(inout) ebcs_tab_loc_2 )

Definition at line 35 of file split_ebcs.F.

38!$COMMENT
39! SPLIT_EBCS description
40! SPLIT_EBCS split the elements/node/data of the ebcs's surface on the different processors
41!
42! SPLIT_EBCS organization :
43! loop over the /EBCS options :
44! * loop over the elements of the surface
45! * if the element is on the current proc PROC_ID,
46! convert global data to local data
47! example : convert the global element id to local element id
48! (local = local to the PROC_ID processor)
49!$ENDCOMMENT
50C-----------------------------------------------
51C M o d u l e s
52C-----------------------------------------------
53 USE front_mod
54 USE unitab_mod
55 USE message_mod
56 USE multi_fvm_mod
57 USE groupdef_mod
58 USE restmod
59 USE table_mod
60 USE submodel_mod
61 USE ale_ebcs_mod
62 USE ebcs_mod
64C-----------------------------------------------
65C I m p l i c i t T y p e s
66C-----------------------------------------------
67#include "implicit_f.inc"
68C-----------------------------------------------
69C C o m m o n B l o c k s
70C-----------------------------------------------
71#include "com04_c.inc"
72C-----------------------------------------------
73C D u m m y A r g u m e n t s
74C-----------------------------------------------
75 INTEGER, INTENT(IN) :: LOCAL_NEBCS ! number of parallelized ebcs
76 INTEGER, INTENT(IN) :: NUMEL ! number of element
77 INTEGER, INTENT(IN) :: PROC_ID ! processor ID
78 INTEGER, DIMENSION(LOCAL_NEBCS), INTENT(IN) :: LIST_OTHER_EBCS ! list of parallelized ebcs
79 INTEGER, DIMENSION(NUMEL), INTENT(IN) :: CEP ! connectivity element/proc
80 INTEGER, DIMENSION(NUMEL), INTENT(IN) :: LOCAL_ELEMENT_ID ! list of local element id (local to the current proc)
81 TYPE (SURF_), DIMENSION(NSURF), TARGET, INTENT(IN) :: IGRSURF ! surface structure
82 TYPE(T_EBCS_TAB), INTENT(INOUT) :: EBCS_TAB,EBCS_TAB_LOC_2 ! ebcs structure
83C-----------------------------------------------
84C L o c a l V a r i a b l e s
85C-----------------------------------------------
86 INTEGER :: I,J,IJK
87 INTEGER :: GLOBAL_INDEX,EBCS_ID,SURF_ID,NSEG
88 INTEGER :: ELEM_ID,LOCAL_SEG
89 INTEGER, DIMENSION(:,:), ALLOCATABLE :: LIST_NODE,LIST_NODE_2
90C-----------------------------------------------
91C S o u r c e L i n e s
92C-----------------------------------------------
93
94 global_index = 0
95 ! ---------------------------
96 ! loop over the ebcs
97 DO i=1,local_nebcs
98 ebcs_id = list_other_ebcs(i)
99 ! check if a surface is associated to the ebcs
100 IF(ebcs_tab_loc_2%tab(i)%poly%surf_id > 0) THEN
101 surf_id = ebcs_tab_loc_2%tab(i)%poly%surf_id ! surface id
102 nseg = igrsurf(surf_id)%NSEG ! number of surface
103 ! --------------
104 ! allocation of global element id array : its size is overestimated
105 IF(.NOT.ALLOCATED(ebcs_tab_loc_2%tab(i)%poly%global_ielem)) THEN
106 ALLOCATE( ebcs_tab_loc_2%tab(i)%poly%global_ielem(nseg) )
107 ENDIF
108 ! --------------
109 ALLOCATE( list_node(nseg,4) )
110 local_seg = 0
111 ! --------------
112 ! loop over the element of the surface
113 DO j = 1,nseg
114 elem_id = ebcs_tab%tab(ebcs_id)%poly%ielem(j)
115 ! --------------
116 ! check if the element is on the current PROC_ID processor
117 ! if true --> convert global data to local data
118 IF( cep(elem_id)+1 == proc_id) THEN
119 local_seg = local_seg + 1
120 global_index = global_index + 1
121 DO ijk = 1,4
122 list_node(local_seg,ijk) = igrsurf(surf_id)%NODES(j,ijk)
123 ENDDO
124 ebcs_tab_loc_2%tab(i)%poly%iseg(local_seg) = sign(ebcs_tab%tab(ebcs_id)%poly%iseg(j),global_index)
125
126 ebcs_tab_loc_2%tab(i)%poly%ielem(local_seg) = local_element_id(ebcs_tab%tab(ebcs_id)%poly%ielem(j))
127 ebcs_tab_loc_2%tab(i)%poly%itype(local_seg) = ebcs_tab%tab(ebcs_id)%poly%itype(j)
128
129 ebcs_tab_loc_2%tab(i)%poly%global_ielem(local_seg) = ebcs_tab%tab(ebcs_id)%poly%ielem(j)
130 ENDIF
131 ! --------------
132 ENDDO
133 ! --------------
134 ALLOCATE( list_node_2(local_seg,4) )
135 list_node_2(1:local_seg,1:4) = list_node(1:local_seg,1:4)
136 CALL ebcs_tab_loc_2%tab(i)%poly%set_nodes_elems(local_seg, numnod, list_node_2) ! faces <-> nodes
137 DEALLOCATE( list_node,list_node_2 )
138 ENDIF
139 ENDDO
140 ! ---------------------------
141 RETURN
142
end diagonal values have been computed in the(sparse) matrix id.SOL
initmumps id