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

Go to the source code of this file.

Functions/Subroutines

subroutine build_cnel_sub (cnel_sub, addcnel_sub, cnel, addcnel, indx, subsize)

Function/Subroutine Documentation

◆ build_cnel_sub()

subroutine build_cnel_sub ( integer, dimension(*), intent(inout) cnel_sub,
integer, dimension(*), intent(in) addcnel_sub,
integer, dimension(*), intent(in) cnel,
integer, dimension(*), intent(in) addcnel,
integer, dimension(*), intent(in) indx,
integer, intent(in) subsize )

Definition at line 28 of file build_cnel_sub.F.

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
end diagonal values have been computed in the(sparse) matrix id.SOL