OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
w_master_proc_weight.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!|| w_main_proc_weight ../starter/source/restart/ddsplit/w_master_proc_weight.F
25!||--- called by ------------------------------------------------------
26!|| ddsplit ../starter/source/restart/ddsplit/ddsplit.F
27!||--- calls -----------------------------------------------------
28!|| nlocal ../starter/source/spmd/node/ddtools.F
29!||====================================================================
30 SUBROUTINE w_main_proc_weight(NODGLOB,NUMNOD_L,NSPMD,PROC)
31C-----------------------------------------------
32C M o d u l e s
33C-----------------------------------------------
34C-----------------------------------------------
35C I m p l i c i t T y p e s
36C-----------------------------------------------
37#include "implicit_f.inc"
38C-----------------------------------------------
39C D u m m y A r g u m e n t s
40C-----------------------------------------------
41 INTEGER, INTENT(IN) :: NUMNOD_L,NSPMD,PROC
42 INTEGER, DIMENSION(*), INTENT(IN) :: NODGLOB
43! -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
44! NUMNOD_L : integer,
45! number of local element
46! NSPMD : integer,
47! number of processor/domain
48! PROC : integer,
49! ID of the current processor
50! NODGLOB : integer, dimension=NUMNOD_L
51! gives the global ID of a local element
52! NODGLOB( local_id) = global_id
53! -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
54C-----------------------------------------------
55C F u n c t i o n
56C-----------------------------------------------
57 INTEGER NLOCAL
58 EXTERNAL nlocal
59C-----------------------------------------------
60C L o c a l V a r i a b l e s
61C-----------------------------------------------
62 INTEGER I,N,P,G
63 INTEGER, DIMENSION(:), ALLOCATABLE :: MAIN_PROC
64 INTEGER, DIMENSION(:), ALLOCATABLE :: WEIGHT
65
66C-----------------------------------------------
67! allocate 1d array
68 ALLOCATE( main_proc(numnod_l) )
69 ALLOCATE( weight(numnod_l) )
70! -----------------------------------
71 main_proc(1:numnod_l) = 0
72 weight(1:numnod_l) = 0
73 DO i = 1,numnod_l
74 n = nodglob(i)
75 DO p = 1, nspmd
76 IF(nlocal(n,p)==1) THEN
77 main_proc(i) = p
78 GOTO 10
79 ENDIF
80 ENDDO
81 10 CONTINUE
82 ENDDO
83
84 DO i=1,numnod_l
85 IF(main_proc(i)==proc) weight(i) = 1
86 ENDDO
87
88 CALL write_i_c(main_proc,numnod_l)
89 CALL write_i_c(weight,numnod_l)
90! -----------------------------------
91! deallocate 1d array
92 DEALLOCATE(main_proc )
93 DEALLOCATE( weight )
94! -----------------------------------
95 RETURN
96
97 END SUBROUTINE w_main_proc_weight
subroutine w_main_proc_weight(nodglob, numnod_l, nspmd, proc)
void write_i_c(int *w, int *len)