OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
build_cnel_sub.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!|| build_cnel_sub ../starter/source/model/mesh/build_cnel_sub.F
25!||--- called by ------------------------------------------------------
26!|| lectur ../starter/source/starter/lectur.F
27!||====================================================================
28 SUBROUTINE build_cnel_sub(CNEL_SUB ,ADDCNEL_SUB,CNEL ,ADDCNEL ,
29 . INDX ,SUBSIZE )
30C-----------------------------------------------
31C I m p l i c i t T y p e s
32C-----------------------------------------------
33#include "implicit_f.inc"
34C-----------------------------------------------
35C C o m m o n B l o c k s
36C-----------------------------------------------
37#include "com04_c.inc"
38C-----------------------------------------------
39C D u m m y A r g u m e n t s
40C-----------------------------------------------
41 ! ADDCNE table for all nodes
42 INTEGER,INTENT(IN) :: ADDCNEL(*) ! (0:NUMNOD+1) => NUMNOD+2
43 ! CNE table for all nodes
44 INTEGER,INTENT(IN) :: CNEL(*) ! (ADDCNEL(NUMNOD))
45 ! Index table for corresping number in the node subset
46 INTEGER,INTENT(IN) :: INDX(*) ! (SUBSIZE)
47 ! Size of the subset
48 INTEGER,INTENT(IN) :: SUBSIZE
49 ! ADDCNE table for the subset of nodes
50 INTEGER,INTENT(IN) :: ADDCNEL_SUB(*) ! (0:SUBSIZE + 1) => SUBSIZE+2
51 ! CNE table for the subset of nodes
52 INTEGER,INTENT(INOUT) :: CNEL_SUB(*) ! (ADDCNEL(SUBSIZE))
53C-----------------------------------------------
54C L o c a l V a r i a b l e s
55C-----------------------------------------------
56 INTEGER NS ! Number of the node in the subset
57 INTEGER NG ! Number of the node in the global set
58 INTEGER NEL ! Number of elements attached to the node
59 INTEGER NEL_SUB
60 INTEGER NUMG
61 INTEGER I,K
62C-----------------------------------------------
63C
64C Building the CNEL_SUB
65C
66 ! Loop over the nodes of the subset
67 DO ns = 1,subsize
68 ! Looking for the corresping global node
69 ng = indx(ns)
70 ! Number of elements attached to the node
71 nel = addcnel(ng+2) - addcnel(ng+1)
72 ! Number of non-local elements attached to the node
73 nel_sub = addcnel_sub(ns+2) - addcnel_sub(ns+1)
74 ! Initialization of the counter of non-local elements
75 k = 1
76 ! Loop over attached elements
77 DO i = 1,nel
78 ! Number of the element
79 numg = cnel(addcnel(ng+1)+i-1)
80 ! Treatment according of element type
81 IF (numg<=numels) THEN
82 cnel_sub(addcnel_sub(ns+1)+k-1) = numg
83 k = k + 1
84 ELSEIF (numg<=numels+numelq) THEN
85 CONTINUE
86 ELSEIF (numg<=numels+numelq+numelc) THEN
87 cnel_sub(addcnel_sub(ns+1)+k-1) = numg
88 k = k + 1
89 ELSEIF (numg<=numels+numelq+numelc+numelt) THEN
90 CONTINUE
91 ELSEIF (numg<=numels+numelq+numelc+numelt+numelp) THEN
92 CONTINUE
93 ELSEIF (numg<=numels+numelq+numelc+numelt+numelp+ ! If the element is a triangle shell
94 . numelr) THEN
95 CONTINUE
96 ELSEIF (numg<=numels+numelq+numelc+numelt+numelp+ ! If the element is a triangle shell
97 . numelr+numeltg) THEN
98 cnel_sub(addcnel_sub(ns+1)+k-1) = numg
99 k = k + 1
100 ELSE
101 CONTINUE
102 ENDIF
103 ENDDO
104 IF ((k-1)/=nel_sub) THEN
105 WRITE(*,*) "WRONG NUMBER OF NON-LOCAL ELEMENTS COUNTED"
106 WRITE(*,*) "SEE BUILD_CNEL_SUB.F"
107 stop
108 ENDIF
109 ENDDO
110C-----------------------------------------------
111 RETURN
112 END
subroutine build_cnel_sub(cnel_sub, addcnel_sub, cnel, addcnel, indx, subsize)