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

Go to the source code of this file.

Functions/Subroutines

subroutine w_main_proc_weight (nodglob, numnod_l, nspmd, proc)

Function/Subroutine Documentation

◆ w_main_proc_weight()

subroutine w_main_proc_weight ( integer, dimension(*), intent(in) nodglob,
integer, intent(in) numnod_l,
integer, intent(in) nspmd,
integer, intent(in) proc )

Definition at line 30 of file w_master_proc_weight.F.

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
integer function nlocal(n, p)
Definition ddtools.F:349
void write_i_c(int *w, int *len)