OpenRadioss
2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
line_decomp.F
Go to the documentation of this file.
1
Copyright> OpenRadioss
2
Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3
Copyright>
4
Copyright> This program is free software: you can redistribute it and/or modify
5
Copyright> it under the terms of the GNU Affero General Public License as published by
6
Copyright> the Free Software Foundation, either version 3 of the License, or
7
Copyright> (at your option) any later version.
8
Copyright>
9
Copyright> This program is distributed in the hope that it will be useful,
10
Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11
Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
Copyright> GNU Affero General Public License for more details.
13
Copyright>
14
Copyright> You should have received a copy of the GNU Affero General Public License
15
Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16
Copyright>
17
Copyright>
18
Copyright> Commercial Alternative: Altair Radioss Software
19
Copyright>
20
Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21
Copyright> software under a commercial license. Contact Altair to discuss further if the
22
Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23
!||====================================================================
24
!|| line_decomp ../starter/source/model/group/line_decomp.F
25
!||--- called by ------------------------------------------------------
26
!|| lectur ../starter/source/starter/lectur.F
27
!||--- calls -----------------------------------------------------
28
!|| my_exit ../starter/source/output/analyse/analyse.c
29
!||--- uses -----------------------------------------------------
30
!|| front_mod ../starter/share/modules1/front_mod.F
31
!||====================================================================
32
SUBROUTINE
line_decomp
(IGRSLIN)
33
C-----------------------------------------------
34
C M o d u l e s
35
C-----------------------------------------------
36
USE
front_mod
37
USE
groupdef_mod
38
C-----------------------------------------------
39
C I m p l i c i t T y p e s
40
C-----------------------------------------------
41
#include "implicit_f.inc"
42
C-----------------------------------------------
43
C C o m m o n B l o c k s
44
C-----------------------------------------------
45
#include "com04_c.inc"
46
C-----------------------------------------------
47
C D u m m y A r g u m e n t s
48
C-----------------------------------------------
49
TYPE
(SURF_) ,
DIMENSION(NSLIN)
:: IGRSLIN
50
C-----------------------------------------------
51
C L o c a l V a r i a b l e s
52
C-----------------------------------------------
53
INTEGER
NN,IAD,IAD1,IAD2,IAD11,ND1,ND2,P,P1,P2
54
INTEGER
I,
J
55
LOGICAL
PSEARCH
56
C---------------------------------------------------------------
57
C Care : In lines - Element ID is wrong after Element grouping
58
C I reuse last field to store the processor ID.
59
C When lines are taken care in Element Grouping
60
C 1. Set processor only when no element is set in lines
61
C 2. Split lines accordingly
62
! /LINE are not used in the engine and the split is wrong in
63
! case of useless line (ie. when a line is defined but not
64
! used by an interface or other stuffs) -->
65
! 2 nodes (defining a segment) can be on 2 different processors
66
! in this case, the segment is not written in the restart file
67
! one could also define the nodes on the same processor but
68
! it will increase the comm.
69
C---------------------------------------------------------------
70
DO
i = 1, nslin
71
nn = igrslin(i)%NSEG
72
DO
j = 1, nn
73
p=0
74
psearch= .true.
75
nd1 = igrslin(i)%NODES(j,1)
76
nd2 = igrslin(i)%NODES(j,2)
77
C For better performance, I don't use nlocal, but use low level system
78
iad1 =
ifront
%IENTRY(nd1)
79
iad2 =
ifront
%IENTRY(nd2)
80
81
iad11 = iad1
82
C
83
C Initialization
84
C
85
p1 =
ifront
%P(1,iad1)
86
p2 =
ifront
%P(1,iad2)
87
C
88
C Common case : node are on same domain
89
C
90
IF
(p1==p2)
THEN
91
p=p1
92
psearch= .false.
93
ENDIF
94
C
95
DO
WHILE
(psearch)
96
97
C P1 equal to p2 found
98
IF
(p1 == p2)
THEN
99
p=p1
100
psearch= .false.
101
ENDIF
102
103
C Search leaves - in case 2 nodes from segments are in different domain.
104
IF
(p1 == 0)
THEN
105
print*,
'ERROR P1'
,nd1,nd2
106
CALL
my_exit
(2)
107
ENDIF
108
IF
(p2 == 0)
THEN
109
print*,
'ERROR P2'
,nd1,nd2
110
CALL
my_exit
(2)
111
ENDIF
112
C Move forward
113
114
! ---------------------
115
IF
(p1 < p2)
THEN
116
iad1 =
ifront
%P(2,iad1)
117
ENDIF
118
119
IF
(p1 > p2)
THEN
120
iad2 =
ifront
%P(2,iad2)
121
ENDIF
122
! ---------------------
123
! iad1 = 0 or iad2 = 0 --> the last processor id
124
! is reached
125
IF
(iad1==0.OR.iad2==0)
THEN
126
! skip this segment
127
p1=0
128
p2=0
129
p=0
130
psearch= .false.
131
ELSE
132
p1 =
ifront
%P(1,iad1)
133
p2 =
ifront
%P(1,iad2)
134
ENDIF
135
! ---------------------
136
ENDDO
! DO WHILE (PSEARCH)
137
C For this split - I use 3rd field to set Processor (supposed empty)
138
139
igrslin(i)%PROC(j) = p
140
141
ENDDO
! DO J = 1, NN
142
ENDDO
! DO I = 1, NSLIN
143
144
RETURN
145
END
146
my_exit
void my_exit(int *i)
Definition
analyse.c:1038
line_decomp
subroutine line_decomp(igrslin)
Definition
line_decomp.F:33
front_mod
Definition
front_mod.F:84
front_mod::ifront
type(my_front) ifront
Definition
front_mod.F:93
groupdef_mod
Definition
groupdef_mod.F:662
starter
source
model
group
line_decomp.F
Generated by
1.15.0