OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
fcont_max_output.F File Reference
#include "implicit_f.inc"
#include "task_c.inc"
#include "com01_c.inc"
#include "com04_c.inc"
#include "spmd_c.inc"
#include "intstamp_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine fcont_max_output (cont, fcontg, nodglob, fcont_max, weight)

Function/Subroutine Documentation

◆ fcont_max_output()

subroutine fcont_max_output ( cont,
fcontg,
integer, dimension(*) nodglob,
fcont_max,
integer, dimension(*) weight )

Definition at line 30 of file fcont_max_output.F.

31C-----------------------------s------------------
32C I m p l i c i t T y p e s
33C-----------------------------------------------
34#include "implicit_f.inc"
35C-----------------------------------------------
36C C o m m o n B l o c k s
37C-----------------------------------------------
38#include "task_c.inc"
39#include "com01_c.inc"
40#include "com04_c.inc"
41#include "spmd_c.inc"
42#include "intstamp_c.inc"
43C-----------------------------------------------
44C D u m m y A r g u m e n t s
45C-----------------------------------------------
46 INTEGER NODGLOB(*),WEIGHT(*)
48 . cont(3,*),fcontg(3,*),fcont_max(3,*)
49 my_real fold, fnew, fmax
50 INTEGER I,K,N
52 . , DIMENSION(:,:), ALLOCATABLE :: fcont_tmp,fcont_tmp_p
53C-----------------------------------------------
54
55 IF(nintstamp == 0) THEN
56 DO n=1,numnod
57 IF(weight(n) == 1) THEN
58 fnew = cont(1,n)**2 + cont(2,n)**2 +cont(3,n)**2
59 fold = fcont_max(1,n)**2 + fcont_max(2,n)**2 +fcont_max(3,n)**2
60 fmax = max(fnew,fold)
61 IF(fnew > fold) THEN
62 fcont_max(1:3,n) = cont(1:3,n)
63 ENDIF
64 ELSE
65 cont(1:3,n) = zero
66 ENDIF
67 ENDDO
68 ELSE
69
70 ALLOCATE(fcont_tmp(3,numnod))
71 ALLOCATE(fcont_tmp_p(3,numnodg))
72
73 DO i=1,numnod
74 k=nodglob(i)
75 fcont_tmp(1,i) = cont(1,i) + fcontg(1,k)
76 fcont_tmp(2,i) = cont(2,i) + fcontg(2,k)
77 fcont_tmp(3,i) = cont(3,i) + fcontg(3,k)
78 ENDDO
79
80 IF(nspmd > 1 ) THEN
81 CALL spmd_h3d_sum_r_nodal_21(nodglob,fcont_tmp,3*numnod,fcont_tmp_p,3*numnodg,fcontg)
82 ENDIF
83
84 IF(nspmd > 1) THEN
85 IF(ispmd == 0 ) THEN
86 DO n=1,numnodg
87 fnew = fcont_tmp_p(1,n)**2 + fcont_tmp_p(2,n)**2 +fcont_tmp_p(3,n)**2
88 fold = fcont_max(1,n)**2 + fcont_max(2,n)**2 +fcont_max(3,n)**2
89 fmax = max(fnew,fold)
90 IF(fnew > fold) THEN
91 fcont_max(1:3,n) = fcont_tmp_p(1:3,n)
92 ENDIF
93 ENDDO
94 ENDIF
95 ELSE
96 DO n=1,numnod
97 IF(weight(n) /= 1) cycle
98 fnew = fcont_tmp(1,n)**2 + fcont_tmp(2,n)**2 +fcont_tmp(3,n)**2
99 fold = fcont_max(1,n)**2 + fcont_max(2,n)**2 +fcont_max(3,n)**2
100 fmax = max(fnew,fold)
101 IF(fnew > fold) THEN
102 fcont_max(1:3,n) = fcont_tmp(1:3,n)
103 ENDIF
104 ENDDO
105 ENDIF
106 DEALLOCATE( fcont_tmp_p, fcont_tmp)
107 ENDIF
108
109 RETURN
#define my_real
Definition cppsort.cpp:32
#define max(a, b)
Definition macros.h:21
subroutine spmd_h3d_sum_r_nodal_21(nodglob, v, len, vp0, lenp0, vg21)