OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
find_surface_from_remote_proc.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!|| find_surface_from_remote_proc ../engine/source/interfaces/interf/find_surface_from_remote_proc.F
25!||--- called by ------------------------------------------------------
26!|| spmd_exch_deleted_surf_edge ../engine/source/mpi/interfaces/spmd_exch_deleted_surf_edge.F
27!||--- calls -----------------------------------------------------
28!|| check_surface_state ../engine/source/interfaces/interf/check_surface_state.F
29!||--- uses -----------------------------------------------------
30!|| intbufdef_mod ../common_source/modules/interfaces/intbufdef_mod.F90
31!|| nodal_arrays_mod ../common_source/modules/nodal_arrays.F90
32!|| shooting_node_mod ../engine/share/modules/shooting_node_mod.f
33!||====================================================================
34 SUBROUTINE find_surface_from_remote_proc(SHOOT_STRUCT,NB_SURFACE,LIST_NODE,INTBUF_TAB,NODES,
35 . IPARI,GEO,
36 . IXS,IXC,IXT,IXP,IXR,IXTG,IXS10,
37 . ADDCNEL,CNEL,TAG_NODE,TAG_ELEM )
38!$COMMENT
39! FIND_SURFACE_FROM_REMOTE_PROC description
40! this routine finds the surface id from a list of remote node
41! FIND_SURFACE_FROM_REMOTE_PROC organization
42! loop over the node list:
43! - find the local node id from the global node id
44! - intersection of lists of surface for the node to obtain the surface id
45! - deactivation of the surface
46!$ENDCOMMENT
47 USE nodal_arrays_mod
48 USE intbufdef_mod
50C-----------------------------------------------
51C I m p l i c i t T y p e s
52C-----------------------------------------------
53#include "implicit_f.inc"
54C-----------------------------------------------
55C C o m m o n B l o c k s
56C-----------------------------------------------
57#include "com04_c.inc"
58#include "scr17_c.inc"
59#include "param_c.inc"
60C-----------------------------------------------
61C D u m m y A r g u m e n t s
62C-----------------------------------------------
63 INTEGER, INTENT(in) :: NB_SURFACE ! number of "surface" (ie. 4 nodes)
64 INTEGER, DIMENSION(4*NB_SURFACE), INTENT(in) :: LIST_NODE ! list of 4 nodes
65 TYPE(nodal_arrays_), INTENT(INOUT) :: NODES
66 TYPE(shooting_node_type), INTENT(inout) :: SHOOT_STRUCT ! structure for shooting node algo
67 TYPE(intbuf_struct_), DIMENSION(NINTER), INTENT(inout) :: INTBUF_TAB ! interface data
68
69 INTEGER, DIMENSION(NIXS,NUMELS), INTENT(in) :: IXS ! solid array
70 INTEGER, DIMENSION(NIXC,NUMELC), INTENT(in) :: IXC ! shell array
71 INTEGER, DIMENSION(NIXT,NUMELT), INTENT(in) :: IXT! truss array
72 INTEGER, DIMENSION(NIXP,NUMELP), INTENT(in) :: IXP! beam array
73 INTEGER, DIMENSION(NIXR,NUMELR), INTENT(in) :: IXR! spring array
74 INTEGER, DIMENSION(NIXTG,NUMELTG), INTENT(in) :: IXTG! triangle array
75 INTEGER, DIMENSION(6,NUMELS10), INTENT(in) :: IXS10!< tetra10 data
76 INTEGER, DIMENSION(0:NUMNOD+1), INTENT(in) :: ADDCNEL ! address for the CNEL array
77 INTEGER, DIMENSION(NPARI,NINTER), INTENT(in) :: IPARI
78 my_real, DIMENSION(NPROPG,NUMGEO), INTENT(in) :: geo
79 INTEGER, DIMENSION(0:LCNEL), INTENT(in) :: CNEL ! connectivity node-->element
80 INTEGER, DIMENSION(NUMNOD), INTENT(inout) :: TAG_NODE
81 INTEGER, DIMENSION(NUMELS+NUMELQ+NUMELC+NUMELT+NUMELP+NUMELR+NUMELTG), INTENT(inout) :: TAG_ELEM
82C-----------------------------------------------
83C L o c a l V a r i a b l e s
84C-----------------------------------------------
85 INTEGER :: I,J,NODE_ID
86 INTEGER :: NB_SURFACE_R_PROC
87 INTEGER, DIMENSION(4) :: LOCAL_NODE,GLOBAL_NODE
88 INTEGER, DIMENSION(:), ALLOCATABLE :: LIST_SURFACE_R_PROC
89
90 INTEGER :: SHIFT
91 INTEGER :: NODE_SURF_NB
92 INTEGER :: NB_RESULT_INTERSECT,NB_SURFACE_1,NB_SURFACE_2
93 INTEGER, DIMENSION(:), ALLOCATABLE :: RESULT_INTERSECT,INTERSECT_1,INTERSECT_2
94 INTEGER, DIMENSION(:), ALLOCATABLE :: TMP_ARRAY
95C-----------------------------------------------
96C E x t e r n a l F u n c t i o n s
97C-----------------------------------------------
98C-----------------------------------------------
99 ALLOCATE( list_surface_r_proc(4*nb_surface) )
100 nb_surface_r_proc = 0
101
102 ! --------------------------
103 ! working array : surface
104 ALLOCATE( result_intersect( shoot_struct%MAX_SURF_NB ) )
105 ALLOCATE( intersect_1( shoot_struct%MAX_SURF_NB ) )
106 ALLOCATE( intersect_2( shoot_struct%MAX_SURF_NB ) )
107
108
109 DO i=1,nb_surface
110 global_node(1:4) = list_node( (i-1)*4+1:(i-1)*4+4)
111 DO j=1,4
112 local_node(j) = get_local_node_id(nodes,global_node(j))
113 ENDDO
114 node_id = local_node(1) ! get the node ID
115
116 nb_result_intersect = shoot_struct%SHIFT_M_NODE_SURF(node_id+1) - shoot_struct%SHIFT_M_NODE_SURF(node_id) ! get the number of surface of the node
117 shift = shoot_struct%SHIFT_M_NODE_SURF(node_id)
118 result_intersect(1:nb_result_intersect) = shoot_struct%M_NODE_SURF( shift+1:shift+nb_result_intersect )
119
120 node_surf_nb = 4
121 IF(local_node(3)==local_node(4)) node_surf_nb = 3
122
123 DO j=2,node_surf_nb
124 nb_surface_1 = nb_result_intersect
125 intersect_1(1:nb_surface_1) = result_intersect(1:nb_result_intersect)
126 node_id = local_node(j) ! get the node ID
127 ! -----------------------
128 ! intersection of surface
129 nb_surface_2 = shoot_struct%SHIFT_M_NODE_SURF(node_id+1) - shoot_struct%SHIFT_M_NODE_SURF(node_id) ! get the number of surface of the node
130 shift = shoot_struct%SHIFT_M_NODE_SURF(node_id)
131 intersect_2(1:nb_surface_2) = shoot_struct%M_NODE_SURF( shift+1:shift+nb_surface_2 )
132 IF(nb_surface_1>0.AND.nb_surface_2>0) THEN
133 CALL intersect_2_sorted_sets( intersect_1,nb_surface_1,
134 . intersect_2,nb_surface_2,
135 . result_intersect,nb_result_intersect )
136 ELSE
137 nb_result_intersect = 0
138 ENDIF
139 ! end : intersection of surface
140 ! -----------------------
141 ENDDO
142 IF(nb_surface_r_proc + nb_result_intersect > SIZE(list_surface_r_proc) ) THEN
143 ALLOCATE( tmp_array(nb_surface_r_proc) )
144 tmp_array(1:nb_surface_r_proc) = list_surface_r_proc(1:nb_surface_r_proc)
145 DEALLOCATE( list_surface_r_proc )
146 ALLOCATE( list_surface_r_proc( (nb_surface_r_proc+nb_result_intersect) * 2 ) )
147 list_surface_r_proc(1:nb_surface_r_proc) = tmp_array(1:nb_surface_r_proc)
148 DEALLOCATE( tmp_array )
149 ENDIF
150
151 list_surface_r_proc(1+nb_surface_r_proc:nb_surface_r_proc+nb_result_intersect) =
152 . result_intersect(1:nb_result_intersect)
153 nb_surface_r_proc = nb_surface_r_proc + nb_result_intersect
154 ENDDO
155
156 CALL check_surface_state( -1,nb_surface_r_proc,list_surface_r_proc,shoot_struct%SHIFT_INTERFACE,intbuf_tab,
157 . ipari,geo,
158 . ixs,ixc,ixt,ixp,ixr,ixtg,ixs10,
159 . addcnel,cnel,tag_node,tag_elem,shoot_struct )
160
161 DEALLOCATE( list_surface_r_proc )
162 DEALLOCATE( result_intersect )
163 DEALLOCATE( intersect_1 )
164 DEALLOCATE( intersect_2 )
165
166 RETURN
167 END SUBROUTINE find_surface_from_remote_proc
subroutine check_surface_state(itask, surfarce_nb, surface_id, shift_interface, intbuf_tab, ipari, geo, ixs, ixc, ixt, ixp, ixr, ixtg, ixs10, addcnel, cnel, tag_node, tag_elem, shoot_struct)
#define my_real
Definition cppsort.cpp:32
subroutine find_surface_from_remote_proc(shoot_struct, nb_surface, list_node, intbuf_tab, nodes, ipari, geo, ixs, ixc, ixt, ixp, ixr, ixtg, ixs10, addcnel, cnel, tag_node, tag_elem)