OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
read_joint.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!|| read_joint ../engine/source/output/restart/read_joint.F
25!||--- called by ------------------------------------------------------
26!|| rdresb ../engine/source/output/restart/rdresb.F
27!||--- calls -----------------------------------------------------
28!|| read_i_c ../common_source/tools/input_output/write_routtines.c
29!||--- uses -----------------------------------------------------
30!|| joint_mod ../engine/share/modules/joint_mod.F
31!|| restmod ../engine/share/modules/restart_mod.F
32!||====================================================================
33 SUBROUTINE read_joint()
34!$COMMENT
35! READ_JOINT description
36! read the joint structure
37!
38! READ_JOINT organization :
39!$ENDCOMMENT
40C-----------------------------------------------
41C M o d u l e s
42C-----------------------------------------------
43 USE joint_mod
44 USE restmod
45C-----------------------------------------------
46C I m p l i c i t T y p e s
47C-----------------------------------------------
48#include "implicit_f.inc"
49C-----------------------------------------------
50C C o m m o n B l o c k s
51C-----------------------------------------------
52#include "com01_c.inc"
53#include "com04_c.inc"
54#include "tabsiz_c.inc"
55C-----------------------------------------------
56C L o c a l V a r i a b l e s
57C-----------------------------------------------
58 INTEGER :: N,I,NUMBER_MAIN_NODE,IS_SMS_AVAILABLE
59 INTEGER, DIMENSION(2) :: MAIN_NODE
60 INTEGER, DIMENSION(NJOINT) :: NUMBER_NODE
61 INTEGER, DIMENSION(:), ALLOCATABLE :: NODE_WEIGHT
62
63 ALLOCATE(cyl_join(njoint))
64 IF(njoint>0) THEN
65 number_node(1:njoint) = 0
66 ! number of node per proc (all proc --> size=nspmd)
67 CALL read_i_c(number_node,njoint)
68 ! ------------------------------
69 DO n=1,njoint
70 ! number of node and node with weight=1
71 cyl_join(n)%NUMBER_NODE = 0
72 cyl_join(n)%NUMBER_NODE_WEIGHT = 0
73 ! number of node sent
74 ALLOCATE( cyl_join(n)%COMM_MPI%SIZE_SR(nspmd) )
75 cyl_join(n)%COMM_MPI%SIZE_SR(1:nspmd) = 0
76 ! ------------------------------
77 IF(number_node(n)>0) THEN
78 ! number of node for the current joint
79 cyl_join(n)%NUMBER_NODE = number_node(n)
80 ! proc main for the current joint
81 CALL read_i_c(cyl_join(n)%PROC_MAIN,1)
82 ! number of proc for the current joint
83 CALL read_i_c(cyl_join(n)%NUMBER_PROC,1)
84 ! list of proc for the current joint
85 ALLOCATE( cyl_join(n)%LIST_PROC(cyl_join(n)%NUMBER_PROC) )
86 CALL read_i_c(cyl_join(n)%LIST_PROC,cyl_join(n)%NUMBER_PROC)
87 ! list of node for the current joint
88 ALLOCATE( cyl_join(n)%NODE(cyl_join(n)%NUMBER_NODE) )
89 CALL read_i_c(cyl_join(n)%NODE,cyl_join(n)%NUMBER_NODE)
90 ! weight array for the current joint
91 ALLOCATE( cyl_join(n)%WEIGHT(cyl_join(n)%NUMBER_NODE) )
92 CALL read_i_c(cyl_join(n)%WEIGHT,cyl_join(n)%NUMBER_NODE)
93 ! -----------
94 ! weight array index for the current joint
95 ALLOCATE( node_weight( cyl_join(n)%NUMBER_NODE ) )
96 DO i=1,cyl_join(n)%NUMBER_NODE
97 IF(cyl_join(n)%WEIGHT(i)==1) THEN
98 cyl_join(n)%NUMBER_NODE_WEIGHT = cyl_join(n)%NUMBER_NODE_WEIGHT + 1
99 node_weight(cyl_join(n)%NUMBER_NODE_WEIGHT) = cyl_join(n)%NODE(i)
100 ENDIF
101 ENDDO
102 ALLOCATE( cyl_join(n)%NODE_WEIGHT( cyl_join(n)%NUMBER_NODE_WEIGHT ) )
103 DO i=1,cyl_join(n)%NUMBER_NODE_WEIGHT
104 cyl_join(n)%NODE_WEIGHT(i) = node_weight(i)
105 ENDDO
106 DEALLOCATE( node_weight )
107 ! -----------
108 ENDIF
109 ! ------------------------------
110 ! number of sent node for mpi comm
111 CALL read_i_c(cyl_join(n)%COMM_MPI%SIZE_SR,nspmd)
112 ! main node
113 ALLOCATE( cyl_join(n)%MAIN_NODE(2) )
114 CALL read_i_c(main_node,2)
115 cyl_join(n)%MAIN_NODE(1:2) = main_node(1:2)
116
117 number_main_node = 0
118 DO i=1,2
119 IF(cyl_join(n)%MAIN_NODE(i)>0) number_main_node = number_main_node + 1
120 ENDDO
121 ! number of main node
122 cyl_join(n)%NUMBER_MAIN_NODE = number_main_node
123 ENDDO
124 ! ------------------------------
125 is_sms_available = 0
126 CALL read_i_c(is_sms_available,1)
127 IF(is_sms_available==0) THEN
128 joint_sms = .false.
129 ELSE
130 joint_sms = .true.
131 ENDIF
132 IF(joint_sms) CALL read_i_c(ljoint,sljoint)
133
134 ENDIF
135C
136 RETURN
137 END SUBROUTINE read_joint
logical joint_sms
Definition joint_mod.F:62
type(joint_type), dimension(:), allocatable cyl_join
Definition joint_mod.F:61
integer, dimension(:), allocatable ljoint
Definition restart_mod.F:60
subroutine read_joint()
Definition read_joint.F:34
void read_i_c(int *w, int *len)