OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
inter_minmax_node.F
Go to the documentation of this file.
1Copyright> OpenRadioss
2Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3Copyright>
4Copyright> This program is free software: you can redistribute it and/or modify
5Copyright> it under the terms of the GNU Affero General Public License as published by
6Copyright> the Free Software Foundation, either version 3 of the License, or
7Copyright> (at your option) any later version.
8Copyright>
9Copyright> This program is distributed in the hope that it will be useful,
10Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12Copyright> GNU Affero General Public License for more details.
13Copyright>
14Copyright> You should have received a copy of the GNU Affero General Public License
15Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16Copyright>
17Copyright>
18Copyright> Commercial Alternative: Altair Radioss Software
19Copyright>
20Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21Copyright> software under a commercial license. Contact Altair to discuss further if the
22Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23!||====================================================================
24!|| inter_minmax_node ../engine/source/interfaces/generic/inter_minmax_node.F
25!||--- called by ------------------------------------------------------
26!|| inter_init_component ../engine/source/interfaces/generic/inter_init_component.F90
27!||--- calls -----------------------------------------------------
28!|| my_barrier ../engine/source/system/machine.f
29!||--- uses -----------------------------------------------------
30!|| intbufdef_mod ../common_source/modules/interfaces/intbufdef_mod.F90
31!|| inter_struct_mod ../engine/share/modules/inter_struct_mod.F
32!|| message_mod ../engine/share/message_module/message_mod.F
33!||====================================================================
34 SUBROUTINE inter_minmax_node( ITASK,box_limit,X )
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
101 END SUBROUTINE inter_minmax_node
#define my_real
Definition cppsort.cpp:32
subroutine inter_minmax_node(itask, box_limit, x)
#define min(a, b)
Definition macros.h:20
#define max(a, b)
Definition macros.h:21
subroutine my_barrier
Definition machine.F:31