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

Go to the source code of this file.

Functions/Subroutines

subroutine c_iebcs (ixs, ixq, ixtg, numels, numelq, numeltg, nebcs, cep, numel, proc, iebcs_nelem_l, iebcs_type, iebcs_listelem_l, iebcs_listfac_l, iebcs_listdp0_l, length, n2d, multi_fvm_is_used, flag, ebcs_tab)

Function/Subroutine Documentation

◆ c_iebcs()

subroutine c_iebcs ( integer, dimension(nixs, numels), intent(in), target ixs,
integer, dimension(nixq, numelq), intent(in), target ixq,
integer, dimension(nixtg, numeltg), intent(in), target ixtg,
integer, intent(in), target numels,
integer, intent(in), target numelq,
integer, intent(in), target numeltg,
integer, intent(in) nebcs,
integer, dimension(*), intent(in) cep,
integer, intent(in) numel,
integer, intent(in) proc,
integer, dimension(nebcs), intent(inout) iebcs_nelem_l,
integer, dimension(nebcs), intent(inout) iebcs_type,
integer, dimension(*), intent(inout) iebcs_listelem_l,
integer, dimension(*), intent(inout) iebcs_listfac_l,
dimension(*), intent(inout) iebcs_listdp0_l,
integer, intent(inout) length,
integer, intent(in) n2d,
logical, intent(in) multi_fvm_is_used,
integer, intent(in) flag,
type(t_ebcs_tab), intent(in), target ebcs_tab )

Definition at line 31 of file c_iebcs.F.

36 USE ebcs_mod
37C-----------------------------------------------
38C M o d u l e s
39C-----------------------------------------------
40C
41C-----------------------------------------------
42C I m p l i c i t T y p e s
43C-----------------------------------------------
44#include "implicit_f.inc"
45C-----------------------------------------------
46C C o m m o n B l o c k s
47C-----------------------------------------------
48#include "param_c.inc"
49C-----------------------------------------------
50C D u m m y A r g u m e n t s
51C-----------------------------------------------
52 INTEGER, INTENT(IN), TARGET :: IXS(NIXS, NUMELS), IXQ(NIXQ, NUMELQ), IXTG(NIXTG, NUMELTG),
53 . NUMELS, NUMELQ, NUMELTG
54 INTEGER, INTENT(IN) :: NEBCS, CEP(*), NUMEL, PROC, N2D
55 INTEGER, INTENT(INOUT) :: LENGTH, IEBCS_NELEM_L(NEBCS), IEBCS_TYPE(NEBCS),
56 . IEBCS_LISTELEM_L(*), IEBCS_LISTFAC_L(*)
57 my_real, INTENT(INOUT) :: iebcs_listdp0_l(*)
58 LOGICAL, INTENT(IN) :: MULTI_FVM_IS_USED
59 INTEGER, INTENT(IN) :: FLAG ! 0 = count, 1 = fill
60 TYPE(t_ebcs_tab), TARGET, INTENT(IN) :: EBCS_TAB
61C-----------------------------------------------
62C L o c a l V a r i a b l e s
63C-----------------------------------------------
64 INTEGER :: I, KK, TYP, JBUF, K1, K2, K3, NSEG, NSEG_L, IELEM, ELEM_ID, ISEG
65 INTEGER :: II
66 INTEGER, DIMENSION(:), ALLOCATABLE :: LOCALID
67 INTEGER, DIMENSION(:, :), POINTER :: IX
68 my_real :: dp0
69C-----------------------------------------------
70C S o u r c e L i n e s
71C-----------------------------------------------
72 ALLOCATE(localid(numel))
73 IF (n2d == 0) THEN
74 ix => ixs(1:nixs, 1:numels)
75 ELSEIF(numelq /= 0) THEN
76 ix => ixq(1:nixq, 1:numelq)
77 ELSEIF (numeltg /= 0 .AND. multi_fvm_is_used) THEN
78 ix => ixtg(1:nixtg, 1:numeltg)
79 ENDIF
80
81
82 ielem = 0
83 DO i = 1, numel
84 IF (cep(i) == proc) THEN
85 ielem = ielem + 1
86 localid(i) = ielem
87 ENDIF
88 ENDDO
89
90 length = 0
91
92 ! ----------------------------
93 ! loop over the ebcs
94 DO i = 1, nebcs
95 typ = ebcs_tab%tab(i)%poly%type
96 iebcs_type(i) = typ
97 nseg = ebcs_tab%tab(i)%poly%nb_elem
98 nseg_l = 0
99 ! ---------------------
100 IF (ebcs_tab%tab(i)%poly%has_ielem ) THEN
101 ! ---------------------
102 ! loop over the element of the surface
103 DO iseg = 1, nseg
104 ielem = ebcs_tab%tab(i)%poly%ielem(iseg)
105 dp0=zero
106 IF(ebcs_tab%tab(i)%poly%has_dp0) dp0 = ebcs_tab%tab(i)%poly%dp0(iseg)
107 ! --------------
108 ! if the element is on the current proc, convert the global id IELEM/iface(ISEG) to local id
109 IF (cep(ielem) == proc) THEN
110 nseg_l = nseg_l + 1
111 IF(flag == 1) THEN
112 iebcs_listelem_l(length + nseg_l) = localid(ielem) ! element id
113 iebcs_listfac_l(length + nseg_l) = ebcs_tab%tab(i)%poly%iface(iseg) ! face id
114 iebcs_listdp0_l(length + nseg_l) = dp0
115 ENDIF
116 ENDIF
117 ! --------------
118 ENDDO
119 ! ---------------------
120 ENDIF
121 ! ---------------------
122 iebcs_nelem_l(i) = nseg_l
123 length = length + nseg_l
124 ENDDO ! I = 1, NEBCS
125 ! ----------------------------
126
127 DEALLOCATE(localid)
128 RETURN
#define my_real
Definition cppsort.cpp:32