OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
c_iebcs.F
Go to the documentation of this file.
1Copyright> OpenRadioss
2Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3Copyright>
4Copyright> This program is free software: you can redistribute it and/or modify
5Copyright> it under the terms of the GNU Affero General Public License as published by
6Copyright> the Free Software Foundation, either version 3 of the License, or
7Copyright> (at your option) any later version.
8Copyright>
9Copyright> This program is distributed in the hope that it will be useful,
10Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12Copyright> GNU Affero General Public License for more details.
13Copyright>
14Copyright> You should have received a copy of the GNU Affero General Public License
15Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16Copyright>
17Copyright>
18Copyright> Commercial Alternative: Altair Radioss Software
19Copyright>
20Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21Copyright> software under a commercial license. Contact Altair to discuss further if the
22Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23!||====================================================================
24!|| c_iebcs ../starter/source/restart/ddsplit/c_iebcs.F
25!||--- called by ------------------------------------------------------
26!|| ddsplit ../starter/source/restart/ddsplit/ddsplit.F
27!||--- calls -----------------------------------------------------
28!|| iface ../starter/source/ale/ale3d/iface.F
29!||--- uses -----------------------------------------------------
30!||====================================================================
31 SUBROUTINE c_iebcs(IXS, IXQ, IXTG,
32 . NUMELS, NUMELQ, NUMELTG,
33 . NEBCS, CEP, NUMEL, PROC,
34 . IEBCS_NELEM_L, IEBCS_TYPE, IEBCS_LISTELEM_L, IEBCS_LISTFAC_L,IEBCS_LISTDP0_L, LENGTH, N2D,
35 . MULTI_FVM_IS_USED,FLAG,EBCS_TAB)
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
129 END SUBROUTINE c_iebcs
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)
Definition c_iebcs.F:36
#define my_real
Definition cppsort.cpp:32