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

Go to the source code of this file.

Functions/Subroutines

subroutine w_dampvrel (dampr, igrnod, idamp_vrel_l, ndamp_vrel_l, len_ia, ngrnod, ndamp, nrdamp, nspmd)

Function/Subroutine Documentation

◆ w_dampvrel()

subroutine w_dampvrel ( dimension(nrdamp,ndamp), intent(in) dampr,
type (group_), dimension(ngrnod), intent(in) igrnod,
integer, dimension(ndamp), intent(in) idamp_vrel_l,
integer, intent(in) ndamp_vrel_l,
integer, intent(inout) len_ia,
integer, intent(in) ngrnod,
integer, intent(in) ndamp,
integer, intent(in) nrdamp,
integer, intent(in) nspmd )

Definition at line 31 of file w_dampvrel.F.

33C-----------------------------------------------
34C M o d u l e s
35C-----------------------------------------------
36 USE groupdef_mod
37C---------------------------------------------
38C I m p l i c i t T y p e s
39C-----------------------------------------------
40#include "implicit_f.inc"
41C-----------------------------------------------
42C D u m m y A r g u m e n t s
43C-----------------------------------------------
44 INTEGER, INTENT(IN) :: NDAMP_VREL_L,NGRNOD,NDAMP,NRDAMP,NSPMD
45 INTEGER, INTENT(IN) :: IDAMP_VREL_L(NDAMP)
46 INTEGER, INTENT(INOUT) :: LEN_IA
47 my_real, INTENT(IN) :: dampr(nrdamp,ndamp)
48 TYPE (GROUP_),DIMENSION(NGRNOD),INTENT(IN) :: IGRNOD
49C-----------------------------------------------
50C E x t e r n a l F u n c t i o n s
51C-----------------------------------------------
52 INTEGER NLOCAL
53 EXTERNAL nlocal
54C-----------------------------------------------
55C L o c a l V a r i a b l e s
56C-----------------------------------------------
57 INTEGER I,J,IGR,PROC,PMAIN,CPT
58 INTEGER FR_DAMP_VREL(NSPMD+2,NDAMP_VREL_L),ID_DAMP_VREL(NDAMP_VREL_L)
59C-----------------------------------------------
60C
61 pmain = 1
62 cpt = 0
63 DO i=1,ndamp
64 IF (idamp_vrel_l(i) > 0) THEN
65 cpt = cpt+1
66 id_damp_vrel(cpt) = i
67 ENDIF
68 ENDDO
69C
70 fr_damp_vrel(1:nspmd+2,1:ndamp_vrel_l) = 0
71 DO i=1,ndamp_vrel_l
72 igr = nint(dampr(2,id_damp_vrel(i)))
73C-- Tag of procs having nodes in damping
74 DO proc = 1,nspmd
75 DO j = 1,igrnod(igr)%NENTITY
76 IF (nlocal(igrnod(igr)%ENTITY(j),proc)==1) THEN
77 fr_damp_vrel(proc,i) = 1
78 ENDIF
79 ENDDO
80 ENDDO
81C-- Find main proc for damping (smallest proc id)
82 DO proc = 1,nspmd
83 IF (fr_damp_vrel(proc,i) == 1) THEN
84 pmain = proc
85 exit
86 ENDIF
87 ENDDO
88 fr_damp_vrel(nspmd+1,i) = 0 ! Not used for now
89 fr_damp_vrel(nspmd+2,i) = pmain
90 ENDDO
91C
92 CALL write_i_c(id_damp_vrel,ndamp_vrel_l)
93 len_ia = len_ia + ndamp_vrel_l
94C
95 CALL write_i_c(fr_damp_vrel,ndamp_vrel_l*(nspmd+2))
96 len_ia = len_ia + ndamp_vrel_l*(nspmd+2)
97C
98! --------------------------------------
99 RETURN
#define my_real
Definition cppsort.cpp:32
integer function nlocal(n, p)
Definition ddtools.F:349
void write_i_c(int *w, int *len)