OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
state_n_vel.F File Reference
#include "implicit_f.inc"
#include "units_c.inc"
#include "task_c.inc"
#include "scr14_c.inc"
#include "spmd_c.inc"
#include "com01_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine stat_n_vel (numnod, itab, itabg, leng, nodglob, weight, nodtag, v, vr)

Function/Subroutine Documentation

◆ stat_n_vel()

subroutine stat_n_vel ( integer numnod,
integer, dimension(*) itab,
integer, dimension(*) itabg,
integer leng,
integer, dimension(*) nodglob,
integer, dimension(*) weight,
integer, dimension(*) nodtag,
v,
vr )

Definition at line 33 of file state_n_vel.F.

35C-----------------------------------------------
36C M o d u l e s
37C-----------------------------------------------
38 USE my_alloc_mod
39C-----------------------------------------------
40C I m p l i c i t T y p e s
41C-----------------------------------------------
42#include "implicit_f.inc"
43C-----------------------------------------------
44C C o m m o n B l o c k s
45C-----------------------------------------------
46#include "units_c.inc"
47#include "task_c.inc"
48#include "scr14_c.inc"
49#include "spmd_c.inc"
50#include "com01_c.inc"
51C-----------------------------------------------
52C D u m m y A r g u m e n t s
53C-----------------------------------------------
54 INTEGER ITAB(*),NUMNOD,WEIGHT(*),ITABG(*),LENG,
55 . NODGLOB(*),NODTAG(*)
57 . v(3,*),vr(3,*)
58C-----------------------------------------------
59C L o c a l V a r i a b l e s
60C-----------------------------------------------
61 INTEGER I,J
62 INTEGER,DIMENSION(:),ALLOCATABLE :: NODTAGLOB
63 my_real,DIMENSION(:,:),ALLOCATABLE :: vg
64 my_real,DIMENSION(:,:),ALLOCATABLE :: vrg
65 CHARACTER(LEN=100) :: LINE
66 INTEGER LEN_LINE
67C-----------------------------------------------
68 CALL my_alloc(nodtaglob,leng)
69 CALL my_alloc(vg,3,leng)
70 CALL my_alloc(vrg,3,leng)
71C-----------------------------------------------
72!
73 IF (nspmd > 1) THEN
74 CALL spmd_dstat_vgath(v,nodglob,weight,vg,nodtag,
75 . nodtaglob)
76 CALL spmd_dstat_vgath(vr,nodglob,weight,vrg,nodtag,
77 . nodtaglob)
78 IF (ispmd /= 0) RETURN
79 ENDIF
80
81 IF (izipstrs == 0) THEN
82 WRITE(iugeo,'(A)') '/INIVEL/NODE/1'
83 WRITE(iugeo,'(A)') 'INITIAL NODAL VELOCITY'
84 ELSE
85 ! Write STATE File in GZIP format
86 WRITE(line,'(A)') '/INIVEL/NODE/1'
87 len_line=len_trim(line)
88 CALL strs_txt50(line,len_line)
89!
90 WRITE(line,'(A)') 'INITIAL NODAL VELOCITY'
91 len_line=len_trim(line)
92 CALL strs_txt50(line,len_line)
93 ENDIF
94!
95 IF (nspmd == 1) THEN
96 DO i=1,numnod
97 IF(nodtag(i) /= 0) THEN
98 IF (izipstrs == 0) THEN
99 WRITE(iugeo,'(2I10,1P3E20.9)') itab(i),0,(v(j,i),j=1,3)
100 IF (iroddl == 0)THEN
101 WRITE(iugeo,'(20X)')
102 ELSE
103 WRITE(iugeo,'(20X,1P3E20.9)') (vr(j,i),j=1,3)
104 END IF
105 ELSE
106 ! Write STATE File in GZIP format
107 WRITE(line,'(2I10,1P3E20.9)') itab(i),0,(v(j,i),j=1,3)
108 len_line=len_trim(line)
109 CALL strs_txt50(line,len_line)
110
111 IF (iroddl == 0) THEN
112 WRITE(line,'(20X)')
113 len_line=len_trim(line)
114 CALL strs_txt50(line,len_line)
115 ELSE
116 WRITE(line,'(20X,1P3E20.9)')(vr(j,i),j=1,3)
117 len_line=len_trim(line)
118 CALL strs_txt50(line,len_line)
119 END IF
120
121 END IF
122 END IF
123 END DO
124 ELSE
125 DO i=1,numnodg
126 IF(nodtaglob(i) /= 0)THEN
127 IF (izipstrs == 0) THEN
128 WRITE(iugeo,'(2I10,1P3E20.9)') itabg(i),0,(vg(j,i),j=1,3)
129 IF (iroddl == 0) THEN
130 WRITE(iugeo,'(20X)')
131 ELSE
132 WRITE(iugeo,'(20X,1P3E20.9)') (vrg(j,i),j=1,3)
133 END IF
134 ELSE
135 ! Write STATE File in GZIP format
136 WRITE(line,'(2I10,1P3E20.9)') itabg(i),0,(vg(j,i),j=1,3)
137 len_line=len_trim(line)
138 CALL strs_txt50(line,len_line)
139
140 IF (iroddl == 0) THEN
141 WRITE(line,'(20X)')
142 len_line=len_trim(line)
143 CALL strs_txt50(line,len_line)
144 ELSE
145 WRITE(line,'(20X,1P3E20.9)') (vrg(j,i),j=1,3)
146 len_line=len_trim(line)
147 CALL strs_txt50(line,len_line)
148 END IF
149
150 END IF
151 END IF
152 END DO
153 ENDIF
154C-----------------------------------------------
155 DEALLOCATE(nodtaglob)
156 DEALLOCATE(vg)
157 DEALLOCATE(vrg)
158 RETURN
#define my_real
Definition cppsort.cpp:32
subroutine spmd_dstat_vgath(v, nodglob, weight, vgath, nodtag, nodtaglob)
Definition spmd_stat.F:212
subroutine strs_txt50(text, length)
Definition sta_txt.F:87