OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
check_nodal_state.F File Reference
#include "implicit_f.inc"
#include "task_c.inc"
#include "com04_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine check_nodal_state (itask, itag, newfront, intbuf_tab, size_sec_node, shift_s_node, inter_sec_node, sec_node_id)

Function/Subroutine Documentation

◆ check_nodal_state()

subroutine check_nodal_state ( integer, intent(in) itask,
integer, dimension(2*numnod), intent(in) itag,
integer, dimension(ninter), intent(inout) newfront,
type(intbuf_struct_), dimension(ninter), intent(inout) intbuf_tab,
integer, intent(in) size_sec_node,
integer, dimension(numnod+1), intent(in) shift_s_node,
integer, dimension(size_sec_node), intent(in) inter_sec_node,
integer, dimension(size_sec_node), intent(in) sec_node_id )
Parameters
[in,out]newfrontflag to force some exchanges related to S nodes between processor (if a S node becomes a shooting node - all interface) / force the collision detection algo if a new segment is activated for the (interface 25 + solid erosion)

Definition at line 30 of file check_nodal_state.F.

32!$COMMENT
33! CHECK_NODAL_STATE description
34! deactivation of node from an interface
35! CHECK_NODAL_STATE organization
36!$ENDCOMMENT
37 USE intbufdef_mod
38C-----------------------------------------------
39C I m p l i c i t T y p e s
40C-----------------------------------------------
41#include "implicit_f.inc"
42C-----------------------------------------------
43C C o m m o n B l o c k s
44C-----------------------------------------------
45#include "task_c.inc"
46#include "com04_c.inc"
47C-----------------------------------------------
48C D u m m y A r g u m e n t s
49C-----------------------------------------------
50 INTEGER, INTENT(in) :: ITASK ! omp thread ID
51 INTEGER, INTENT(in) :: SIZE_SEC_NODE ! size of INTER_SEC_NODE & SEC_NODE_ID
52 INTEGER, DIMENSION(2*NUMNOD), INTENT(in) :: ITAG ! tag of node : 0 if secondary node is deactivated, 1 if secondary node is activated
53 INTEGER, DIMENSION(NINTER), INTENT(inout) :: NEWFRONT !< flag to force some exchanges related to S nodes between processor (if a S node becomes a shooting node - all interface) / force the collision detection algo if a new segment is activated for the (interface 25 + solid erosion)
54 TYPE(INTBUF_STRUCT_), DIMENSION(NINTER), INTENT(inout) :: INTBUF_TAB ! interface data
55! shift to point to INTER_SEC_NODE/SEC_NODE_ID arrays & number of interface per node:
56! SHIFT_S_NODE(i) = index to NTER_SEC_NODE/SEC_NODE_ID for node_id = i
57! SHIFT_S_NODE(i+1) - SHIFT_S_NODE(i) = number of interface per node
58 INTEGER, DIMENSION(NUMNOD+1), INTENT(in) :: SHIFT_S_NODE
59
60 INTEGER, DIMENSION(SIZE_SEC_NODE), INTENT(in) :: INTER_SEC_NODE,SEC_NODE_ID ! list of interface of the nodes & ID of secondary nodes in each interface
61C-----------------------------------------------
62C L o c a l V a r i a b l e s
63C-----------------------------------------------
64 INTEGER :: I,J,K
65 INTEGER :: FIRST,LAST
66 INTEGER :: LOCAL_COUNTER,SHIFT
67 INTEGER :: NB_INTERFACE,NIN,NODE_ID
68 INTEGER, DIMENSION(:), ALLOCATABLE :: LOCAL_INDEX_SECONDARY_NODE
69C-----------------------------------------------
70 local_counter = 0
71 first = 1 + itask * (numnod / nthread)
72 last = (itask + 1) * (numnod / nthread)
73 IF(itask+1==nthread) last = numnod
74 ALLOCATE( local_index_secondary_node( last-first+1 ) )
75 ! --------------------------
76 ! find the deactivated nodes
77 DO i=first,last
78 IF(itag(i)==0) THEN
79 local_counter = local_counter + 1
80 local_index_secondary_node(local_counter) = i ! save the node ID
81 ENDIF
82 ENDDO
83 ! --------------------------
84 ! loop over the interface of deactivated nodes to deactivate the secondary nodes
85 DO i=1,local_counter
86 k = local_index_secondary_node(i) ! get the node ID
87 nb_interface = shift_s_node(k+1) - shift_s_node(k) ! get the number of interface where the node is defined
88 shift = shift_s_node(k) ! shift for the array "INTER_SEC_NODE"
89 DO j=1,nb_interface
90 nin = inter_sec_node(shift+j) ! interface ID
91 node_id = sec_node_id(shift+j) ! secondary node ID of the interface NIN
92
93 IF(intbuf_tab(nin)%STFNS(node_id)>zero) THEN ! check the current state of the node
94 intbuf_tab(nin)%STFNS(node_id) = -intbuf_tab(nin)%STFNS(node_id) ! nodal state change
95 newfront(nin) = -1 ! force some exchanges for S node of the interface NIN for the next cycle
96 ENDIF
97 ENDDO
98 ENDDO
99 ! --------------------------
100 DEALLOCATE( local_index_secondary_node )
101
102 RETURN