OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
inter_minmax_node.F File Reference
#include "implicit_f.inc"
#include "comlock.inc"
#include "com04_c.inc"
#include "task_c.inc"
#include "lockon.inc"
#include "lockoff.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine inter_minmax_node (itask, box_limit, x)

Function/Subroutine Documentation

◆ inter_minmax_node()

subroutine inter_minmax_node ( integer, intent(in) itask,
intent(inout) box_limit,
intent(in) x )

Definition at line 34 of file inter_minmax_node.F.

35!$COMMENT
36! INTER_MINMAX_NODE description :
37! compute the minimal & maximal positions
38!
39! INTER_MINMAX_NODE organization :
40! loop over the nodes & min+max computation
41!$ENDCOMMENT
42C-----------------------------------------------
43C M o d u l e s
44C-----------------------------------------------
45 USE intbufdef_mod
47 USE message_mod
48C-----------------------------------------------
49C I m p l i c i t T y p e s
50C-----------------------------------------------
51#include "implicit_f.inc"
52#include "comlock.inc"
53C-----------------------------------------------
54C C o m m o n B l o c k s
55C-----------------------------------------------
56#include "com04_c.inc"
57#include "task_c.inc"
58C-----------------------------------------------
59C D u m m y A r g u m e n t s
60C-----------------------------------------------
61 INTEGER, INTENT(in) :: ITASK
62 my_real, dimension(6), intent(inout) :: box_limit !< upper & lower bound of the box
63 my_real, DIMENSION(3,NUMNOD), INTENT(in) :: x ! position
64C-----------------------------------------------
65C L o c a l V a r i a b l e s
66C-----------------------------------------------
67 INTEGER :: FIRST, LAST
68 INTEGER :: I,J
69 my_real, DIMENSION(3) :: max_limit,min_limit
70! ----------------------------------------
71
72 max_limit(1:3) = -ep30
73 min_limit(1:3) = ep30
74 first = 1+itask*numnod/nthread
75 last = (itask+1)*numnod/nthread
76 ! ------------------
77 ! find the min & max position
78 DO i=first,last
79 DO j=1,3
80 max_limit(j) = max(max_limit(j),x(j,i))
81 min_limit(j) = min(min_limit(j),x(j,i))
82 ENDDO
83 ENDDO
84 ! ------------------
85
86 ! ------------------
87 ! omp reduction
88#include "lockon.inc"
89 box_limit(1) = max(box_limit(1),max_limit(1))
90 box_limit(2) = max(box_limit(2),max_limit(2))
91 box_limit(3) = max(box_limit(3),max_limit(3))
92
93 box_limit(4) = min(box_limit(4),min_limit(1))
94 box_limit(5) = min(box_limit(5),min_limit(2))
95 box_limit(6) = min(box_limit(6),min_limit(3))
96#include "lockoff.inc"
97 ! ------------------
98 CALL my_barrier()
99
100 RETURN
#define my_real
Definition cppsort.cpp:32
#define min(a, b)
Definition macros.h:20
#define max(a, b)
Definition macros.h:21
subroutine my_barrier
Definition machine.F:31